Dell XPS 2020 – How to get audio working on Linux

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 13.99.1.52 (from AUR)
  • alsa 1.2.3 including alsa-ucm-conf 1.2.3
  • dkms
  • 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.

76 Comments

Add yours →

  1. 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 πŸ™‚

    • 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

      • 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

        • 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.

  2. 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
    “`

  3. 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

  4. I’m getting
    `variable ‘${CardComponents}’ is not defined in this context!`
    after
    `alsaucm open sof-soundwire`

  5. 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

  6. 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

    • Hey, someone on Reddit just commented the CardComponents error is actually indicating it is alsa-lib that needs updated.

      • 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

        • 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?

      • 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.

        • 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

          • 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.

          • Stick your dmesg output in a pastebin?

          • Upgraded to 5.7.8-arch1-1 and audio worked automagically o.O

  7. 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?

    • Not sure, there may be some clues in `dmesg`

      • 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

        • 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)

  8. 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

  9. 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!

    • I should mention I’m running an Arch derivative (Artix) and have the same versions of the software installed as in the article. Thanks!

    • 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

      • 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

        • 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"

          • > 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.

    • Make sure you have the sof firmware

  10. 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.

    • 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.

      • 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!

        • 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?

  11. 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!

    • 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)
      “`

      • 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!

  12. 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.

    • Nice one man! Think you missed out some details under step 4 though πŸ™‚
      Apologies to bill gates for this email.

      • For step 4, you will need to leave in the line

        codecs/rt711/init.conf

        LOL, I am terrible at HTML stuff…

        • 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…

    • 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

    • Superb

    • 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?

  13. 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?

  14. 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

  15. 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?

    • 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.

      • 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?)

        • (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.

          • 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…

  16. 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?

  17. 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

  18. 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.

    • I also had this exact issue on 5.8. Unfortunately, I couldn’t figure out how to get through it.

  19. 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

  20. 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.

  21. 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.

  22. 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.

  23. Thank you nsx2brz,
    it works like a charm on ubuntu 20.04

  24. 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…

  25. Sawyer Bergeron

    2020-09-04 — 20:24

    What MRs/PRs should I be following that would make this work OOTB?

Leave a Reply

Your email address will not be published. Required fields are marked *