winesapOS icon indicating copy to clipboard operation
winesapOS copied to clipboard

No audio on Steam Deck

Open LukeShortCloud opened this issue 1 year ago • 7 comments

Even installing linux-firmware-neptune does not re-enable audio support. I could not get the built-in speakers, USB-C headphones, or a 3.5mm wired headpones to work on my Steam Deck. We are now fully aligned with what Steam OS 3 uses as its audio library stack so this puzzles me even more.

LukeShortCloud avatar Jul 21 '22 05:07 LukeShortCloud

On linux-lts (currently 5.15.55-1), no audio input or output devices are detected. On linux-neptune (currently 5.13.0-valve15-1-neptune), only the microphone is detected.

LukeShortCloud avatar Jul 21 '22 06:07 LukeShortCloud

Linux Gaming Central let us know that we need this (currently unmerged) Linux kernel patch for audio to work: https://lkml.org/lkml/2022/7/22/181

LukeShortCloud avatar Aug 04 '22 02:08 LukeShortCloud

Just a quick FYI, that patch has been merged with linux-next, so it should be available in kernel 6: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b340128432a2b8849cc34f9653d7c43c83102bbd

linuxgamingcentral avatar Aug 04 '22 02:08 linuxgamingcentral

Good to know, thanks! I'll build linux-next from the AUR and see how the audio support is with it. Hopefully 6.0 will become the next LTS kernel or the patch at least gets backported.

LukeShortCloud avatar Aug 04 '22 03:08 LukeShortCloud

I built and installed linux-next-git on winesapOS 3.1.1. The speakers and headphone jack on the Steam Deck still do not work but at least my USB-C headphones finally work. I'm not sure what's wrong. It seems like we're missing a piece to this puzzle.

LukeShortCloud avatar Aug 05 '22 04:08 LukeShortCloud

I got in touch with the maintainer of the patch and they said this:

A quick workaround is to ensure the "Left/Right PCM Source" control in the audio mixer settings is set to ASP instead of DSP. Note this provides just a basic speaker sound functionality because the channels in a stereo media stream are not properly handled, i.e. left channel routed to right channel while original right channel stream is muted.

The proper setup should be provided via DSP, but that is currently not working due to a firmware issue for the speaker protection. This is currently under investigation, a fix will be provided soon.

No idea what they're talking about in regards to "Left/Right PCM Source" as I can't find it anywhere on Arch KDE, but it seems that once that is switched over to ASP, the sound should work. Documentation on this seems pretty scarce, so good luck if you can try this yourself.

linuxgamingcentral avatar Aug 09 '22 14:08 linuxgamingcentral

Very interesting. I have no idea what settings/configuration they are talking about, either. I'll do some additional research to see if I can find out. Glad to hear a fix is being worked on.

LukeShortCloud avatar Aug 11 '22 00:08 LukeShortCloud

Mark, I briefly talked to you about this earlier on Discord and wanted to make sure to document this here on GitHub.

I found on this Reddit post, that installing jupiter-hw-support gets sound to work. I installed that, rebuilt the initramfs for all Linux kernels with mkinitcpio -P, and rebuilt the GRUB configuration with grub-mkconfig -o /boot/grub/grub.cfg. Here are my findings:

Kernel Works?
linux-steamos Yes
linux-neptune Yes
linux [testing] (6.0) No
linux [current] (5.19) No
linux [archived] (5.18) No
linux-lts (5.15) No

Even for the kernels where it "works", it shows up as an audio device but nothing is being output. Another thing I noticed is that the jupiter-hw-support package installs a lot of random custom scripts and settings across the operating system. If we ship this package, we need to make sure it doesn't break anything.

The speaker also only works on the downstream Neptune kernel and is not upstreamed yet. That is disappointing.

I found a different Reddit post saying they got everything working on the Steam Deck, including the speakers, by using these packages. I need to double check that we are doing the same:

linux-neptune
linux-neptune-headers
linux-firmware-neptune
jupiter-hw-support
pipewire
pipewire-pulse
pipewire-alsa
pipewire-jack
pipewire-zeroconf
wireplumber
steamos-devkit-service
jupiter-validation-tools
jupiter-fan-control

LukeShortCloud avatar Oct 08 '22 04:10 LukeShortCloud

I'm updating this ticket from the email that I got from the Collabora maintainer of the audio patch. The patch will be merged with kernel 6.1. In the meantime, we can either use linux-next or incorporate the patch itself.

They also told me this patch may also require a tweaked ALSA UCM config file. I'm attaching the file they sent. This will need to be placed in /usr/share/alsa/ucm2/conf.d/acp5x/. HiFi.zip

linuxgamingcentral avatar Oct 08 '22 17:10 linuxgamingcentral

6.1-rc1 just came out, might be worth installing that and giving it a shot? https://www.phoronix.com/news/Linux-6.1-rc1-Released

linuxgamingcentral avatar Oct 17 '22 02:10 linuxgamingcentral

Thanks for the heads up! I'll give it a try when I get a chance. Looks like I can easily install this pre-built AUR package, too, which will make testing this quick and easy.

https://aur.archlinux.org/packages/linux-mainline https://wiki.archlinux.org/title/Unofficial_user_repositories#miffe

LukeShortCloud avatar Oct 17 '22 03:10 LukeShortCloud

I just tried 6.1.0-rc.1 with our soon-to-be-released 3.2.0-beta.0 build and no audio devices are detected on the Steam Deck. Still only linux-steamos/linux-neptune kernels show the output device, show that audio is playing, but nothing is actually physically being played. :-/

LukeShortCloud avatar Oct 20 '22 03:10 LukeShortCloud

We can finally get audio to work on the Steam Deck! Thanks for this great write-up, @linuxgamingcentral !

https://linuxgamingcentral.com/posts/audio-on-deck-support-outside-of-steamos/

LukeShortCloud avatar Feb 27 '23 16:02 LukeShortCloud

The required audio configuration files were upstreamed a month and a half ago but are not currently in any tagged/stable release.

https://github.com/alsa-project/alsa-ucm-conf/commit/6dd80aee34dbff85de5818b9181bb382dfe868ec

LukeShortCloud avatar Mar 18 '23 15:03 LukeShortCloud

A new release of alsa-ucm-conf is out (1.2.9) with the included configuartion for the Steam Deck! Combine that with a Linux 6.3 kernel for controller support (or a Neptune kernel from SteamOS), and that covers the last of hardware driver support needed for the Steam Deck.

https://github.com/alsa-project/alsa-ucm-conf/tree/v1.2.9

LukeShortCloud avatar May 17 '23 00:05 LukeShortCloud

The stable Arch Linux package for it has also already been updated a few days ago.

https://archlinux.org/packages/extra/any/alsa-ucm-conf/

LukeShortCloud avatar May 17 '23 00:05 LukeShortCloud

I can confirm that using Linux LTS 6.1 + that latest alsa-ucm-conf package works! Closing as sound support is working and will be shipped in winesapOS 3.3.0.

Thanks again @linuxgamingcentral for your help on this one!

LukeShortCloud avatar Jun 24 '23 21:06 LukeShortCloud