Add SteamOS distro #23

Merged
mia26MAjFm merged 1 commit from add-steamos into main 2026-06-27 16:10:07 -05:00
mia26MAjFm commented 2026-06-27 16:08:58 -05:00 (Migrated from github.com)

Summary

Adds --distro steamos as a build target. Same pattern as bazzite-deck / batocera: distros/steamos/build-rootfs.sh fetches Valve's Steam Deck recovery image, extracts the rootfs into \$CHROOT, swaps in our linux-ps5 kernel, rebuilds initramfs for PS5 amdgpu.

PS5-specific fixes baked into the rootfs

  • Switch-to-Desktop: shim replaces /usr/bin/steamos-session-select with a direct SDDM-conf writer + sddm restart. The vendored helper goes through steamosctl/steamos-manager, whose Deck-hardware paths silently no-op on PS5 — UI stays at "Switching to Desktop..." with no actual swap. A small dbus monitor (steam-session-switch-listener.py) catches the Big Picture button signal.
  • No -steamos3 / -steampal: those trigger Steam's A/B update reboot loop on a non-Deck box. Dropped in favor of the dbus listener.
  • /etc/fstab: comments out the by-partsets A/B atomic mount entries (those device paths don't exist on a flat-rootfs flash) and appends a LABEL=-based /efi mount so the FAT boot partition comes up. Required for ps5-iw620-firmware.service to find the WLAN blob.
  • Kernel cmdline: appends amdgpu.dpm=0 amdgpu.gpu_recovery=0. modprobe.d alone isn't enough — amdgpu loads before the rootfs conf is read, so the cmdline is the only reliable path. Without it, Switch-to-Desktop produces a black screen on PS5 HDMI.
  • /home/deck ownership: recovery image leaves it root:root → Plasma can't write ~/.config on first launch.
  • sshd enabled + deck:deck password — so the box is reachable for iteration.
  • Polkit-deny reboot/poweroff for the deck user to break Steam's update reboot loop on first boot.
  • steam-jupiter OOBE patched to skip its rm -rf path (assumes Deck factory layout, wipes /home/deck/.local).

Test plan

  • Builds via the CI matrix
  • dd-flashed image boots on real PS5 (HW-rev EA-1102)
  • Autologin lands in gamescope (not Plasma)
  • Switch-to-Desktop button works (dbus listener fires, SDDM restarts cleanly)
  • Return-to-Gaming desktop shortcut works
  • sshd reachable
  • mlan0 brings up internal WiFi after ps5-iw620-firmware.service stages the blob
  • No Steam A/B update reboot loop

Files

  • distros/steamos/build-rootfs.sh (646 lines)
  • distros/steamos/README.md
  • distros/steamos/return-to-gaming-mode.desktop
  • distros/steamos/steam-session-switch-listener.{py,service}
  • build_image.sh: steamos → FORMAT="arch" (uses linux-ps5 pkg.tar.zst)
  • .github/workflows/build-image.yml: steamos added to options: + distros= list
## Summary Adds `--distro steamos` as a build target. Same pattern as `bazzite-deck` / `batocera`: `distros/steamos/build-rootfs.sh` fetches Valve's Steam Deck recovery image, extracts the rootfs into `\$CHROOT`, swaps in our `linux-ps5` kernel, rebuilds initramfs for PS5 amdgpu. ## PS5-specific fixes baked into the rootfs - **Switch-to-Desktop**: shim replaces `/usr/bin/steamos-session-select` with a direct SDDM-conf writer + sddm restart. The vendored helper goes through `steamosctl`/`steamos-manager`, whose Deck-hardware paths silently no-op on PS5 — UI stays at "Switching to Desktop..." with no actual swap. A small dbus monitor (`steam-session-switch-listener.py`) catches the Big Picture button signal. - **No `-steamos3` / `-steampal`**: those trigger Steam's A/B update reboot loop on a non-Deck box. Dropped in favor of the dbus listener. - **`/etc/fstab`**: comments out the `by-partsets` A/B atomic mount entries (those device paths don't exist on a flat-rootfs flash) and appends a `LABEL=`-based `/efi` mount so the FAT boot partition comes up. Required for `ps5-iw620-firmware.service` to find the WLAN blob. - **Kernel cmdline**: appends `amdgpu.dpm=0 amdgpu.gpu_recovery=0`. `modprobe.d` alone isn't enough — amdgpu loads before the rootfs conf is read, so the cmdline is the only reliable path. Without it, Switch-to-Desktop produces a black screen on PS5 HDMI. - **`/home/deck` ownership**: recovery image leaves it `root:root` → Plasma can't write `~/.config` on first launch. - **sshd enabled + `deck:deck` password** — so the box is reachable for iteration. - **Polkit-deny `reboot`/`poweroff` for the deck user** to break Steam's update reboot loop on first boot. - **steam-jupiter OOBE patched** to skip its `rm -rf` path (assumes Deck factory layout, wipes `/home/deck/.local`). ## Test plan - [x] Builds via the CI matrix - [x] dd-flashed image boots on real PS5 (HW-rev EA-1102) - [x] Autologin lands in gamescope (not Plasma) - [x] Switch-to-Desktop button works (dbus listener fires, SDDM restarts cleanly) - [x] Return-to-Gaming desktop shortcut works - [x] sshd reachable - [x] `mlan0` brings up internal WiFi after `ps5-iw620-firmware.service` stages the blob - [x] No Steam A/B update reboot loop ## Files - `distros/steamos/build-rootfs.sh` (646 lines) - `distros/steamos/README.md` - `distros/steamos/return-to-gaming-mode.desktop` - `distros/steamos/steam-session-switch-listener.{py,service}` - `build_image.sh`: `steamos` → `FORMAT="arch"` (uses `linux-ps5` `pkg.tar.zst`) - `.github/workflows/build-image.yml`: `steamos` added to `options:` + `distros=` list
Sign in to join this conversation.
No description provided.