update 24/4: Apparently everything is broken on ubuntu 21.04 because of kernel options. someone helpfully posted instructions on recompiling your kernel here: https://blog.fts.scot/2020/07/04/dell-xps-2020-how-to-get-audio-working-on-linux/#comment-356 – it should actually be possible to make a dkms module for this that can be installed in the same way as below, if anyone feels up for it i’ll post a link.
update 16/12: Linux 5.10 has these drivers available out the box, the arch and manjaro repos now have the required config options enabled by default so the easiest thing to do would be up to date on your packages. minimum versions listed below
Recently took delivery of a Dell XPS 17 9700 to replace my “workhorse laptop”, of course intending to use Linux as the only operating system. Before doing anything at all I reformatted the disk and installed Manjaro before realising that the audio drivers are not yet in the mainline Linux kernel nor is the audio device really supported by any of the stable releases from the wider audio ecosystem (specifically alsa or pulse).
Long story short, before starting, you should understand that you’ll be running the very latest kernel, compiling a module for it and setting your package manager to use unstable repos, and still having to copy in files anyway, and there are risks associated with that. So if you feel like you can wait until Pulseaudio 14 and Linux 5.10 come out – I would recommend that!
(update 5/7: If you’re wanting to stay on Ubuntu 20.04 I have been informed by someone at Canonical that you can apt install linux-oem-20.04
and the drivers should work (i.e. you’ll see lots of devices in alsamixer) without doing the DKMS steps, which is good, but you will still require to get the latest alsa, pulseaudio and ucm yourself to make it all work.)
I have been able to get this working on Manjaro with Linux 5.7, 5.8 and 5.9 with the following other software:
- pulseaudio-alsa 1.2.2
- pulseaudio 13.99
- alsa 1.2.3 including alsa-ucm-conf 1.2.3
- dkms
- sof-firmware 1.5.1 or 1.6
To build the driver on 5.7:
git clone https://github.com/maaarghk/soundwire-dkms
sudo mv soundwire-dkms /usr/src/soundwire-1.3.0
sudo dkms add soundwire/1.3.0
sudo dkms build soundwire/1.3.0
sudo dkms install soundwire/1.3.0
This is based on this Ubuntu package, which has patches with the Dell XPS hardware IDs added on top of the driver from here. It previously targeted 5.0 so I applied some patches for higher kernel versions than that.
To build the driver on 5.8 or 5.9:
git clone https://github.com/maaarghk/soundwire-dkms
git checkout latest-sofproject
sudo mv soundwire-dkms /usr/src/soundwire-1.4.0
sudo dkms add soundwire/1.4.0
sudo dkms build soundwire/1.4.0
sudo dkms install soundwire/1.4.0
This driver comes directly from Intel’s thesofproject repo with the only patches being related to dkms and old kernel configs.
Once the driver is built it is worth rebooting and checking alsamixer to see if you have more than 6 outputs – maybe need to press f6 to switch to sof-soundwire – there should be faders for Headphones / Speaker and not just HDMI ports. If you only have HDMI ports something has gone wrong, dmesg | grep 'snd\|soc\|sof'
.
If you have an error about symbol version disagreements, probably your kernel has an old sof driver which should be disabled by creating /etc/modprobe.d/no-builtin-soundwire.conf
with the contents blacklist snd_soc_skl
.
Anyway, that’s not the whole story, alsa also needs ucm files to know how to interact with the driver. Those are not even merged into unstable alsa-ucm-conf yet so the following changes are liable to break / require repeating at some stage. Price you pay for living on the edge, it’s just like the olden days of Linux.
git clone https://github.com/thesofproject/alsa-ucm-conf
sudo cp -r alsa-ucm-conf/ucm2/sof-soundwire /usr/share/alsa/ucm2
sudo cp -r alsa-ucm-conf/ucm2/codecs/rt5682 alsa-ucm-conf/ucm2/codecs/rt700 alsa-ucm-conf/ucm2/codecs/rt711 alsa-ucm-conf/ucm2/codecs/rt715 /usr/share/alsa/ucm2/codecs
alsaucm open sof-soundwire
alsaucm reload
Here’s hoping the exasperated sounding lead dev on this repo successfully completes a code review without popping a vein and these changes make it upstream sooner rather than later!
Using pulseaudio-git you may find that pulseaudio does not start up automatically, the solution to that is simple:
systemctl --user enable pulseaudio
Cheers to reddit user /u/yoyoyomama1 who gave me many clues by answering a barrage of messages asking for conf files off his system. I would have been unlikely to work this out without that help.
p.s. Whilst I’m here, brief review of the laptop – very good. Feels really solid, haven’t had any of the QC issues mentioned by anyone else. The 4k screen is really nice, and I have been very impressed by the battery life – for example I started working on this about 6 hours ago and it has involved several code compilations and many restarts, and my battery life is still above 30%. It helps that the screen is so bright that I can run it at 10% brightness and still feel like it is burning my eyes.
Daniel A
2020-07-04 — 22:39
Working like a charm! Thanks for posting this, I really appreciate it. Asides from no audio, this laptop has been a dream.
Have you had any problems with using S3 deep sleep? Whenever I enable it and my laptop suspends, it can’t wake back up.
Noticed you had steam installed too, how’s your gaming performance? I’ve setup nvidia PRIME and get decent frame-rates using the proton ge build but feel like it could be a bit better.
Thanks again, from a fellow Scot 🙂
mark
2020-07-04 — 22:47
alright, yeah I have had issues with that. Someone with the Precision laptop tells me there are many vendor specific patches pre-installed on it, Audio is just the one I cared about. Hopefully they make their way upstream to the kernel soon enough. Deep sleep would be good, I’ve tested it and lost 30% overnight a couple days ago, not good.
I haven’t tried out any gaming yet because it felt a bit pointless without audio and I’ve been busy today. I did notice when I had nvidia PRIME on ubuntu my battery was draining much faster even in Hybrid mode, which was disappointing, but again hopefully something that updated drivers or BIOS might help with down the line…
But aye, ultimately I do agree with your overall comment, there is really not much wrong with this, if I had stuck with Windows I doubt I would have a single complaint.
cheers,
M
Takis
2020-07-09 — 03:45
Hi Scot,
Can you please share how comfortable are the surface temperatures for the skin when:
– idle for a few minutes
– light load and web surf
– do more intensive tasks (i.e. rendering, code compiling, gaming etc)
There have been critiques that even with moderate load is warm.
Thank you
mark
2020-07-09 — 23:45
I have not found any issue with this at all, it was getting slightly warm when I was using it atop a cushion and all the vents were covered, when I would lift it it would cool down within 30 seconds.
mark
2020-07-04 — 23:04
Just saw this -> https://www.reddit.com/r/Dell/comments/hla8yk/how_to_enable_s3_deep_sleep_on_xps_17_9700_in/
Daniel A
2020-07-04 — 23:14
Good spot, going to try this tonight
Daniel A
2020-07-05 — 12:03
Didn’t have any luck with this, did you? Think my GPU might have something to do with it.
thatyoyo
2020-07-05 — 11:55
Hey Scot, thank you for your work! You forgot a `c` in your command:
“`
sudo p -r alsa-ucm-conf/ucm2/sof-soundwire /usr/share/alsa/ucm2
“`
mark
2020-07-05 — 14:11
thanks!
Lee Ng
2020-07-05 — 15:30
hi, Thanks for your guide. However, I dont know why I cannot get it work. My system is ubuntu 20.04 with kernel 5.7.7
However, after install the build, I run alsamixer and there is only hda nvidia with 6 output (all are s/pdif). I chose select soundcards and there is only hda nvidia as an option
artur
2020-07-08 — 22:15
I’m getting
`variable ‘${CardComponents}’ is not defined in this context!`
after
`alsaucm open sof-soundwire`
mark
2020-07-09 — 23:46
You probably need a newer version of alsa-ucm-conf
Daniel
2020-07-09 — 23:44
Im on rhw 5.8 kernel and im using the sof drivers, but now im working on this issue when trying to load the ucm info:
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.3.2/work/alsa-lib-1.2.3.2/src/ucm/ucm_subs.c:368:(uc_mgr_get_substituted_value) variable ‘${CardComponents}’ is not defined in this context!
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.3.2/work/alsa-lib-1.2.3.2/src/ucm/main.c:983:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -22
alsaucm: error failed to open sound card sof-soundwire: Invalid argument
mark
2020-07-09 — 23:46
You probably need a newer version of alsa-ucm-conf
Jac
2020-07-11 — 04:26
I had the alsa lib variable ‘${CardComponents}’ is not defined in this context! error downloaded alsa-lib from git and switched to ucm2 branch and installed to /usr/lib and linked to /lib still got:
sudo alsaucm open sof-soundwire
ALSA lib parser.c:1466:(parse_master_file) uknown master file field Syntax
ALSA lib conf.c:812:(get_char_skip_comments) Cannot access file sof-soundwire/Hdmi.conf
ALSA lib conf.c:1881:(_snd_config_load_with_include) _toplevel_:31:25:No such file or directory
ALSA lib utils.c:285:(uc_mgr_config_load) could not load configuration file /usr/share/alsa/ucm2/sof-soundwire/HiFi.conf
ALSA lib parser.c:1176:(parse_verb_file) error: failed to open verb file /usr/share/alsa/ucm2/sof-soundwire/HiFi.conf : -2
ALSA lib main.c:957:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -2
alsaucm: error failed to open sound card sof-soundwire: No such file or directory
on arch linux 5.7.7-arch-1-1
I really appreciate you putting the effort on writing this post but it was quite difficult to follow what you wrote and I discovered few things wrong/missing:
sudo rm -rf /usr/src/soundwire-dkms this should be sudo rm -rf /usr/src/soundwire-1.3.0
you missed installing alsa-utils that includes alsamixer
other stuff I don’t remember 😀
If you have suggestions let me know
mark
2020-07-11 — 09:49
Hey, someone on Reddit just commented the CardComponents error is actually indicating it is alsa-lib that needs updated.
Daniel
2020-07-12 — 00:25
my issue was that i was missing some kernel modules. so i enabled everything the dkms conf wanted and now i have sound yay. however i still get this on alsaucm reload:
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.3.2/work/alsa-lib-1.2.3.2/src/ucm/main.c:983:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
alsaucm: error failed to open sound card hw:0: No such file or directory
not sure if this is actually causing a problem since i have sound. bass does seem weak though
mark
2020-07-13 — 06:33
Hmmmm, when I downgraded all my packages to stable the other day I remember I had kinda weak bass and the sound felt sort of like it was coming mostly from the right speaker. I get the feeling there must be something I’ve missed in the list of software versions to check :/ if you work it out, would be good to know – someone else suggested alsa-utils?
Jac
2020-07-12 — 23:50
I tried both alsa-lib 1.2.3.2-1 and alsa-lib 1.2.2 and if you read my comment you would know I even downloaded the latest version of alsa-lib from github and installed it manually and got a different error anyway.
mark
2020-07-13 — 06:29
Looking at this specifically: “uknown master file field Syntax” seems like perhaps your version of alsa-ucm-conf doesn’t support ucm2 files, maybe worth upgrading that. I got it from arch unstable repos
Jac
2020-07-13 — 17:11
You didn’t get it, I tried:
alsa-lib, extra, extra unstable, git branch master, git branch ucm, past commits, skipping the if in the source code and recompiling and nothing worked.
alsa-ucm-conf, extra, extra unstable and it didn’t work
And also other solution with the other dependencies and libs.
I tried editing the source code as much as my knowledge allowed me, compiling old commits, compiling master, compiling other branches, installing from extra, installing from extra unstable and a lot of other stuff.
I tried to look at the date the commits were made to revert at the situation the repos probably were when you wrote this article, looked at your repo and see what you did etc…
I tried many things but I am probably missing what has changed or what I do wrong but tried the same steps over and over with no success.
mark
2020-07-14 — 07:51
Stick your dmesg output in a pastebin?
Jac
2020-07-15 — 21:26
Upgraded to 5.7.8-arch1-1 and audio worked automagically o.O
Jonathan
2020-07-13 — 08:25
After the soundwire dkms steps, alsamixer is stating that there are no soundcards.
/proc/asound/cards — no soundcards
Any idea what I may be missing?
mark
2020-07-13 — 10:45
Not sure, there may be some clues in `dmesg`
Jonathan
2020-07-14 — 03:44
For snd, I get module verifcation failed: … – tainting kernel
While for audio:
sof-audio-pci 0000:00:1f.3: Direct firmware load for intel/sof/sof-cml.ri failed with error -2
sof-audio-pci 0000:00:1f.3: error: request firmware intel/sof/sof-cml.ri failed err: -2
sof-audio-pci 0000:00:1f.3: error: failed to load DSP firmware -2
mark
2020-07-14 — 07:44
Kernel taint is expected. Looks to me like sof-firmware package is missing, (which I noticed was not listed in the blog post, so I added it)
Jonathan
2020-07-14 — 18:10
I added sof-firmware and audio is working now. Thanks for the help!
mark
2020-07-14 — 18:33
Np, apologies my omission!
Daniel
2020-07-14 — 02:00
Some other things i’ve seen with this laptop:
I have to disable turbo boost to keep thermals at a reasonable level
USB-C charging sometimes fails and requires a reboot to work again
I started a discord server to talk about this laptop if anyone is interested https://discord.gg/fYJdwt5
Carl
2020-07-14 — 02:48
Are there perhaps some steps missing in these instructions? I tried both on Linux 5.7 and compiling / installing the dkms module as well as moving to Linux 5.8 which has the soundwire module built in. In both cases the soundwire module is not loaded on boot and alsa doesn’t see the device.
Is there a step missing? Do I need to modprobe the module or blacklist snd-hda-intel which _is_ loaded? I also notice that snd-hda-intel outputs a “no codecs initialized” to the kernel log when loaded. Is that relevant? I feel like there’s something simple I’m missing here.
Thanks!
Carl
2020-07-14 — 03:33
I should mention I’m running an Arch derivative (Artix) and have the same versions of the software installed as in the article. Thanks!
mark
2020-07-14 — 07:49
The driver responsible for choosing whether to use snd-hda-intel or snd-sof-pci is snd-intel-dspcfg. The hardware IDs for this laptop must not have made it upstream to 5.8 if you’re still having problems with that. It might be sufficient to add a file in modprobe.d with:
options snd-intel-dspcfg dsp_driver=3
Carl
2020-07-14 — 19:00
Thanks for the response. Adding that option to snd-intel-dspcfg did not make any difference. The soundwire module does not get loaded by the system and manually loading it doesn’t make a difference. Building the driver for the 5.7 kernel with DKMS goes fine as does installing the 5.8 kernel with the driver. The only sound devices I see are the HDMI devices but nothing for the internal speakers or mic.
Here are some details of my system under kernel 5.7. Maybe you’ll see an issue somewhere:
[carl@clip ~]$ uname -a
Linux clip 5.7.6-artix1-1 #1 SMP PREEMPT Thu, 25 Jun 2020 16:01:13 +0000 x86_64 GNU/Linux
[carl@clip ~]$ pacman -Q pulseaudio-alsa pulseaudio-git sof-firmware alsa-lib alsa-ucm-conf alsa-firmware
pulseaudio-alsa 1:1.2.2-2
pulseaudio-git v13.99.1.60.g0e691b966-1
sof-firmware 1.5.1-1
alsa-lib 1.2.3.2-1
alsa-ucm-conf 1.2.3-2
alsa-firmware 1.2.1-2
[carl@clip ~]$ dmesg|grep sof-
[ 9.746806] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 9.746938] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 9.747005] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 9.753930] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 9.827642] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[ 9.827643] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 9.951894] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:5:1-88707
[ 9.951896] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:16:0 Kernel ABI 3:13:0
[ 9.951896] sof-audio-pci 0000:00:1f.3: warn: FW ABI is more recent than kernel
[ 9.952337] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 3 size 0x1c
[ 9.952357] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 4 size 0x10
[ 9.961528] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:16:0 Kernel ABI 3:13:0
[ 9.961529] sof-audio-pci 0000:00:1f.3: warn: topology ABI is more recent than kernel
[ 9.961532] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[ 9.961533] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[ 9.963458] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[ 9.963460] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[ 9.964630] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[ 9.965921] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[ 9.968142] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[ 9.988606] input: sof-hda-dsp HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input22
[ 9.988665] input: sof-hda-dsp HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input23
[ 9.988699] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input24
[carl@clip ~]$ dmesg | grep soundwire
[carl@clip ~]$ lsmod | grep soundwire
[carl@clip ~]$ sudo modprobe soundwire-intel
[carl@clip ~]$ dmesg | grep soundwire
[carl@clip ~]$ lsmod | grep soundwire
soundwire_intel 24576 0
soundwire_cadence 32768 1 soundwire_intel
soundwire_bus 61440 2 soundwire_intel,soundwire_cadence
snd_soc_core 299008 8 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_skl,snd_soc_dmic,snd_soc_skl_hda_dsp
snd_pcm 147456 12 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
[carl@clip ~]$ cat /sys/module/snd_intel_dspcfg/parameters/dsp_driver
3
[carl@clip ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: sofhdadsp [sof-hda-dsp], device 1: HDMI1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 2: HDMI2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 3: HDMI3 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
mark
2020-07-15 — 11:05
Are you definitely running the dkms module? What’s in
/lib/module/$(uname -r)/updates/kernel
?I would expect this:
sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
to read as this:
sof-audio-pci 0000:00:1f.3: SoundWire machine driver sof_sdw topology sof-cml-rt711-rt1308-rt715.tplg
It would be the hardware IDs missing from the module that would result in that, what’s the result of:
lspci -vvnnn | grep -A11 "1f.3"
Carl
2020-07-15 — 14:16
> Are you definitely running the dkms module? What’s in /lib/module/$(uname -r)/updates/kernel?
Bingo! (Facepalm)
I must have somehow either forgotten to do “dkms install” or maybe I did a “dkms uninstall” and forgot. Or something. Maybe this is what happens when you hit 50. Not sure why kernel 5.8 didn’t work but I’ll look at that next.
Thank you very much for your time and effort. I’m happy to report that it’s working well. It’s not a Macbook Pro but this laptop definitely sounds **much** better in Linux than it does in Windows.
Daniel
2020-07-14 — 13:48
Make sure you have the sof firmware
Carl
2020-07-14 — 19:02
Thanks for the reply. I do have package sof-firmware installed.
corenion
2020-07-15 — 10:54
Oh man guys I made a big mistake.
So I am on Manjaro and enabled testing repos and followed everything. And the speakers work now. (Testing already has the necessary lib)
What does not work anymore is bluetooth headphones. I think that is because I tried to `yay -S pulseaudio-git` which failed to install. However it already seems to have messed with my system. By removing some conflicting packages. The only thing I can remember is that it removed `jack` in favor of `jack2`.
So I explicitely reinstalled jack with pacman, but still bluetooth does not work. I can connect via bluetooth but headphones are not an output source.
If anyone knows how I could undo whatever that yay command attempted, that would be really great!
Kernel version is 5.7.8.6.
mark
2020-07-15 — 10:56
If you’re on manjaro, maybe pamac-manager can suggest some kind of automatic resolution. Nothing wrong with jack2 and also I doubt you need it installed to make BT headphones work. Do you have blueman installed? Maybe open blueman-manager and connect to the headphones frm there and check what audio profiles are avaialble? Sorry, not really too sure apart from that.
corenion
2020-07-15 — 17:05
Hey thanks, yep have blueman installed. Really weird. Maybe it’s the new kernel, but I doubt it. Mh will try out more things. Thanks!
mark
2020-07-15 — 17:18
hmm, I have pulseaudio-git and blueman installed and no pulseaudio-bluetooth things and it works fine, do you get audio profiles in blueman-manager when you connect the headphones that way?
corenion
2020-07-15 — 17:46
Okay after checking bluetooth.service’ status I saw: “rfcomm_bind: address already in use” and after some googling I solved it by doing:
sudo rfkill block bluetooth
sudo rfkill unblock bluetooth
sudo systemctl restart bluetooth
The weird thing is that this persisted throughout reboots. Weird. Now everything is working.
A word of advice to others: My (cable) headphones did not work initially and I had to manually unmute that level in alsamixer.
Thanks Marc!
corenion
2020-07-16 — 10:32
I rejoiced too early. I still am having problems after reboot. And the fix is not as clear cut as I thought. Sometimes it does not work and I have to try the rfkill/restart several times or change the order.
I have the feeling that there is another bluetooth process hogging onto the default one. Not sure what is happening. That is the relevant output from journalctl if anyone has an idea.
I would appreciate if someone could tell me how I just reinstall (so clean and install) the pulseaudio/bluetooth stuff. Or how I check if there is another process trying to compete for bluetooth.
“`
bluetoothd[1343]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
bluetoothd[1343]: RFCOMM server failed for :1.109/Profile/HSPHSProfile/00001108-0000-1000-8000-00805f9b34fb: rfcomm_bind: Address already in use (98)
“`
corenion
2020-07-16 — 17:07
Okay people, thanks for hanging in there, I found the culprit and solution for my issue:
So I saw that there where two pulseaudios running:
`ps aux | grep pulseaudio`
One from my user and one from `gdm`.
So for whatever reason GDM started a pulseaudio and my user did. As far as I could see this should not happen with current gnomes, but possibly this messing around with the drivers caused this to happen.
So to prevent GDM to start its own pulseaudio, I followed this section on the archwiki:
https://wiki.archlinux.org/index.php/Bluetooth_headset#Gnome_with_GDM
Now everything is working, speakers and bluetooth. Yay!
nsx2brz
2020-07-21 — 16:29
Ubuntu 20.04 instructions based on the above…
1. Download and install dkms module:
https://launchpad.net/~canonical-hwe-team/+archive/ubuntu/pc-oem-dkms/+packages
Alternately, you can install linux-oem-20.04, it will install the 5.6 kernel with the above driver. Your system may be more stable with 5.4 kernel since it is in wide use.
2. Manually install sof-firmware from Arch Linux:
https://archlinux.pkgs.org/rolling/archlinux-extra-x86_64/sof-firmware-1.5.1-1-any.pkg.tar.zst.html
You will need to delete/overwrite the existing “sof” and “sof-tplg” files from the Ubuntu linux-firmware package. Note if this package gets updated from Canoncial and they don’t update these, you will have to reextract.
3. Manually install the ucm2 files:
https://github.com/thesofproject/alsa-ucm-conf
You will need to add:
sof-soundwire
codecs/rt5682
codecs/rt700
codecs/rt711
codecs/rt715
These go into /usr/share/alsa/ucm2
4. Hand edit sof-soundwire/sof-soundwire.conf, remove all the codec lines except for:
5. Reboot
You should now have all your audio devices available.
mark
2020-07-21 — 16:57
Nice one man! Think you missed out some details under step 4 though 🙂
Apologies to bill gates for this email.
nsx2brz
2020-07-21 — 18:33
For step 4, you will need to leave in the line
codecs/rt711/init.conf
LOL, I am terrible at HTML stuff…
nsx2brz
2020-07-23 — 16:00
I think now that sof-soundwire.conf should not have any codec lines in it – the codecs get conditionally loaded later on in the script due to multiple chipsets. I deleted all the codec lines from mine and it still works fine. Probably needs to be updated in the git source if I am correct…
lexx
2020-08-16 — 09:21
Dear nsx2brz, Thank You for posting this! I am trying to solve the eact issue you are describing! I am very new to linux trying to get away form microsoft, and now running dual boot of Ubuntu and windows 10.
Would it be possible for you to explain me the steps on your post, because I am so new, I do not know how to do some of them. Manually install sof-firmware from Arch Linux:
https://archlinux.pkgs.org/rolling/archlinux-extra-x86_64/sof-firmware-1.5.1-1-any.pkg.tar.zst.html, I just downloaded the pacet and extracted it, than replace the directories with the files. Did I do it right?
Would you be so kind ad help?
Sincerely,
lexx
nsx2brz
2020-08-26 — 01:20
Try my post on Reddit, has some updated instructions if you are still having trouble:
https://redd.it/husu3r
flavius
2020-08-19 — 18:16
Superb
tode
2020-08-20 — 13:58
Thank you mark and nsx2brz, great guide, my ubuntu 20.04 works fine. Except for the microphone. I can’t figure out how to make microphones (internal and headset) working,
any help?
Brandon Arnold
2020-07-28 — 23:00
Hey all. Many thanks to Mark for getting it working!
I had been following this issue, but ordered a 9700 the other day anyway. I’m probably going to go the easy route and wait for the driver to work it’s way downstream into core Arch, though.
What needs to happen for that? Is there anyone I need to bug to bring this to their attention, or are the wheels already in motion?
eli
2020-07-30 — 22:30
Hey, thanks so much for putting this together! I just got the spec’d out 5750 on tuesday and getting the sound to work has been the bane of my existence. Following your guide I finally have the headphone jack working. I needed to use `options snd-intel-dspcfg dsp_driver=3` instead of `=1` as seen elsewhere on the web.
Now that the sound card is recognized and the headphone jack works, alsamixer shows sof-soundwire device and my speaker hardware is recognized, but doesnt make any sound. Any thoughts? With no headphones plugged in, I have the choice between Speakear and Multichannel Output
other oddities: the inline mic doesnt work on headphones; i cant get headphones to connect via bluetooth.
thanks again
Tom
2020-07-31 — 15:28
Hey Scott, I know you are not the owner of this problem, but do you have any idea about the current status and what needs to be fixed?
Like you I am on Manjaro.
Are there already releases (e.g. in testing) that we can wait for and when we see soundwire-sof-version x.x.x and alsa-ucm version y.y.y we can revert all our fixes we made here and just update all packages and things just work?
mark
2020-07-31 — 15:38
Hey. You could update lists to unstable, update just these packages, and go back to stable, and they will only update once a newer version comes out, they won’t downgrade unless you ask.
Tom
2020-07-31 — 15:42
I did that once with testing branches to get some of the important packages.
But are you saying that unstable already has all other necessary packages right now? (So I can uninstall the dkms module and remove the alsa-ucm files?)
Tom
2020-07-31 — 15:51
(Sorry for double post)
Do I just have to wait for kernel 5.8?
Looking at the alsa-ucm-conf Github repo it looks that they merged the necessary PR on June 24 but the latest release is from beginning of june. But I don’t know which of these things come with the kernel and which must come from additional (alsa? sof?) packages.
mark
2020-08-01 — 06:16
ah, right, no you still would need to compile dkms and manually add files to ucm conf. i would honestly suggest to do it, the difference between kernel 5.8 and the dkms repo I posted is pretty big so I wouldn’t really be surprised if it didn’t work out the box…
Mitch
2020-08-12 — 18:29
Is there any possibility Manjaro will pick all the stuff up it needs to work out of the box? Would that be 1 month? 6 months?
Manuel Pasieka
2020-08-14 — 16:29
Hi!
how relevant are the instructions discussed in the comment section, with a 5.8 kernel?
I have a ubuntu 20.04 and upgraded the kernel to 5.8. In addition I followed tine nsx2brz from 2020-07-21 and installed the sof-firmware from arch linux.
If i understand the lspci output correctly, my sound card is detected, but still i am without audio.
$ sudo lspci -vvnnn | grep -A11 “1f.3”
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Comet Lake PCH cAVS [8086:06c8]
Subsystem: Dell Device [1028:098f]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Latency: 64
Interrupt: pin A routed to IRQ 202
Region 0: Memory at 609b118000 (64-bit, non-prefetchable) [size=16K]
Region 4: Memory at 609b000000 (64-bit, non-prefetchable) [size=1M]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D3 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME-
Capabilities: [80] Vendor Specific Information: Len=14
Using alsamixer, i can see PGA 2.0, 3.0, 4.0
Which devices are those?
thx,
Manuel
Thibault D
2020-08-15 — 10:32
Thank you for this!
I’m running Linux 5.8.1 and I can’t get the sound card to be recognized. Even after reading all the useful comments of this post and trying a bunch of things, so far no luck for me and my XPS 9700.
I assume the dkms driver isn’t necessary, but I tried to build it anyway without success: https://github.com/maaarghk/soundwire-dkms/issues/1
sudo alsaucm open sof-soundwire
ALSA lib ucm_subs.c:368:(uc_mgr_get_substituted_value) variable ‘${CardComponents}’ is not defined in this context!
ALSA lib main.c:983:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -22
alsaucm: error failed to open sound card sof-soundwire: Invalid argument
Yet I have the latest alsa-ucm-conf (1.2.3):
pacman -Q pulseaudio-alsa pulseaudio-git sof-firmware alsa-lib alsa-ucm-conf alsa-firmware
pulseaudio-alsa 1:1.2.2-2
pulseaudio-git v13.99.1.71.g47d811224-1
sof-firmware 1.5.1-1
alsa-lib 1.2.3.2-1
alsa-ucm-conf 1.2.3-2
alsa-firmware 1.2.1-2
Maybe you would see something from the following info? Because I sure don’t 🙂
uname -a
Linux fatboy 5.8.1-arch1-1 #1 SMP PREEMPT Wed, 12 Aug 2020 18:50:43 +0000 x86_64 GNU/Linux
cat /etc/modules-load.d/soundwire-intel.conf
soundwire-intel
dmesg | grep soundwire
lsmod | grep soundwire
soundwire_intel 28672 0
soundwire_cadence 32768 1 soundwire_intel
soundwire_bus 81920 2 soundwire_intel,soundwire_cadence
snd_soc_core 323584 8 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_skl,snd_soc_dmic,snd_soc_skl_hda_dsp
snd_pcm 147456 12 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
dmesg|grep sof-
[ 2.173313] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 2.173519] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 3.108172] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 3.114973] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 3.146577] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[ 3.146579] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 3.146583] sof-audio-pci 0000:00:1f.3: DMICs detected in NHLT tables: 0
[ 3.266674] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:5:1-88707
[ 3.266675] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:16:0 Kernel ABI 3:16:0
[ 3.267237] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 3 size 0x1c
[ 3.267271] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 4 size 0x10
[ 3.279670] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:16:0 Kernel ABI 3:16:0
[ 3.279672] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[ 3.279673] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[ 3.280937] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[ 3.280939] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[ 3.282243] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[ 3.283650] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[ 3.285801] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[ 3.305754] input: sof-hda-dsp HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input19
[ 3.305785] input: sof-hda-dsp HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input20
[ 3.305811] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input21
cat /sys/module/snd_intel_dspcfg/parameters/dsp_driver
3
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 1: HDMI1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 2: HDMI2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI3 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
lspci -vvnnn | grep -A11 “1f.3”
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Device [8086:06c8]
Subsystem: Dell Device [1028:098f]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Latency: 64
Interrupt: pin A routed to IRQ 216
Region 0: Memory at 609b118000 (64-bit, non-prefetchable) [size=16K]
Region 4: Memory at 609b000000 (64-bit, non-prefetchable) [size=1M]
Capabilities:
Kernel driver in use: sof-audio-pci
Kernel modules: snd_hda_intel, snd_soc_skl, snd_sof_pci
pavucontrol says “No cards available for configuration”.
Building the soundwire dkms module failed on 5.8.1 (see github issue above) so I tried to remove it, without much success. Could that be the issue.
dkms status
soundwire, 1.3.0: added
sudo dkms uninstall soundwire/1.3.0
Error! The module soundwire 1.3.0 is not currently installed.
This module is not currently ACTIVE for kernel 5.8.1-arch1-1 (x86_64).
sudo dkms remove soundwire/1.3.0
Error! There is no instance of soundwire 1.3.0
for kernel 5.8.1-arch1-1 (x86_64) located in the DKMS tree.
I’m at a loss here, any hint would be very welcome. Thank you for your post anyway.
Mitch
2020-08-18 — 15:44
I also had this exact issue on 5.8. Unfortunately, I couldn’t figure out how to get through it.
lexx
2020-08-16 — 08:57
Dear people,
I am struggling getting sound working on Dell XPS 17 9700 on Ubuntu. I tried everything, but no sucsess. Whether someone have similar issue resolved, and can advice me what to do? My inxi output is:
System:
Host: IosivStalin Kernel: 5.8.1-050801-generic x86_64 bits: 64
Desktop: Gnome 3.36.4 Distro: Ubuntu 20.04.1 LTS (Focal Fossa)
Machine:
Type: Laptop System: Dell product: XPS 17 9700 v: N/A
serial:
Mobo: Dell model: 0P1CHN v: A00 serial:
UEFI: Dell v: 1.0.4 date: 05/20/2020
Audio:
Device-1: Intel Comet Lake PCH cAVS driver: sof-audio-pci
Device-2: NVIDIA TU106 High Definition Audio driver: snd_hda_intel
Sound Server: ALSA v: k5.8.1-050801-generic
Jacques
2020-08-17 — 07:52
Hello! Trying this out on 5.8.0.2 Manjaro, and can install that version of soundwire with the help of the GitHub issue, but even after reboot alsamixer only shows 5 HDMI outputs under “HDA Intel PCH”, no “soc-soundwire” option. alsaucm open sof-soundwire returns “failed to import sof-soundwire use case configuration -22”. alsa-ucm-conf, alsa-lib and sof-firmware are at their latest versions, so I’m at a loss here.
Adam
2020-08-19 — 14:11
Hi, trying on the latest Manjaro 5.7 kernel and getting a new issue. After reboot I’m not seeing speaker or headphone out in alsamixer and when I attempt to reload alsaucm it’s throwing out an error:
ALSA lib main.c:983:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
alsaucm: error failed to open sound card hw:0: No such file or directory
Similarly at a bit of a loss.
Thanks for all the work you put into this.
nsx2brz
2020-08-24 — 01:38
Updated ucm2 folder for Ubuntu 20.04 so that switching between headset, bluetooth and speakers works flawlessly, also fixes the microphone:
http://xps17.ddns.net/sof-soundwire.zip
Remove your old /usr/share/alsa/ucm2/sof-soundware and replace with the above version and reboot.
tode
2020-08-25 — 07:38
Thank you nsx2brz,
it works like a charm on ubuntu 20.04
Fernando Vicaria
2020-08-30 — 21:51
HI there,
I am also using Ubuntu 20.04. I am new to it so not quite sure what to do.
All packages seem up to date.
Could you help? What were the steps you did?
nsx2brz
2020-09-01 — 00:40
See here for list of steps:
https://redd.it/husu3r
villuv
2020-08-25 — 23:29
Hi,
XPS 17 9700 running archlinux 5.8.3-arch1-1
Submitted pull request https://github.com/maaarghk/soundwire-dkms/pull/2 for building on 5.8.x kernels
Built the dkms modules and patched the ucm files from sofproject.
Still no sound, no cards.
From dmesg I see firmware loading problems:
[ 2.005336] snd_soc_skl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 2.005349] snd_soc_skl 0000:00:1f.3: enabling device (0000 -> 0002)
[ 2.366344] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 2.520763] snd_soc_skl 0000:00:1f.3: Direct firmware load for 6c8-DELL-DellInc-538378241-tplg.bin failed with error -2
[ 2.520766] snd_soc_skl 0000:00:1f.3: tplg fw 6c8-DELL-DellInc-538378241-tplg.bin load failed with -2, trying alternative tplg name skl_hda_dsp_generic-tplg.bin
[ 2.520782] snd_soc_skl 0000:00:1f.3: Direct firmware load for skl_hda_dsp_generic-tplg.bin failed with error -2
[ 2.520784] snd_soc_skl 0000:00:1f.3: tplg skl_hda_dsp_generic-tplg.bin failed with -2, falling back to dfw_sst.bin
[ 2.520799] snd_soc_skl 0000:00:1f.3: Direct firmware load for dfw_sst.bin failed with error -2
[ 2.520800] snd_soc_skl 0000:00:1f.3: Fallback tplg fw dfw_sst.bin load failed with -2
[ 2.520801] snd_soc_skl 0000:00:1f.3: Failed to init topology!
[ 2.520802] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -2
I have sof-firmware 1.5.1 installed, it doesn’t contain those files.
No “sof” things seen in dmesg. lsmod tells that soundwire_intel is loaded.
Out of ideas…
nsx2brz
2020-09-09 — 14:58
Here is some info that may help you…
https://bugzilla.opensuse.org/show_bug.cgi?id=1176200
…they got it working on the 5.9 kernel
Sawyer
2020-09-11 — 16:41
Trying to reproduce that result and having zero luck, have you been able to?
Bill Jil
2020-09-13 — 11:28
This looks more like, they got it to work with 5.9 like people here have with earlier kernels but that we need to wait until 5.10 to get it to work
“out of the box”:
> “So this requires the changes that will be included at first for 5.10 kernel.”
Sawyer Bergeron
2020-09-04 — 20:24
What MRs/PRs should I be following that would make this work OOTB?
Pablo
2020-09-21 — 15:29
I was able to fix the same issue in my Dell G3 with the following
`echo “options snd-intel-dspcfg dsp_driver=1” > /etc/modprobe.d/alsa.conf`
It’s seems to be a bug in the kernel: https://bugzilla.kernel.org/show_bug.cgi?id=205959
Thank you by the article, with it I could manage to find more info
Robert
2020-09-26 — 09:59
Dear Pablo, thank you for your input.
How would just this command work for the new XPS?
AFAIU the problem is, that 1) the sof drivers are so new, they have not been merged yet (or are included anywhere) and 2) the definition for the new devices are not yet part of alsa
This command you posted seems to try to use sof for audio drivers, but I do not see why this should work without having to build the kernel modules, etc.
mark
2020-09-27 — 13:21
the latest sofproject drivers worked out of the box for me, I updated the blog with information on this
Robert
2020-09-28 — 12:11
Thanks Scot! The article is unchanged for me. Maybe you forgot to hit the “publish” button?
mark
2020-09-28 — 12:40
That is exactly the sort of thing I would do but I just checked and nope. Search for 5.8!
Is there something about my blog being called “mark’s blog” and all my comments having the word mark above them that makes people double check my domain name to see if maybe I wrote my real name in the told? .scot is the Scottish tld. People called Scott have two Ts. Sorry for calling you out specifically but you’re not the only one haha
Robert
2020-09-28 — 13:21
Oh no I am so sorry!! Did not mean to be rude, just see “scot” very prominently in the URL and then just made the connection. Sorry! Not used to american names much and how they are spelled.
(My name is also not really Robert Gates)
Anor
2020-10-02 — 23:50
Hello,
Precision 5550 (XPS 9500) with KDE Neon (Ubuntu 20.04, 5.4.0-48)
Audio works out of the box using device-1: `Intel Comet Lake PCH cAVS` with driver: `snd_hda_intel`.
However, only 2 out of 4 speakers are utilised (bass from bottom speakers is missing), which makes for quite a poor experience. It is not a hw issue – tested on win10… I was wondering if you get output from all speakers? So I gave this a shot [thanks for the post btw :)]
I tried following both this and nsx2brz’s guide for Ubuntu 20.04. However, I am pretty much stuck at the first step when installing dkms module. Once installed, the audio stops working and only a dummy output is available, `sof-soundwire` does not show in `alsamixer`.
Trying to open it with `alsaucm open sof-soundwire` results in error `variable ‘${CardComponents}’ is not defined in this context!`. As suggested, I updated all dependencies to the versions mentioned above, yet still nothing. I also tried using `linux-oem-20.04`, but it does not work either.
My ears are slowly beginning to bleed, so I would really appreciate any suggestions! 😀
Thank you in advance!
mark
2020-10-02 — 23:52
Probably need your dmesg output to have any idea
Anor
2020-10-03 — 00:27
Thank you for your prompt reply. The output is here: https://pastebin.com/raw/TWa3freZ
mark
2020-10-03 — 13:22
aah, I’ve just read properly after glancing on the dmesg and see that you’re on something which has different codecs. The hardware ID for your laptop does show up in the dkms driver, but I’ve no idea. It might be useful if you could uninstall dkms and show the same output before (when it “works”) and after. `lsmod | grep snd` may be more illuminating.
mark
2020-10-03 — 13:23
also, I think the useful bit of your dmesg is truncated, the start would be more helpful.
`journalctl -b` maybe?
Anor
2020-10-03 — 21:56
Without soundwire-dkms: https://pastebin.com/raw/jq5XsUrV
With soundwire-dkms: https://pastebin.com/raw/eYr73Mgb
Looking at soundwire-dkms/soc/intel/boards/sof_sdw.c#L47-L56, I tried adding another block for SKU Number: ‘097E’ (Precision 5550). No effect for me, but I wonder if these need to be added for XPS 9500/Precision 5550 to enable 4 speaker support?
My knowledge in this area is very limited. So if there is nothing too obvious, I will put this aside and look into it later once I decide to update kernel (probably once Ubuntu 20.04.2 emerges). Thank you for all the help!
mark
2020-10-19 — 06:55
Sorry I forgot to reply to this. It looks like it uses good old fashioned HDAudio and not soundwire, so I have no idea. Maybe if you raise an issue on thesofproject/sof with the attached files and info on your hardware they can help you out
Omar
2020-10-19 — 02:07
First of all, thank you so much for this guide. Everything works like a charm! That being said, and I’m not sure if I should be posting this here but figured I’d give it a shot, I’m trying to update my packages via pacman (running Arch with kernel 5.8.14-arch1-1) but when I do I get the following error:
error: failed to commit transaction (conflicting files)
alsa-ucm-conf: /usr/share/alsa/ucm2/codecs/rt5682/init.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/codecs/rt700/init.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/codecs/rt711/init.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/codecs/rt715/init.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/Hdmi.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/HiFi.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/rt1308-2.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/rt1308-4.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/rt5682.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/rt700.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/rt711.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/rt715.conf exists in filesystem
alsa-ucm-conf: /usr/share/alsa/ucm2/sof-soundwire/sof-soundwire.conf exists in filesystem
Errors occurred, no packages were upgraded.
The current version of alsa-ucm-conf is 1.2.3-2. Do I need to just remove those files listed and try updating again?
mark
2020-10-19 — 06:50
yes, that seems like a good thing to try, if it breaks after you could always replace those files again.
Omar
2020-10-19 — 23:38
Thanks. Fortunately it worked without any issues. I was curious so I tried playing a Youtube video after the deleting the files and everything still worked. Was that supposed to happen?
Shervin Khastoo
2020-10-20 — 04:09
Arch Linux finally released alsa 1.2.4 which solves the issue. I think soundwire-dkms needs to be installed.
Bill Jil
2020-10-29 — 15:29
bruh.
I just updated my Fedora to 33 because that had the new alsa-ucm version 1.2.4. What else could I be missing? Are you already on 5.9?
mark
2020-10-29 — 15:34
works fine on 5.9 if you follow the directions in the post for 5.8
Bill
2020-10-29 — 16:18
Wait so in 5.9 one still needs to install your cooked up driver? Even with that one it is not included?
I wont want to update to 5.9 because if lacking NVidia support.
mark
2020-10-29 — 16:37
Oh, you know, I never actually checked if it works if I uninstall the dkms module haha. I’ll test it later…
Bill Jil
2020-10-29 — 16:49
Thank you Mark!
Tiberivs
2020-10-29 — 03:47
Hello,
I have XPS 9700 laptop with Gentoo (kernel version 5.9.1).
I tried to compile soundwire/1.4.0 with DKMS, but got an error:
ERROR: modpost: “hdac_hdmi_jack_port_init” [/var/lib/dkms/soundwire/1.4.0/build/soc/intel/boards/snd-soc-sof-sdw.ko] undefined!
ERROR: modpost: “hdac_hdmi_jack_init” [/var/lib/dkms/soundwire/1.4.0/build/soc/intel/boards/snd-soc-sof-sdw.ko] undefined!
I tried to build the module with 5.8 kernel too, but with no success.
Do you have any ideas how to fix this? Can you share me your kernel config?
Versions:
alsa 1.2.4
alsa-ucm-conf 1.2.4
sof-firmware 1.5.1
dkms 2.8.3
tib@XPS17 ~ $ aplay -l
aplay: device_list:274: no soundcards found…
dmesg output:
[ 2.051243] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 2.052138] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 2.055589] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 2.103318] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 2.227136] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 2.238451] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[ 2.238451] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 2.238453] sof-audio-pci 0000:00:1f.3: DMICs detected in NHLT tables: 0
[ 2.372433] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:5:1-88707
[ 2.372434] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:16:0 Kernel ABI 3:16:0
[ 2.372814] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 3 size 0x1c
[ 2.372833] sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 4 size 0x10
kernel modules:
snd
snd_compress
snd_hda_codec
snd_hda_codec_hdmi
snd_hda_core
snd_hda_ext_core
snd_hwdep
snd_intel_dspcfg
snd_pcm
snd_rawmidi
snd_seq_device
snd_soc_acpi
snd_soc_acpi_intel_match
snd_soc_core
snd_soc_hdac_hda
snd_sof
snd_sof_intel_hda
snd_sof_intel_hda_common
snd_sof_pci
snd_sof_xtensa_dsp
snd_timer
snd_usb_audio
snd_usbmidi_lib
lspci -k:
00:1f.3 Multimedia audio controller: Intel Corporation Device 06c8
Subsystem: Dell Device 098f
Kernel driver in use: sof-audio-pci
Kernel modules: snd_sof_pci
Thank you in advance!
mark
2020-10-29 — 15:32
need to set CONFIG_SND_SOC_HDAC_HDMI in your kconfig when building the module
Tiberivs
2020-10-31 — 17:22
Thank you, mark!
After 3 month of buy, I got a working audio on my laptop.
I’m completely happy now.
I changed the ‘dkms.conf’ file to remove excess modules for my kernel. I reduced dkms modules from 76 to 46. Anyone interested can download here: https://github.com/Tiberivs/soundwire-dkms/commit/8590a137ba61bc9b548b035d2d3ff1f70aba422b
Ben
2020-11-05 — 17:22
Can you tell how you figured out how to change the dkms.conf?
I have similar compilation errors as you have but have no idea how to fix them.
Ben
2020-11-05 — 18:32
Hey there,
may I ask how you found out which parts of the dkms.conf to keep and which to through out? I have similar build issues and would like to fix it.
Tiberivs
2020-11-10 — 06:56
Hi, Ben.
First I compiled the linux kernel with only required modules. Than I ran `dkms build`, read the build log file and removed unnecessary section from dkms.conf. Over and over, step by step. That’s all.
Ajit Natarajan
2020-10-29 — 09:23
Could you please add instructions for Ubuntu 20.10? Thanks.
mark
2020-10-29 — 15:31
no, sorry.
Bill Jil
2020-11-02 — 20:44
Oh hi Mark!
I tried building on Fedora 33 with dkms and when I try to build I get this error:
`
616 │ MODPOST /var/lib/dkms/soundwire/1.4.0/build/Module.symvers
617 │ ERROR: modpost: “sdw_startup_stream” [/var/lib/dkms/soundwire/1.4.0/build/soc/intel/boards/snd-soc-sof-sdw.ko] undefined!
618 │ ERROR: modpost: “sdw_shutdown_stream” [/var/lib/dkms/soundwire/1.4.0/build/soc/intel/boards/snd-soc-sof-sdw.ko] undefined!
619 │ ERROR: modpost: “sdw_bread_no_pm_unlocked” [/var/lib/dkms/soundwire/1.4.0/build/soundwire/soundwire-cadence.ko] undefined!
620 │ ERROR: modpost: “sdw_rows” [/var/lib/dkms/soundwire/1.4.0/build/soundwire/soundwire-generic-allocation.ko] undefined!
621 │ ERROR: modpost: “sdw_cols” [/var/lib/dkms/soundwire/1.4.0/build/soundwire/soundwire-generic-allocation.ko] undefined!
622 │ make[2]: *** [scripts/Makefile.modpost:111: /var/lib/dkms/soundwire/1.4.0/build/Module.symvers] Error 1
623 │ make[2]: *** Deleting file ‘/var/lib/dkms/soundwire/1.4.0/build/Module.symvers’
624 │ make[1]: *** [Makefile:1665: modules] Error 2
625 │ make[1]: Leaving directory ‘/usr/src/kernels/5.8.16-300.fc33.x86_64’
626 │ make: *** [Makefile:10: all] Error 2
`
What does this mean? Can someone help me with this?
Andrii
2020-11-04 — 08:16
Hi,
For Ubuntu 20.10 with kernel 5.8.*, your:
$ alsaucm open sof-soundwire
gives error:
ALSA lib ucm_subs.c:368:(uc_mgr_get_substituted_value) variable ‘${CardComponents}’ is not defined in this context!
ALSA lib main.c:997:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -22
alsaucm: error failed to open sound card sof-soundwire: Invalid argument
mark
2020-11-04 — 12:04
why? versions of things? dmesg?
Jimmy
2020-11-04 — 19:55
Thanks for this. After following the instructions here I got the sound working, but one of the speakers sounds extremely bad. Could this be an issue with the driver/installation or is my speaker is just broken?
This is how it sounds now
https://streamable.com/jt6vwc
mark
2020-11-05 — 11:25
You need to downgrade sof-firmware to 1.5.1. There is a fix coming, I can see them working on it.
Alex
2020-11-11 — 01:55
Can you post the repo you are following for their upcoming fixes?
mark
2020-11-11 — 14:20
https://github.com/thesofproject/sof/issues/3499
Alex
2020-11-13 — 17:28
Thanks. I had it working using your sof build on and ArchLinux sof-firmware 1.6.1 on Ubuntu 20.10 but a few days ago it stooped working again 🙁
Alex
2020-11-13 — 20:29
Got it working again on Ubuntu 20.10!!!
Ben
2020-11-14 — 15:58
Alex what did you do?
Alex
2020-11-14 — 20:04
For Ubuntu 20.10 kernel 5.8.0-28-generic:
1. install dkms
sudo apt install dkms
2. follow build instructions above to build Mark’s custom soundwire-dkms:
git clone https://github.com/maaarghk/soundwire-dkms
sudo mv soundwire-dkms /usr/src/soundwire-1.3.0
sudo dkms add soundwire/1.3.0
sudo dkms build soundwire/1.3.0
sudo dkms install soundwire/1.3.0
3. download sof-firmware (1.6.2)
https://www.archlinux.org/packages/extra/any/sof-firmware/
extract packages to:
/usr/lib/firmware/intel/sof
/usr/lib/firmware/intel/sof-tplg
(make backups of the originals just in case)
4. download sof-soundwire (same as link above):
http://xps17.ddns.net/sof-soundwire.zip
replace all in /usr/share/alsa/ucm2/sof-soundware
(make backups of the originals just in case)
5. reboot, you should see extra devices in Ubuntu Settings > Sound > Output Device
mark
2020-11-14 — 20:09
I would recommend you both use sof-firmware 1.5.1 since 1.6 has some kind of a bug with distortion in the left speaker – https://github.com/thesofproject/sof-bin/tree/stable-v1.5.1
Alex
2020-11-14 — 20:06
Btw in case you don’t have it and your build fails, you may also want to install the compiler toolchain:
sudo apt install build-essential
Ben
2020-11-14 — 21:04
But Mark, sincierly your link for the 1.5.1 verion cannot be installed via dkms, so you reccommend to use that over the dkms version?
Brian
2020-11-08 — 11:48
Mark, this blog post has been your biggest success. What comes after this?
mark
2020-11-08 — 14:32
More curry recipes, probably
Brian
2020-11-14 — 21:06
Steamed BBQ pork bao from scratch!
face
2020-11-25 — 02:16
Thanks for the info. My first priority was to have wifi. I got wifi working building kernel 5.10.0-rc5 and adding the firmware (from these instructions https://www.spinics.net/lists/linux-wireless/msg205031.html).
Now I just need to port your module to the 5.10 kernel and i’ll have audio too (but I need to get some work done first).
Thanks again.
mark
2020-11-25 — 10:55
I don’t think the 9500 has the same audio drivers, unfortunately. Someone else posted and it looked like it was HDAudio. If you have issues with it maybe thesofproject/sof github issues list would be able to help.
face
2020-11-25 — 12:30
Thanks, yea I have the 9700. It came with the same Wi-Fi 6 AX500-DBS as the 9500. Did you get your wifi working an easier way? The original article was https://medium.com/@tomas.heiskanen/dell-xps-15-9500-wifi-on-ubuntu-20-04-d5f1c218e78a but the link above with kernel 5.10 was easier.
From my 9700:
“`
sudo lspci -nn | grep Qualcomm
04:00.0 Network controller [0280]: Qualcomm Device [17cb:1101] (rev 01)
“`
mark
2020-11-25 — 13:04
Aaah, ok, must be a parts availability stuff, mine has Intel WiFi and it worked out the box.
mark
2020-11-25 — 16:27
By the way, allegedly the drivers should work out the box on kernel 5.10. Can you see sof-soundwire as an audio card in `alsamixer`? IF so you probably just need new sof-firmware and maybe pulseaudio depending what distro you’re on. Use sof-firmware 1.5.1 not 1.6, 1.6 has issues with our card.
face
2020-11-27 — 09:14
I thought that might be the case. I’m on fedora 33 which installed alsa-sof-firmware 1.6-1 so I’ll bump that down. I think I need to enable some more modules as I found these are not enabled by default:
# CONFIG_SND_SOC_RT700_SDW is not set
# CONFIG_SND_SOC_RT711_SDW is not set
# CONFIG_SND_SOC_RT715_SDW is not set
I’ll let you know when I get it working.
face
2020-11-27 — 12:44
Vanilla linux 5.10rc5 killed my battery fast. I switch to the 5.10 rc5 fedora kernel, and it looks like it had all the necessary modules enabled by default:
₿ dmesg | grep sof-audio
[ 18.165963] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 18.165977] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 18.169078] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 18.172810] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 18.181134] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 18.230810] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[ 18.357617] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:5:0-7e6cd
[ 18.357620] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:16:0 Kernel ABI 3:17:0
Now I guess I have a alsa-lib version issue?
₿ alsaucm open sof-soundwire
ALSA lib ucm_subs.c:367:(uc_mgr_get_substituted_value) variable ‘${CardComponents}’ is not defined in this context!
ALSA lib main.c:1014:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -22
alsaucm: error failed to open sound card sof-soundwire: Invalid argument
I have alsa-lib 1.2.4-5 and alsaucm: version 1.2.4. hmmm.
mark
2020-11-27 — 16:02
seems like there is some other problem, would need more debug info from your dmesg to see… but can you see it in alsamixer? f6?
Chris
2020-11-27 — 21:23
I have this same issue with fedora 33, it does not appear in alsamixer when you press F6, I just have default listed. What debug info did you want?
face
2020-12-05 — 23:05
Update: Audio still didn’t work in linux 5.10.rc6. However, I installed the latest development kernel because it had sleep fixes to the Killer Wi-fi 6 AX500 driver just merged….and audio was fixed too! So I expect 5.10.rc7 will support the audio out of the box when it is released. To be specific, audio is working in fedora rawhide kernel 5.10.0-0.rc6.20201204git34816d20f173 built from source so I could enable the ATH11K wifi drivers.
Also the latest 1.6 firmware from sof-bin git source appear to be working too…
Mike
2020-12-14 — 03:45
Compiled the latest manjaro 5.10rc7 kernel from source, only config alteration involved enabling ath11k AX500 wireless support.
Pulseaudio, alsa, sof-firmware etc all present and at versions exceeding the requirements. The following error still manifests:
alsaucm open sof-soundwire
ALSA lib ucm_subs.c:367:(uc_mgr_get_substituted_value) variable ‘${CardComponents}’ is not defined in this context!
ALSA lib main.c:1014:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -22
alsaucm: error failed to open sound card sof-soundwire: Invalid argument
Mike
2020-12-14 — 03:58
Compiled the latest manjaro 5.10rc7 kernel from source, only config alteration involved enabling ath11k AX500 wireless support.
Pulseaudio, alsa, sof-firmware etc all present and at versions exceeding the requirements. The following error still manifests:
alsaucm open sof-soundwire
ALSA lib ucm_subs.c:367:(uc_mgr_get_substituted_value) variable ‘${CardComponents}’ is not defined in this context!
ALSA lib main.c:1014:(snd_use_case_mgr_open) error: failed to import sof-soundwire use case configuration -22
alsaucm: error failed to open sound card sof-soundwire: Invalid argument
Incidentally, I would appreciate it if you could direct me to the rawhide kernel source to examine their kernel .config for differences to the manjaro counterpart.
mike
2020-11-27 — 02:24
Out of curiosity are you running manjaro/arch?
Having recently compiled and installed linux 5.10-rc5 on manjaro to successfully enable AX500 wifi on my i9 9700, the fans perpetually spin at maximum rpm, shortly after reaching the desktop. Do you encounter this behaviour?
Checking htop reveals no errant processes or excessive cpu activity, the cpu’s mostly remaining at idle.
mark
2020-11-27 — 10:20
hey, i’m on manjaro but still on linux 5.9. fortunately i do not have this killer wifi bullshit, mine came with an intel ac9560 8086:06f0. i suppose you could try disabling the wifi in the bios (is that possible?) to see if the issue is 5.10 or wifi related.
mike
2020-11-27 — 17:02
Yeah I purchased the i9 version on the basis of i7 reviews without realizing the rather pointless wireless card difference; certainly not worth the excessive build delay and added incompatibility for a marginal at best cpu speed improvement.
5.10-rc5 kernel compilation on manjaro appears to generate a dramatically leaner config file, after configuring the ath11 driver’s inclusion via make menuconfig, than the original packaged in the git repo. Basing the ath11 config ontop of the original maintains the settings but I wonder if somewhere in the labyrinthian config something has been set incorrectly?
For now I’m on 5.9 using my samsung S10 over usb as a wifi card substitute.
Aside from the lack of network, sound and an unusual high pitched, barely discernible, oscillating electrical sound emanating from the area where the usb-c powercord is attached, the laptop is perfect.
Pradeesh
2020-11-26 — 23:25
2021 year is knocking to our doors, but Linux users still have issues with sound, sleep states, GPUs… Poor babies still peeing agains the wind.
Muddy
2020-11-30 — 23:21
lol, take a look through these search results: https://old.reddit.com/r/Dell/search?q=driver&restrict_sr=on&sort=relevance&t=all
You can pay Microsoft $150 to have issues with audio drivers, sleep states, and GPUs, locking up your system and causing BSODs
Or you can install Linux for free and find a fairly painless workaround until the issue is resolved in an upcoming kernel release.
Luis Arias
2020-12-11 — 17:25
Thank you so much for this! I’m waiting for 5.10 for WiFi to work on my new XPS 9700 but having sound makes all the difference.
Sawyer
2020-12-18 — 16:15
Using 5.10 mainline now (from the miffe repo), things seem to show up in alsamixer as the sof-hda-dsp soundcard but only PGA and S/PDIF outputs display there and nothing is available as a sink for pulseaudio.
Matt
2020-12-21 — 20:32
Hey all, happy this blog post exists, thanks for the hard work.
I’m running Pop!_OS 20.10 (based on Ubuntu 20.10) with kernel 5.10.2-051002-generic, but my Intel audio card is still not working on my Precision 5750. It doesn’t show up in alsamixer. I tried building the soundwire driver from Mark’s repo, but it doesn’t have a version for kernel 5.10. What should I do?
nsx2brz
2020-12-22 — 15:24
Install OEM kernel. Manually install sof-firmware and ucm2 drivers. Details from:
nsx2brz
2020-12-22 — 15:24
Install OEM kernel. Manually install sof-firmware and ucm2 drivers. Details from: https://redd.it/husu3r
Luis
2020-12-22 — 18:30
Hmm, I noticed there is a 4s delay or so before sound kicks in when going through HDMI. I’ve been googling around but can’t find much information. Anyone else having this issue? Otherwise working great.
Ivo
2020-12-23 — 21:46
DELL XPS 9700 i9 (the latest) issues installing any major Linux distro
Unfortunately lots of hardware components don’t work even with kernel 5.10.2
Audio is showing a dummy device. Actually it is Intel Comet Lake PCH cAVS. Probably Realtek ALC711-CG.
WiFi is Killer AX500-DBS (2×2) and Bluetooth 5 – ath11k driver. It worked shortly in kernel 5.10.1 and looks like the developers dropped support in 5.10.2, probably too buggy.
Bluetooth was also on and off through the different kernel versions.
Fingerprint also does not work.
Anybody have any different experience than mine on this model?
Mike
2020-12-29 — 17:36
Manjaro’s current 5.10-3 kernel config enables both Ath11 and intel soundwire support and along with a fully upgraded system will automatically enable both sound and network when manually built and installed, however the current stable branch is stuck on RC5.
My corei9 run’s ludicrously hot when manually installing the latest manjaro kernel, to the effect that temperatures hover around 60-70C at idle with the fan’s close to maximum rpm. By comparison under linux 5.9, temperatures remain at approximately 30C at idle. No perceptible change in kernel governor or config is apparent.
Stephen
2021-01-24 — 12:38
On 5.10.7-3-MANJARO kernel with Dell XPS 9700 i9. Sound works but not the microphone. Wifi works on startup but lost after sleep/resume. Not great
Stephen Montgomery
2021-01-24 — 13:16
Mentioning this in case it helps. Weird thing happened – was getting desperate and came across this https://www.linuxquestions.org/questions/showthread.php?p=6106584#post6106584 where it mentioned checking the bios in case mic/audio was disabled. It wasn’t disabled (option existed though) but I turned off touchscreen support, saved, exited and all of a sudden microphone working!?!?!
I had been restarting 5-6 times testing out ucm2 config, kernel switches etc so usual miraculous switch on/off didn’t matter but maybe hard reboot or just re-persisting of bios config did…? Don’t know, don’t care – am fed up with this constant sh1t linux hw nonscense.
Neil McGill
2021-06-04 — 17:42
Dude this is wild – I did the same and the microphone worked 🙂
I went into bios, toggled sound off and on, saved, reload and it worked. This is on ubuntu 21.04 with a 5.8 kernel – other kernels I found did not work – hth
Atlas
2020-12-24 — 19:24
Hey, Thanks so much for this! I never leave comments but I felt the need to convey my thanks. I can now enjoy my XPS in all it’s Manjaro goodness.
Sumpfling
2021-01-01 — 09:55
Has anybody tried the newest Manjaro-release/update that just came out (2020-12-30 or 31 )?
I’m reluctant to try, seeing that the kernel-version seems to be 5.10.2 … rather than 5.10.3 …
Lasse
2021-01-02 — 17:35
Does anybody have this working with kernel 5.10? If so could you please post your alsa-info?
I’ve yet to get it working on Ubuntu (20.10) with 5.10, which is required for wifi – which does work after manually installing the firmware.
I’m not seeing any problems in dmesg, ie not load errors and I’m running the 1.6.1 firmware from arch.
mark
2021-01-06 — 13:55
Maybe they need to enable the kernel options… you could raise a ticket on launchpad for this if it looks like they are not enabled. I done that for arch and manjaro and they were both in within 24h, not sure what the turnaround is for the equivalent on Ubuntu though.
Jacques
2021-01-06 — 02:57
Now that 5.10 ostensibly works, how do we revert any changes made here? 5.10 doesn’t fix audio for me; neither does 5.9.
mark
2021-01-06 — 14:01
The dkms module will fail to build on 5.10 so you would probably not need to do aynthing except `dkms remove soundwire/1.x.x` to stop annoying errors on upgrade. The drivers are definitely in 5.10 but your distro may need to enable kernel options for it to work. You can write to them on their bug tracker to request that. Equivalent request: https://forum.manjaro.org/t/requesting-kernel-module-build-options-5-10-new-options/42951/2
Jacques
2021-01-07 — 15:00
Coincidentally, I am using Manjaro, and even an inadvertent disk wipe and reinstall doesn’t cause it to work.
mark
2021-01-07 — 15:04
so what’s not working? As much detail as possible, with logs etc, I may be able to help.
Jacques
2021-01-16 — 17:54
I forgot to install sof-soundwire, silly me. Now audio doesn’t work after a wake from suspend, and attempting to restart audio with systemctl –user restart pulseaudio causes no output to be listed again, with logs claiming:
Failed to find a working profile.
pulseaudio[1022327]: Failed to load module “module-alsa-card” (argument: “device_id=”0″ name=”pci-0000_00_1f.3-platform-sof_sdw” card_name=”alsa_card.pci-0000_00_1f.3-platform-sof_sdw” namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties=”module-udev-detect.discovered=1″”): initialization failed.
Jacques
2021-01-16 — 18:01
Whoops. I meant sof-firmware.
Bill
2021-01-13 — 20:07
Hi Mark, thanks for writing this blog post!
I installed the 5.10 kernel (oem kernel on Ubuntu 20.04) and updated things based on your recommendations. Still, only dummy output is visible and no new devices appear in alsamixer.
I would appreciate any pointers you may have as to what could be the issue. Below is the output of alsa-info:
http://alsa-project.org/db/?f=e785290214aafa2c093ffd819f10f375d4a117d3
mark
2021-01-13 — 20:08
Presumably, the ubuntu kernel is built without the SOUNDWIRE configuration options. Perhaps you could search for that on launchpad and raise a bug report?
Ryan
2021-02-10 — 18:42
I’m now able to get the sound to work after installing the drivers and without updating the ucm files. Is there any reason I should do so anyway? Thanks for the help
Kula
2021-03-21 — 11:49
Thanks for the post. However I get “Error! The /var/lib/dkms/soundwire/1.4.0/5.8.0-45-generic/x86_64/dkms.conf for module soundwire includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch. This indicates that it should not be built”. I am on Budgie 20.10 with the 5.8.0-45-generic kernel. Why that error?
mark
2021-03-22 — 09:57
Probably forgot this step: `git checkout latest-sofproject`
Marc
2021-04-02 — 03:57
I found this trying to get sound working on Pop OS 20.04 LTS with kernel 5.11
I originally had to follow a bunch of steps from here and :
https://www.reddit.com/r/Dell/comments/husu3r/how_to_get_fully_working_audio_in_ubuntu_2004_on/
I was on Pop OS 20.10. A recent update broke it all again, so I decided to back up and try it fresh but stick to the Pop OS 20.04 LTS release.
Attempting to build soundwire 1.4.0 for 5.11 fails.
The last time I had it working was 5.8. So I installed linux-generic-hwe-20.04, rebooted and lo and behold, soundwire 1.4.0 is there and speaker and mic work perfectly.
rioujin
2021-04-17 — 17:15
Hello,
I am trying to apply the workaround for the kernel 5.12.0-051200rc7-generic, however the driver does not buid:
Building module:
cleaning build area…
make -j16 KERNELRELEASE=5.12.0-051200rc7-generic KVER=5.12.0-051200rc7-generic…………(bad exit status: 2)
ERROR (dkms apport): binary package for soundwire: 1.4.0 not found
Error! Bad return status for module build on kernel: 5.12.0-051200rc7-generic (x86_64)
Consult /var/lib/dkms/soundwire/1.4.0/build/make.log for more information.
mark
2021-04-19 — 15:19
Kernel 5.12 already contains this driver and you don’t need to do anything for it to work. Contact your distro maintainer to request the config options are added to the kernel.
Eduard
2021-04-17 — 20:06
With kernel 5.11 in Ubuntu 21.04 doing `apt install linux-oem-20.04` does not fix the sound issue.
mark
2021-04-19 — 15:20
Kernel 5.11 already contains this driver so you probably have some other problem, for example your distro maintainer may not have enabled soundwire config flags when building. Someone else mentions a package called linux-generic-hwe-20.04, perhaps you need that.
Eduard
2021-05-03 — 20:38
I have a clean install of Ubuntu 21.04 in a Dell XPS 17 (9700). The system detects my Bluetooth device but not the HDMI or the integrated speakers. I tried to install that package and apparently was already installed (linux-generic-hwe-20.04 is already the newest version (5.11.0.16.17)).
If I add `options snd-hda-intel model=generic` to `/etc/modprobe.d/alsa-base.conf` It detects one of the 2 HDMI sound outputs, but not the other or the integrated speakers. Using `model=auto` didn’t work neither.
Eduard
2021-05-03 — 20:54
Seems like some people fixed it by recompiling the kernel, but it is the work laptop and I don’t wanna lose more time fixing it and risk breaking the kernel. I’ll just wait for the guys from Ubuntu to fix this.
Thanks for your help!
Eduard (jongeduard)
2021-06-04 — 21:21
Hi (coincidentally having the same name),
Yes, for at least two months now I have been fixing this problem for myself by recompiling the kernel and by setting CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y
CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m
And I have also replied on te Youtube-video with this.
Before Hirsute officially came out I manually downloaded the Hirsute-package and did this action on Groovy already.
So that I got a Groovy userland running on a Hirsute kernel space. 😛
Note: do’nt be to scared about breaking things, as Ubuntu always let’s you select any installed kernel from it’s GRUB menu!
When a kernel does not work. Just select another.
And then you can always deinstall the wrong kernel(s) for you.
But! Things are currently being fixed by Ubuntu now.
I also helped reporting about this, as well as issues with the ath11k driver for WIFI.
Basically I have hopefully prevented a new bug with ath11k and mhi in the latest proposed kernel from entering any further into this distro, by reporting about it.
I knew about it because it first happened to Arch Linux and Fedora already. And it has already been fixed.
Alex
2021-04-23 — 02:39
Mark: thank you for your kernel. Using it, I had working audio for several months on Ubuntu 20.10 on 5.8.0-50-generic kernel. Sadly, Ubuntu 21.04 broke it.
Others are having similar issues here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1912673
Since building the driver is no longer necessary on kernel 5.11, wow can I instead find info on building soundwire with appropriate config flags?
mark
2021-04-24 — 09:24
Hi Alex. Can you add this file to /etc/modprobe.d https://gist.github.com/maaarghk/b5209fda00fe3a514a332c736ce9dcbf and then make a gist containing the contents of
journalctl -b | grep 'sof\|soc\|snd'
? Also exact kernel versionmark
2021-04-24 — 09:27
p.s.: remove the file when you’re done or your syslog will be an unreadable mess 🙂
jr
2021-04-24 — 15:45
Works for me on ubuntu hirsute, but only with the old kernel
5.8.0-50-generic #56-Ubuntu SMP Mon Apr 12 17:18:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Not the new default kernel
5.11.0-16-generic #17-Ubuntu SMP Wed Apr 14 20:12:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
By “works for me” I mean everything but headphones, which I never was able to get working.
lsmod is identical for each
journalctl is: https://gist.github.com/jr4/0b061d1d0380a68a23d3d3a8bd2b1edc
jr
2021-04-24 — 16:51
5.11.0-16-generic #17-Ubuntu SMP Wed Apr 14 20:12:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
https://gist.github.com/jr4/0b061d1d0380a68a23d3d3a8bd2b1edc
mark
2021-04-24 — 19:41
Oh, I mean, it looks fine. If you open alsamixer and press f6 for sound cards, what do you see?
Herczeg Zsolt
2021-04-25 — 00:37
I’ve hit the same issue after an Ubuntu 21.04 upgrade and found the solution. Unfortunately, it is not so easy, and involves recompiling your whole kernel.
The root cause of the problem is a bug with the Kernel compilation flags, that was intherited from debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976791#35
In short, the flag “CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m” is necessary to support the Dell XPS 9700 sound card, and this is enabled in Ubuntu kernel builds. The gotcha is that this flag depends on “CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y” which is disabled. As a result, enabling the soundware driver does not take effect, and the Ubuntu pre-built images are lacking the necessary driver completely.
The solution is to get the ubuntu kernel source, reconfigure it to add the friendly long names option, build the kernel yourself then replace the running signed kernel with your freshly built one. The Ubuntu kernel compilation guide is more or less still valid from here:
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
There are a lot of gotchas, and unfortunately you even have to remove your signed (stock) kernel before you can install your self-built. If something goes wrong with that, you’ll not be able to boot your machine into your instsalled linux anymore. Be prepared for that.
However, if all goes well I can confirm that it “works for me”. I can share my self-built kernel if you want, but you really shouldn’t install kernels from strangers on the internet…
Alex
2021-04-26 — 16:57
The thread indicates they’ve fixed this in Debian. Does this mean a later Ubuntu version would pick it up?
retroNUC
2021-04-26 — 22:13
Trying to follow the kernel guide – Getting most of the way there, but tripping up on check-config when trying to editconfig. Any advice?
check-config: FAIL (y != n): CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES policy
check-config: 11050/11051 checks passed — exit 1
retroNUC
2021-04-26 — 22:17
Removing some brackets so that copy-paste works…
check-config: FAIL (y != n): CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES policy policy {‘amd64’: ‘n’}
check-config: 11050/11051 checks passed — exit 1
Herczeg Zsolt
2021-05-01 — 00:36
Hi,
Yes, the checks are actually incorrect as well. Use grep -R to find the policy file and flip the value from n to y.
I may do a writeup this weekend if there’s interest.
hic
2021-05-01 — 23:13
Hi! Thanks for this! I’m trying to compile the kernel, but when I set the configurations (I only changed one option) according to the instructions, I get this error (twice, one for each thing I had to enter configuration for):
check-config: /tmp/tmp.9zEtIUGK1D/CONFIGS/amd64-config.flavour.generic: loading config
check-config: /home/harrison/Documents/audio-fix/kernel/linux-5.11.0/debian.master/config/annotations loading annotations
check-config: FAIL (y != n): CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES policy
check-config: 11050/11051 checks passed — exit 1
check-config: /tmp/tmp.9zEtIUGK1D/CONFIGS/amd64-config.flavour.lowlatency: loading config
check-config: /home/harrison/Documents/audio-fix/kernel/linux-5.11.0/debian.master/config/annotations loading annotations
check-config: FAIL (y != n): CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES policy
check-config: 11050/11051 checks passed — exit 1
I probably messed something up. Total noob at this, any pointers would be appreciated! I believe this is causing a problem later on where not all packages compile.
hic
2021-05-01 — 23:14
Sorry, just noticed you already responded to a similar comment. Will try that. Feel free to delete these comments.
hic
2021-05-02 — 03:47
Got it to work. Wrote up some of the extra steps I had to take here in case it’s helpful for anyone: https://www.reddit.com/r/Dell/comments/n27cbr/audio_on_ubuntu_2104_on_dell_latitude_9510/
Warning: I’m no expert, just tried to describe what I did.
Thanks for your solution!
Eduard (jongeduard)
2021-06-04 — 21:31
Changing that annotations file is indeed a weird extra step that you have tot take.
Googling for the error that I got (or actually other errors as well), brought me to the final solution. 😛
The fun of finding all this stuff out how to make your own build of a kernel is that you learn a lot from it.
Mr. Anonimus
2021-04-23 — 04:34
Ubuntu 21.04 with kernel 5.11 does not seem to have sound working out the box. Mark, could you create a blog article on how to fix this?
Dusan
2021-04-24 — 09:20
Yes, that would be really great!!!
Alex
2021-04-26 — 16:23
Also, they just updated the linux-firmware package (https://launchpad.net/ubuntu/+source/linux-firmware). The release notes from 1.190.4 say this:
“alsa/sdw: support soundwire audio for TGL-H machines (LP: #1911830)
– SAUCE: sof-firmware: add TGL-H firmware from sof-bin v1.6.1”
Could this be relevant to the XPS?
mark
2021-04-27 — 10:49
I wouldn’t say so.
Alex
2021-05-26 — 05:47
An Ubuntu dev just enabled CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m by default on kernels 5.11, 5..13-rc2 and onward. I don’t know if CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y is also required, per a post above, but it may work out of the box on these kernels now.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1921632
Milan
2021-06-23 — 19:58
I have updated my Ubuntu and the speakers are now working. Thanks everyone.
Julian
2021-06-24 — 20:36
Yeah, I just did a regular software update on Ubuntu 21.04 via GUI and speakers are working fine now.
The microphone and audio jack are still not working though.
Julian
2021-06-25 — 14:24
Actually, after multiple reboots and a day later, now everything is working.
Speakers + internal mic as well as Audio+Mic Jack – nice!
One last thing I noticed, is that it seems the external microphone jack seems to record the computers audio output – that might be problematic for conferencing but might only be a bad setup somewhere on my machine.
Somebody else experiencing this too?
Tiago
2021-06-14 — 16:01
Hi,
I managed to have sound with kernel 5.8, however, after dist and kernel upgrades, the problem still remains. Please, see below:
– Ubuntu 21.04
– 5.12.8-051208-generic
– journalctl: https://gist.github.com/tiagosalvado10/c5639653d8e82c7d68363ac17cdd95dd
The sound works connecting headphones to DELL WD19TB (dock). Any hint or any other solution besides building the kernel manually?
Herczeg Zsolt
2021-07-06 — 09:21
Hi All,
Just wanted to give a heads-up that Ubuntu 21.04 has received the 22nd patch of it’s linux kernel “5.11.0-22-generic”. It now has support for all audio of XPS 9700.
So the steps to get it working is as simple as:
– Install Ubuntu 20.04
– Run a full upgrade with “sudo apt full-upgrade”
– Reboot the the new kernel automatically installed by apt.
No kernel compilation or DKMS is needed anymore.
Matthew
2021-09-15 — 13:46
Hello!
I just installed xubuntu 20.04.3LTS and have chosen proprietary drivers etc. during installation.
Sound and graphics work so far!
Matthew
2021-09-15 — 00:33
I genuinely appreciate all of your work here in the comments section!
Thank you so much guys!
meowsqueak
2021-12-15 — 04:56
How much of this do you think would apply to the 9710 (2021)?
mark
2021-12-15 — 11:00
Allegedly, it uses the same codecs, https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1935850 so it should work out of the box for 5.11 kernel +