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.8 come out – doesn’t seem like it’s going to be more than a month – 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.)
Also, I don’t think the microphone is working, and I don’t particularly care to try and fix it. (Microphone works after a restart). And Arch / Manjaro both seem to have an issue with chromium based apps, I am having to pass –disable-gpu or I get frequent hangups (although I haven’t tried this fix).
Anyway, I am running Manjaro on Linux 5.7.7, with the relevant packages installed being:
- linux57 5.7.7
- pulseaudio-alsa 1.2.2
- pulseaudio-git 18.104.22.168 (from AUR)
- alsa 1.2.3 including alsa-ucm-conf 1.2.3
- sof-firmware 1.5.1
To build the driver:
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
This might work on other distros and versions of Linux between 5.3 and 5.7 but I only tested it on Manjaro and 5.7 – if you don’t want to change distro or upgrade your kernel there’s no harm giving it a shot, just remove BUILD_EXCLUSIVE_KERNEL from dkms.conf (and let me know if it works). If it doesn’t:
sudo dkms remove soundwire/1.3.0 sudo rm -rf /usr/src/soundwire-1.3.0
I would say at this point 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.
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.