No sound on HP Spectre 14t (20.09)

I installed NixOS on my relatively recent HP Spectre 14t from late 2020 (the one with the Tigerlake Processor and 3:2 screen).

Everything runs fine except for the sound and that is a strange problem because it does work on Linux in general. I tested with Ubuntu 20.10 and 21.04 that the sound will work just fine (at least as of Kernel 5.11.13, which is currently the latest kernel version in nixpkgs).

The Archlinux wiki has a page dedicated to this device family: HP Spectre x360 (2020) - ArchWiki and they also report that it should, in theory, work relatively straight forward.

In my configuration.nix if have the following - hopefully relevant - entries:

boot.kernelPackages = pkgs.linuxPackages_latest;

sound.enable = true;
hardware.firmware = [ pkgs.unstable.sof-firmware ]; # unstable target the nixos-unstable channel (it doesn't work either way)

users.user.myuser = {
  # ...
  extraGroups = [ "wheel" "input" "video" "lp" "scanner" "audio" ];
}

And the Kernel modules / hardware-configuration.nix:

  boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "usbhid" "rtsx_pci_sdmmc" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

Any suggestion is welcome since I’m slowly out of ideas :slight_smile:


N. b.: pactl list cards, aplay -l and inxi -A all report that no device is found.

# output of dmesg | grep audio
[    2.226103] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[    2.226109] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[    2.226120] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[    2.226314] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[    3.916196] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    3.972589] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[    3.992376] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[    3.992378] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    3.992382] sof-audio-pci 0000:00:1f.3: DMICs detected in NHLT tables: 2
[    3.992473] sof-audio-pci 0000:00:1f.3: Direct firmware load for intel/sof/sof-tgl.ri failed with error -2
[    3.992475] sof-audio-pci 0000:00:1f.3: error: request firmware intel/sof/sof-tgl.ri failed err: -2
[    3.992505] sof-audio-pci 0000:00:1f.3: error: failed to load DSP firmware -2
[    3.992763] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -2
1 Like

This is what I needed on my Dell XPS 13 9310 to get sound working. This forces the card to use the snd_hda_intel driver. With the sof driver I didn’t get any sound.

{
   # Confirmed necessary to get audio working as of 2020-11-13:
   # https://bbs.archlinux.org/viewtopic.php?pid=1933643#p1933643
   boot.extraModprobeConfig = ''
     options snd-intel-dspcfg dsp_driver=1
   '';
}
1 Like

I’ll try that. Just as you answered I also found this thread: Sound not working - #3 by jravi2

I’ll have a look at the Ubuntu install again. I could image that they use this workaround by default and that the mic is probably not working there too (I haven’t checked yet).

Edit: It is as suspected. In Ubuntu the mic will also not work.

Thanks for the pointer! ^.^

I added another solution until a new nixos is released. You should get sound fully working.

2 Likes

Awesome! That does work.

Although I had one minor caveat: I needed to activate the high dpi monitor option in the BIOS which cripples the USB throughput on that dock. But that was the only issue I had.

Now the sound even works perfectly for my bluetooth headphones which did not work as expected through the extraModprobeConfig solution.

Thank you for following up @deedrah. This makes the device much more usable!