Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Restore script for Heroic game saves (SteamOS/SteamFork)
# Restores a selected game's save from backup to its original location
# Usage: ./restore_heroic_save.sh <GameName> <BackupFile>
SRC_DIR="/var/run/media/primary/Backups"
DEST_DIR="$HOME/Games/Heroic/Prefixes/default"
if [ "$#" -ne 2 ]; then
echo "Usage: $ <GameName> <BackupFile>"
#!/bin/bash
# Backup script for Heroic game saves (SteamOS/SteamFork)
# Each game's save is backed up individually with a time/date stamp
# Destination: /var/run/media/primary/Backups/
SRC_DIR="$HOME/Games/Heroic/Prefixes/default"
DEST_DIR="/var/run/media/primary/Backups"
DATE=$(date +'%Y%m%d_%H%M%S')
# Create destination if it doesn't exist

AMD APU Optimization Guide for llama.cpp on SteamOS

This guide documents the process to optimize and run large language models on AMD APUs (specifically 7840U with Radeon 780M, Ayaneo Flip w/ 32GB RAM) using llama.cpp with Vulkan acceleration.

Prerequisites

System Preparation

# Disable read-only filesystem (SteamOS specific)
sudo steamos-readonly disable

4w idle savings:

mkdir -p ${HOME}/.config/gamescope/scripts/displays/
cat <<EOF >${HOME}/.config/gamescope/scripts/displays/AYA-AYANEOFHD.lua
gamescope.config.known_displays.ayaneo_fhd_lcd.dynamic_refresh_rates = {60}
EOF

To revert, remove the configuration and reboot the device.

Add space to a MacOS Native image running in UTM

Install qemu to provide qemu-img

brew install qemu

Resize the raw image

# Stop the VM (no state so it is editable) and change into the Data directory
@fewtarius
fewtarius / install_vita3k.md
Last active June 6, 2024 16:18
Install Vita3K in SteamOS / SteamFork

Save to ~/install_vita3k.sh, make it executable, and execute it in Desktop Mode. Add the Vita3K shortcut to Steam.

#!/bin/sh

EMU="Vita3K"
DESKTOP_FILE="${EMU}.desktop"

APPS_PATH="${HOME}/Applications"
INSTALL_PATH="${HOME}/.config/${EMU}"
@fewtarius
fewtarius / rg35xx.dts
Created February 5, 2023 16:01 — forked from macromorgan/rg35xx.dts
Device Tree for RG35XX
/dts-v1/;
/ {
#address-cells = <0x01>;
#size-cells = <0x01>;
compatible = "actions,gs705a\0actions,atm7059a";
interrupt-parent = <0x01>;
model = "Actions GS705A board";
chosen {
@fewtarius
fewtarius / syncthing.md
Last active June 29, 2023 16:27
Syncthing on Deck
@fewtarius
fewtarius / fix_jacksense_eapd.md
Last active November 15, 2025 23:58
Fixing Jack Sense and EAPD

Fixing Jack Sense and EAPD

This mini-guide helps correct issues with internal speakers or the headphone jack outputting static and not functioning after sleep. It deprecates CodecCommander, ALC_JackFix, my JackFix script, and all other combo jack helpers by correcting the layout in AppleALC.

Prerequisites

  • Xcode
  • The latest AppleALC source code tested to build cleanly
  • A Codec Dump from Linux or OpenCore
  • ProperTree