# How to install SteamOS' wifi, bluetooth, and audio drivers for steam deck oled into Ubuntu 23.10 # dependencies sudo sed -i 's/# deb-src/deb-src/g' /etc/apt/sources.list sudo apt update sudo apt install devscripts libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev \ libudev-dev libpci-dev libiberty-dev autoconf llvm faust libfaust2 lv2-dev libboost-dev \ qtbase5-dev ladspa-sdk liblilv-dev cmake libfreetype-dev libxrandr-dev libxinerama-dev libxcursor-dev sudo apt build-dep linux linux-firmware pipewire wireplumber alsa-ucm-conf apt source linux-firmware pipewire wireplumber alsa-ucm-conf # kernel + firmware : enables wifi + bluetooth and probably needed for part of audio too. # kernel 6.7 sudo apt install lz4 wget https://git.kernel.org/torvalds/t/linux-6.7-rc4.tar.gz wget -O batocera_kernel_config https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_x86_64-defconfig.config tar xvf linux-6.7-rc4.tar.gz mkdir batocera_kernel_patches cd batocera_kernel_patches/ wget \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/0001-wifi-ath11k-move-pci.ops-registration-ahead.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/0002-wifi-ath11k-add-support-for-QCA2066.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/01-linux_15khz.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/05-linux_15khz_amdgpu_pll_fix.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/06-linux_switchres_kms_drm_modesetting.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/07-linux-battery-quircks.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/08-linux-hda-Avoid-outputting-HDMI-audio-before-prepare.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/09-linux-usbhid-quircks.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/10-linux-wiimote-abs-not-hat.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/11-bluetooth-Align-minimum-encryption-key-size.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/12-fsync1_via_futex_waitv.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/13-winesync.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/14-fix-amd.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/16-steam-deck-l2-r2.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/18-ALSA-hda-cs35l41-Support-ASUS-2023-laptops-with-miss.patch \ https://raw.githubusercontent.com/batocera-linux/batocera.linux/bcf785e556c96b27339b9344c4b35fb635027d3c/board/batocera/x86/linux_patches/22-steam-deck-oled-bt-codec.patch sed -i 's/QCA2066\/hw2.1/QCA206X\/hw2.1/g' 0002-wifi-ath11k-add-support-for-QCA2066.patch cd ../linux-6.7-rc4 for i in $(ls ../batocera_kernel_patches/); do patch -p1 < ../batocera_kernel_patches/$i; done cp ../batocera_kernel_config .config sed -i 's/CONFIG_MODULE_SIG_ALL=y/CONFIG_MODULE_SIG_ALL=n/g' .config sed -i 's/CONFIG_BT=y/CONFIG_BT=m/g' .config make clean make bindeb-pkg -j8 sudo apt install ../linux-image-6.7.0-rc4_6.7.0-rc4-1_amd64.deb ../linux-headers-6.7.0-rc4_6.7.0-rc4-1_amd64.deb # kernel 6.1 wget https://gitlab.com/evlaV/linux-integration/-/archive/6.1.52-valve9/linux-integration-6.1.52-valve9.tar.gz gunzip linux-integration-6.1.52-valve9.tar.gz tar xvf linux-integration-6.1.52-valve9.tar cd linux-integration-6.1.52-valve9/ curl https://termbin.com/9wh9 > .config make clean make bindeb-pkg -j9 sudo apt install ../linux-image-6.1.52-valve9_6.1.52-valve9-1_amd64.deb ../linux-headers-6.1.52-valve9_6.1.52-valve9-1_amd64.deb # In this example the default Ubuntu kernel is still the default, so use the d-pad to switch # to the linux-6.1.52-valve9 kernel at boot in GRUB. This behavior can be changed to any other by configuring GRUB differently. sudo sed -i 's/GRUB_TIMEOUT_STYLE=hidden/GRUB_TIMEOUT_STYLE=menu/g' /etc/default/grub sudo sed -i 's/GRUB_TIMEOUT=0/GRUB_TIMEOUT=10/g' /etc/default/grub sudo update-grub cd # firmware wget https://gitlab.com/evlaV/linux-firmware-neptune/-/archive/jupiter/linux-firmware-neptune-jupiter.tar.gz cd linux-firmware-20230919.git3672ccab/ uupdate -v 20231201-neptune-jupiter ../linux-firmware-neptune-jupiter.tar.gz cd ../linux-firmware-20231201-neptune-jupiter sed -i 's/--zstd -19 //' debian/scripts/install-firmware sed -i '/WHENCE.ubuntu/d' debian/scripts/install-firmware debuild -b -uc -us sudo apt install ../linux-firmware_20231201-neptune-jupiter-0ubuntu1_amd64.deb cd # pipewire + wireplumber + alsa-ucm-conf + noise-suppression-for-voice + valve-hardware-audio-processing : # userspace audio drivers edited by Valve and/or different in Ubuntu from Arch Linux in ways that require tweaking # Together they enable internal speaker + microphone and 3.5mm external speaker + microphone # wireplumber: Valve fork of wireplumber. install before pipewire to avoid apt uninstalling the edited pipewire wget https://gitlab.steamos.cloud/jupiter/wireplumber/-/archive/0.4.14-dev23/wireplumber-0.4.14-dev23.tar.gz cd wireplumber-0.4.14/ uupdate -v 20231202-jupiter ../wireplumber-0.4.14-dev23.tar.gz cd ../wireplumber-20231202-jupiter debuild -b -uc -us sudo apt install ../wireplumber_20231202-jupiter-0ubuntu1_amd64.deb \ ../libwireplumber-0.4-0_20231202-jupiter-0ubuntu1_amd64.deb cd # pipewire: needs recompilation with lv2 enabled cd pipewire-0.3.79/ sed -i 's/echo yes/echo no/g' ./debian/rules debuild -b -uc -us sudo apt install ../libpipewire-0.3-0_0.3.79-2_amd64.deb \ ../libpipewire-0.3-common_0.3.79-2_all.deb \ ../libpipewire-0.3-modules_0.3.79-2_amd64.deb \ ../libpipewire-0.3-dev_0.3.79-2_amd64.deb \ ../libpipewire-0.3-modules-x11_0.3.79-2_amd64.deb \ ../pipewire_0.3.79-2_amd64.deb \ ../pipewire-alsa_0.3.79-2_amd64.deb \ ../pipewire-audio_0.3.79-2_all.deb \ ../pipewire-audio-client-libraries_0.3.79-2_all.deb \ ../pipewire-bin_0.3.79-2_amd64.deb \ ../pipewire-doc_0.3.79-2_all.deb \ ../pipewire-jack_0.3.79-2_amd64.deb \ ../pipewire-libcamera_0.3.79-2_all.deb \ ../pipewire-pulse_0.3.79-2_amd64.deb \ ../pipewire-tests_0.3.79-2_amd64.deb \ ../pipewire-v4l2_0.3.79-2_amd64.deb cd # alsa-ucm-conf : Valve's fork has the Valve-Jupiter-1.conf symbolic link removed cd alsa-ucm-conf-1.2.9/ sed -i '/gitignore/a \\trm \$(CURDIR)\/debian\/alsa-ucm-conf\/usr\/share\/alsa\/ucm2\/conf.d\/acp5x\/Valve-Jupiter-1.conf' debian/rules debuild -b -uc -us sudo apt install ../alsa-ucm-conf_1.2.9-1ubuntu3_all.deb cd # some of the pipewire plugins used by SteamOS git clone --recursive https://github.com/werman/noise-suppression-for-voice.git cd noise-suppression-for-voice/ cmake -Bbuild-x64 -H. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ninja -C build-x64 sudo ninja -C build-x64/ install # the rest of the pipewire plugins and the pipewire configuration used by SteamOS git clone --recursive https://gitlab.com/evlaV/valve-hardware-audio-processing.git cd valve-hardware-audio-processing/ curl https://termbin.com/hsq9 | git apply -v make sudo make install cd # reboot into newly installed kernel. for me everything works from this point on. sudo reboot ### IF AUDIO STILL NOT WORKING: ### # useful commands for troubleshooting audio # look for firmware loading errors sudo dmesg # in a large terminal, restart pipewire, then immediately check status several times rapidly to look for red errors that stand out systemctl --user restart pipewire.socket pipewire.service wireplumber.service pipewire-pulse.socket pipewire-pulse.service systemctl --user status pipewire.socket pipewire.service wireplumber.service pipewire-pulse.socket pipewire-pulse.service