Skip to content

Instantly share code, notes, and snippets.

@xperia64
xperia64 / bind.c
Last active October 16, 2018 18:16
IPv6 bind shim
/*
Copyright (C) 2000 Daniel Ryde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@xperia64
xperia64 / dumbseed.py
Created July 27, 2020 22:32
seeddb to dat
#!/usr/bin/env python3
import sys
import os
with open(sys.argv[1], mode='rb') as seeddb:
seedbyte = seeddb.read()[16:]
try:
os.mkdir("seed")
@xperia64
xperia64 / cxbx-reloaded-proton.md
Created November 15, 2022 08:01
Make Cxbx-Reloaded work in Proton/on the Steam Deck

Just because this was poorly documented, I'm writing how I configured Cxbx-Reloaded to run on the Steam Deck:

  1. Add Cxbx-Reloaded as a non-steam game and configure it to use Proton-GE.
  2. Use protontricks (I used the flatpak version) to install: a. d3dcompiler_42
@xperia64
xperia64 / amd-gpu-windows-driver-errata.md
Created April 22, 2023 20:28
AMD GPU Windows driver errata

AMD's GPU drivers on Windows have some bad behavior when the card is not active or the primary display on boot. Specifically:

  1. Certain EXE names are hooked in the kernel driver, and they won't even begin running for 10-15+ seconds after you open them
  2. ULPS (Ultra Low Power State) is buggy when Windows is running with the driver loaded, but no displays are enabled on the GPU

Regarding 1:

  • Applications named Steam.exe, Origin.exe, or uPlay.exe among others get hooked by the kernel driver, presumably for some sort of game integration that I don't quite understand
  • I get the feeling this is potentially very outdated cruft, given that uPlay.exe is hooked (which no longer exists), while UbisoftConnect.exe is not
  • When your AMD card doesn't own the Windows primary display, this hooking delays launch of EXEs with these names for whatever reason
  • I have not found a complete list of these EXEs in the kernel driver binary; I'm thinking they may be hashed? There's another list in the binary in
@xperia64
xperia64 / steamdeck-chroot.sh
Last active January 13, 2024 21:41
Bootstrapping a chroot on the Steam Deck
#!/bin/bash
# Largely adapted from https://www.reddit.com/r/SteamDeck/comments/xgslv9/howto_installing_pacman_packages_in_userspace/
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <chrootdir> <command>"
echo ""
echo "Possible commands:"
echo " init - initialize an empty directory as a chroot"
echo " pacman [args] - use the host pacman to manage packages within the chroot"
echo " chroot - calls arch-chroot on the chroot"