Skip to main content

How the PS5 Bazzite Deck image is built

PS5 Bazzite Deck is built with the official ps5-linux-image builder, a kernel from Linux v7.3 plus rmuxnet's 7.3 patch set, and its own patches on top. This page is for anyone making an image: the kernel config changes it needs, the patch order, and the upstream repositories it tracks. Users don't need any of it.

Credits: Dasloh (suspend-to-idle, ps5-linux-patches PR #4), the ps5-linux project for the builder and the kernel.

Patch base

Linux v7.3 plus rmuxnet/ps5-linux-patches-1 meower at commit baee34d, then the image's patches in the order of build.sh. Each release ships a VERSIONS.md with the exact pins and a local-changes.diff with the changes to the builder.

Why Game Mode needs the BPF LSM and kernel BTF​

Bazzite's Game Mode starts Steam through the cardwired service, which loads an eBPF program. That needs two kernel features:

  1. The BPF LSM. CONFIG_BPF_LSM=y on its own does nothing; bpf has to be in CONFIG_LSM, or lsm=landlock,lockdown,yama,integrity,apparmor,bpf on the command line.
  2. Kernel BTF. CONFIG_DEBUG_INFO_BTF=y, so that /sys/kernel/btf/vmlinux exists.

Without them cardwired crash-loops with CardwireEbpfError(LSMNotEnabled) or error parsing /sys/kernel/btf/vmlinux, Gamescope is killed a second after it starts, and after five attempts Bazzite drops to the desktop. The same applies to any image that runs Bazzite's or SteamOS's Game Mode session. Confirmed; this was the reason Bazzite Game Mode never worked on the PS5 before.

CONFIG_MODULE_ALLOW_BTF_MISMATCH=y lets a kernel-only hotfix load the release's modules.

Kernel config changes​

Applied to the patch set's .config before the build:

OptionValueWhy
CONFIG_LSMlandlock,lockdown,yama,integrity,apparmor,bpfGame Mode, above
CONFIG_DEBUG_INFO_BTFyGame Mode, above
CONFIG_MODULE_ALLOW_BTF_MISMATCHyHotfix kernels keep loading release modules
CONFIG_MT7921EmMediaTek Wi-Fi on the Slim (the official config has it since kernel 7.2.3)
CONFIG_USB_AUTOSUSPEND_DELAY-1USB never sleeps: the Bluetooth chips and the Salina xHCI don't survive it
CONFIG_LOG_BUF_SHIFT201 MiB boot log, so the early HDMI chip and Pro firmware lines don't scroll out of reports
CONFIG_PS5_GPUFREQnot setrmuxnet's GPU clock driver, replaced by upstream #66's governor
CONFIG_LOGITECH_FF and the other Logitech _FF optionsyWheel force feedback

Patch order​

The order matters: later patches are written against the tree state the earlier ones leave. Grouped as build.sh applies them:

  1. Builder and Wi-Fi driver: the out-of-tree IW620 driver gets its kernel 7.2 and 7.3 compatibility patches, and the builder mounts the patches directory so the VCN firmware is found.
  2. Base kernel: linux.patch from meower, with ps5-linux-patches PR #4 (suspend-to-idle) applied to the patch set first.
  3. Bluetooth: MediaTek endpoint fix.
  4. HDMI: upstream HDR/SCDC/hotplug port, re-arm, output fixes, modes, debug log, link lock, CEC, sleep mute, SCDC Source Version, USB-C DP, RGB range, EDID fallback and keep, VERDE game content, session switch, RGB range encoding, USB-C DP opt-in. Explained on HDMI chip.
  5. Fan and GPU overlay: hwmon fan driver, gpu_busy_percent and a temperature for overlays. See Fan control.
  6. VRR and FRL: VRR, its stock-setup, follow-guard, 48 Hz floor and HDMI-only rules; 4K120 over FRL and its guard; the 100 Hz test modes; SCDC TMDS_Config.
  7. PS5 Pro: GPU (#58), Bluetooth, no frequency drivers, upstream #66. See PS5 Pro.
  8. IW620 LE reconnect.

The exact list with one-line descriptions is in build.sh, section 3; every patch file starts with a description of what it does and why.

Files baked into the image​

Not kernel changes, but an image needs them too: a stable MAC for NetworkManager on the IW620, udev rules that keep the Bluetooth chips and the Salina xHCI powered, the DefaultDependencies=no drop-in for ps5-stage-firmware.service (see Modules or sysctl settings not loading), the Linux-only Bluetooth address and connectable services (see Bluetooth), hidp loaded at boot, the warm-reboot units (see Restart straight into Linux), and the Pro firmware staging (see PS5 Pro). All under files/.

Upstream repositories to track​

RepositoryWhat it carries
ps5-linux/ps5-linux-patchesThe official kernel patches (7.2.x): Pro GPU, fan curve, HDMI work, VCN
rmuxnet/ps5-linux-patches-1 (meower)The 7.3 port the image builds on
Slip-Up/ps5-linux-patchesSlip's HDMI work: native FRL, ALLM, modes
ps5-linux/ps5-linux-mwifiexThe IW620 Wi-Fi driver
ps5-linux/ps5-linux-imageThe image builder, including Pro GPU firmware staging
QuartConz/ps5-pro-viola-bluetooth, WizGery/ps5-mediatek-fixesPro and Slim Bluetooth

Build it yourself​

Linux or WSL with Docker and about 60 GB free. It takes a couple of hours (kernel compile plus the Bazzite download):

git clone https://github.com/VivaLaVent/ps5-bazzite-deck
cd ps5-bazzite-deck
bash build.sh

The output lands in ~/ps5-build-7.3/output/.