[qubes-users] No sound in XPS9310

I installed qubes on a Dell XPS9310. I was using kernel 5.4.90 and sound was working, but wi-fi did not. So I upgraded to kernel 5.10.13 and now I have both wifi and sound not working :smiley:

It seems that the sound issues are due to a problem with driver sof-audio-pci.

In this thread: https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM it turns out another user was having a similar problem with a dell 9700, which was apparently solved. Indeed in the thread it is said:

Audio works (with kernel 5.10 and attached kernel base-config patch + latest 1.6.1 sof-bin firmware https://github.com/thesofproject/sof-bin and alsa-ucm-config files. see https://blog.fts.scot/2020/07/04/dell-xps-2020-how-to-get-audio-working-on-linux/ for alsa ucm config ).

Unfortunately, I am not technically skilled enough to really understand the fix. Does it mean that I have to download kernel 5.10 (from were?), apply the patch provided in the thread (how?), include firmware and config files (how?) and then compile and install?
As you can see I donā€™t really have a specific question, and Iā€™m more in search of a few clarifications to understand how to apply an apparently already available solution. :slight_smile:

Fab

Fabrizio Romano Genovese:

I installed qubes on a Dell XPS9310. I was using kernel 5.4.90 and sound
was working, but wi-fi did not. So I upgraded to kernel 5.10.13 and now I
have both wifi and sound not working :smiley:

It seems that the sound issues are due to a problem with driver
sof-audio-pci.
In this thread: https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM it
turns out another user was having a similar problem with a dell 9700, which
was apparently solved. Indeed in the thread it is said:

Audio works (with kernel 5.10 and attached kernel base-config patch +
latest 1.6.1 sof-bin firmware GitHub - thesofproject/sof-bin: Firmware and topology binaries and
alsa-ucm-config files. see
Dell XPS 2020 ā€“ How to get audio working on Linux ā€“ mark g's blog
for alsa ucm config ).

Unfortunately, I am not technically skilled enough to really understand the
fix. Does it mean that I have to download kernel 5.10 (from were?), apply
the patch provided in the thread (how?), include firmware and config files
(how?) and then compile and install?
As you can see I don't really have a specific question, and I'm more in
search of a few clarifications to understand how to apply an apparently
already available solution. :slight_smile:

Per https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM, are you running Qubes 4.1? That might be the first place to start. It implements audio in a separate VM, which might automagically resolve the issue or at least make for a more easily implemented solution. In that case, you'll want your VM's kernel to be the latest, so in dom0 do sudo qubes-dom0-update kernel-qubes-vm-latest (from memory). See if the audio driver loads in the audio VM. If not, it gets more complex.

You could convert it to an HVM which would allow you to recompile the kernel internal to the VM using standard Linux procedures- check documentation for the distribution you're using. If you didn't want to convert to HVM, I think you would have to build a kernel for dom0 first per [qubes-users] HOWTO: Compiling Kernels for dom0, then package for VM usage with Redirectingā€¦ (note I haven't attempted this before).

Fabrizio Romano Genovese:

I installed qubes on a Dell XPS9310. I was using kernel 5.4.90 and sound
was working, but wi-fi did not. So I upgraded to kernel 5.10.13 and now I
have both wifi and sound not working :smiley:

It seems that the sound issues are due to a problem with driver
sof-audio-pci.
In this thread: https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM it
turns out another user was having a similar problem with a dell 9700, which
was apparently solved. Indeed in the thread it is said:

Audio works (with kernel 5.10 and attached kernel base-config patch +
latest 1.6.1 sof-bin firmware GitHub - thesofproject/sof-bin: Firmware and topology binaries and
alsa-ucm-config files. see
https://blog.fts.scot/2020/07/04/dell-xps-2020-how-to-get-audio-working-on-linux/
for alsa ucm config ).

Unfortunately, I am not technically skilled enough to really understand the
fix. Does it mean that I have to download kernel 5.10 (from were?), apply
the patch provided in the thread (how?), include firmware and config files
(how?) and then compile and install?
As you can see I don't really have a specific question, and I'm more in
search of a few clarifications to understand how to apply an apparently
already available solution. :slight_smile:

Per https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM, are you running Qubes 4.1? That might be the first place to start. It implements audio in a separate VM, which might automagically resolve the issue or at least make for a more easily implemented solution. In that case, you'll want your VM's kernel to be the latest, so in dom0 do sudo qubes-dom0-update kernel-qubes-vm-latest (from memory). See if the audio driver loads in the audio VM. If not, it gets more complex.

You could convert it to an HVM which would allow you to recompile the kernel internal to the VM using standard Linux procedures- check documentation for the distribution you're using. If you didn't want to convert to HVM, I think you would have to build a kernel for dom0 first per [qubes-users] HOWTO: Compiling Kernels for dom0, then package for VM usage with Redirectingā€¦ (note I haven't attempted this before).

I think your dell has different wifi and I think audio. The wifi driver for the xps 9310 is iwlwifi. Here is some firmware info: https://support.killernetworking.com/knowledge-base/killer-ax1650-in-debian-ubuntu-16-04/ and here is some qubes specific info on your wifi driver: https://github.com/QubesOS/qubes-issues/issues/5615

I think the audio is different too, as the xps 9700 needs the 5.10 kernel to work, but the base-config patch above does enable CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE which I think you need too.

To patch the kernel you must build it from source with qubes-builder https://www.qubes-os.org/doc/qubes-builder/. First configure it. Then change kernel to master branch in builer.conf. after the ā€œmake get-sourcesā€ is when you would patch with config-base in qubes-builder/qubes-src/linux-kernel.

fedora 33 5.10 kernel supports much more devices and audio works in the upstream fedora on both the 9700 and 9310 dells. Iā€™ll see if I can get a patch into qubes the upstream kernel modules which fedora has added or at the minimum the SOF stuff in the patch. Then all our audio will just work with qubes.

Rama McIntosh:

fedora 33 5.10 kernel supports much more devices and audio works in the
upstream fedora on both the 9700 and 9310 dells. I'll see if I can get a
patch into qubes the upstream kernel modules which fedora has added or at
the minimum the SOF stuff in the patch. Then all our audio will just work
with qubes.

Thanks for jumping in, Rama. It's difficult to troubleshoot hardware without hands-on.

I think your dell has different wifi and I think audio. The wifi driver for the xps 9310 is iwlwifi. Here is some firmware info: https://support.killernetworking.com/knowledge-base/killer-ax1650-in-debian-ubuntu-16-04/ and here is some qubes specific info on your wifi driver: https://github.com/QubesOS/qubes-issues/issues/5615

Alas, no, I really have the AX500. The AX1650 is waay much more well behaved and it is the one that is usually shipped on XPS developer edition. Unfortunately XPS developer edition does not have a 32GB RAM option, which was absolutely needed for me, being Qubes unbelievably ram hungry. So I was forced to purchase the model with the Killer AX500 T_T

I think the audio is different too, as the xps 9700 needs the 5.10 kernel to work, but the base-config patch above does enable CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE which I think you need too.

To patch the kernel you must build it from source with qubes-builder https://www.qubes-os.org/doc/qubes-builder/. First configure it. Then change kernel to master branch in builer.conf. after the ā€œmake get-sourcesā€ is when you would patch with config-base in qubes-builder/qubes-src/linux-kernel.

The sad thing is that audio worked perfectly on kernel 5.4ā€¦ Iā€™ll try to give a look to this by the end of the week, when Iā€™ll have a bit less work to do :slight_smile:

fedora 33 5.10 kernel supports much more devices and audio works in the upstream fedora on both the 9700 and 9310 dells. Iā€™ll see if I can get a patch into qubes the upstream kernel modules which fedora has added or at the minimum the SOF stuff in the patch. Then all our audio will just work with qubes.

That would be a wonderful, wonderful thing. In the meantime Iā€™ll try to learn how to compile my own kernels, my pc also tends to heat quite a lot and I suspect that a taylored kernel could make my overall experience better, correct me if Iā€™m wrongā€¦ :slight_smile:

About awokd suggestions: I tried to install 4.1 but the installer doesnā€™t boot on my machine. Also, Iā€™ve always been very unlucky with Qubes backups (traditionally I do them and they never work on restore), so Iā€™d gladly avoid having to reinstall everything right nowā€¦

I think your dell has different wifi and I think audio. The wifi driver for the xps 9310 is iwlwifi. Here is some firmware info: https://support.killernetworking.com/knowledge-base/killer-ax1650-in-debian-ubuntu-16-04/ and here is some qubes specific info on your wifi driver: https://github.com/QubesOS/qubes-issues/issues/5615

Alas, no, I really have the AX500. The AX1650 is waay much more well behaved and it is the one that is usually shipped on XPS developer edition. Unfortunately XPS developer edition does not have a 32GB RAM option, which was absolutely needed for me, being Qubes unbelievably ram hungry. So I was forced to purchase the model with the Killer AX500 T_T

I think the audio is different too, as the xps 9700 needs the 5.10 kernel to work, but the base-config patch above does enable CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE which I think you need too.

To patch the kernel you must build it from source with qubes-builder https://www.qubes-os.org/doc/qubes-builder/. First configure it. Then change kernel to master branch in builer.conf. after the ā€œmake get-sourcesā€ is when you would patch with config-base in qubes-builder/qubes-src/linux-kernel.

The sad thing is that audio worked perfectly on kernel 5.4ā€¦ Iā€™ll try to give a look to this by the end of the week, when Iā€™ll have a bit less work to do :slight_smile:

fedora 33 5.10 kernel supports much more devices and audio works in the upstream fedora on both the 9700 and 9310 dells. Iā€™ll see if I can get a patch into qubes the upstream kernel modules which fedora has added or at the minimum the SOF stuff in the patch. Then all our audio will just work with qubes.

That would be a wonderful, wonderful thing. In the meantime Iā€™ll try to learn how to compile my own kernels, my pc also tends to heat quite a lot and I suspect that a taylored kernel could make my overall experience better, correct me if Iā€™m wrongā€¦ :slight_smile:

By any chance, does everyone know if there are any news about these audio issues? Iā€™m updating the kernel to the latest version every week or so, but unfortunately sound is still not working :frowning:

Hello all,

I managed to finally install Qubes 4.1, but the audio problem is still not fixed. As awokd pointed out, in Qubes 4.1 I can define an audio-vm which, having fedora33, correctly recognizes my audio card.

I first tried the easy way: I created a sys-audio vm, and assigned the audio card to it. Unfortunately, the audio doesnā€™t really work smoothly: Playing youtube videos on sys-audio is very slow and the sound is continuously cackling.

Investigating things further, it seems that there is already some salt script I can use to create sys-audio. So I removed my sys-audio vm and I tried with

sudo qubesctl state.sls qvm.sys-audio
that lists two processes, one succeds and the other one fails. After this I have sys-audio again, but it is not used by default by any other vm. I tested with

qvm-prefs untrusted audiovm sysaudio

but audio still does not work. Youtube videos now do not really start. If I set audio back to dom0 and reboot the vm instead they do (but obviously I cannot hear anything given that dom0 has fedora32 which doesnā€™t like my card).

I feel like thereā€™s something very simple that I am missing. Am I maybe issuing the wrong salt command to set up sys-audio?

Cheers,
Fab

After a bit of time I had the opportunity to investigate this a bit further. Even running speaker-test on sys-audio results in the audio stammering, and sys-audio manages the device directlyā€¦ Could this be a problem between fedora33 and my sound card? What can I do to pinpoint the problem?

Any help is appreciated!
Fab