Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio system not working after an system upgrade on my thinkpad x1yoga gen5 #330685

Closed
astrojhgu opened this issue Jul 28, 2024 · 39 comments
Closed
Labels
0.kind: bug Something is broken

Comments

@astrojhgu
Copy link

astrojhgu commented Jul 28, 2024

Describe the bug

The sound system no longer works after an upgrade from Linux 6.6.37, NixOS, 24.05 (Uakari), 24.05.2580.194846768975 to Linux 6.6.42, NixOS, 24.05 (Uakari), 24.05.3311.a1cc729dcbc3

The dmesg |grep -i audio output of the old and new system are shown here:

#followings are common part
[    0.210944] audit: initializing netlink subsys (disabled)
[    0.210955] audit: type=2000 audit(1722183481.016:1): state=initialized audit_enabled=0 res=1
[    1.455593] systemd[1]: systemd 255.6 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
[    2.045734] systemd-journald[440]: Collecting audit messages is disabled.
[    3.942619] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    3.947618] sof-audio-pci-intel-cnl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[    3.947683] sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0004 -> 0006)
[    3.950965] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[    5.156860] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.238026] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
[    5.290784] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 5
[    5.290790] sof-audio-pci-intel-cnl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[    5.290803] sof-audio-pci-intel-cnl 0000:00:1f.3: DMICs detected in NHLT tables: 4
[    5.296414] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.296421] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[    5.296439] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    5.408566] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.408572] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[    5.428343] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
# the followings are the old normal system out :
[    5.474822] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker
[    5.474829] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    5.474832] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    5.474834] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[    5.474835] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[    5.474837] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
# the followings are the new abnormal system out:
[    5.469744] sof-audio-pci-intel-cnl 0000:00:1f.3: error: source BUF2.1\xff\xff not found
[    5.470437] sof-audio-pci-intel-cnl 0000:00:1f.3: error: tplg component load failed -22
[    5.470487] sof-audio-pci-intel-cnl 0000:00:1f.3: error: failed to load DSP topology -22
[    5.470524] sof-audio-pci-intel-cnl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22

If ls /dev/snd
the old normal system outputs:

$> ls /dev/snd
by-path  controlC0  hwC0D0  hwC0D2  pcmC0D0c  pcmC0D0p  pcmC0D31p  pcmC0D3p  pcmC0D4p  pcmC0D5p  pcmC0D6c  pcmC0D7c  seq  timer

the new abnormal system outputs:

$> ls /dev/snd
seq  timer

the configuration about pipewire is

   services.pipewire = {
      enable = true;
      alsa = {
        enable = true;
        support32Bit = true;
      };
      jack.enable = true;
      pulse.enable = true;
      wireplumber.enable = false;
    };
    security.rtkit.enable = true;
    hardware.pulseaudio.enable = false;

Steps To Reproduce

Steps to reproduce the behavior:

  1. sudo nixos-rebuild boot --upgrade
  2. reboot
  3. The audio system not working now.

Expected behavior

The audio system should work just like it works before the upgrading.

Screenshots

If applicable, add screenshots to help explain your problem.

In the gnome settings, only a dummy output is shown:
image

Additional context

Add any other context about the problem here.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$sudo nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.42, NixOS, 24.05 (Uakari), 24.05.3311.a1cc729dcbc3`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05"`
 - channels(astrojhgu): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

The hardware information:

$> sudo dmidecode | grep -A3 '^System Information' 
System Information
	Manufacturer: LENOVO
	Product Name: 20UBA002CD
	Version: ThinkPad X1 Yoga Gen 5

Add a 👍 reaction to issues you find important.

@astrojhgu astrojhgu added the 0.kind: bug Something is broken label Jul 28, 2024
@quyse
Copy link
Contributor

quyse commented Jul 28, 2024

Just upgraded NixOS 24.05 and seeing the same thing on Lenovo IdeaPad 5 Pro. Dummy output only in pavucontrol.

# dmesg | fgrep -i audio
[   35.043643] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   35.043798] sof-audio-pci-intel-tgl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   35.043805] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[   35.044069] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   36.346624] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   36.400401] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[   36.438915] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
[   36.438919] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   36.438922] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[   36.444531] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   36.444534] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   36.444539] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[   36.553796] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   36.553798] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   36.573385] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[   36.573522] sof-audio-pci-intel-tgl 0000:00:1f.3: error: source EQIIR2.0@\xb2\x03 not found
[   36.573760] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[   36.573808] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[   36.573860] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
# sudo dmidecode | fgrep -A3 'System Information'
System Information
	Manufacturer: LENOVO
	Product Name: 82L3
	Version: IdeaPad 5 Pro 14ITL6

@astrojhgu astrojhgu changed the title No audio system not working after an system upgrade on my thinkpad x1yoga gen5 Audio system not working after an system upgrade on my thinkpad x1yoga gen5 Jul 29, 2024
@yves-tutti
Copy link

yves-tutti commented Jul 29, 2024

Same on X1 Carbon Gen 10 (21CBCTO1WW)

kernel messages
[ 6426.737180] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 6426.737262] sof-audio-pci-intel-tgl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 6426.737468] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 6426.737572] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 6426.743024] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[ 6426.756279] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
[ 6426.756282] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 6426.756285] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 4
[ 6426.757223] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 6426.757225] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 6426.757228] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[ 6426.873718] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 6426.873733] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 6426.874968] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[ 6426.875532] sof-audio-pci-intel-tgl 0000:00:1f.3: error: source BUF30.1\x1dİ\xd8Ùʋ\xa9\x89\x13\xb5\xd9\xf1\x19\xcd2G/I\x11\xff\x8c\x97\x17\xbe
                                                                                                                                                 \x806\xb6\xb2\xde\xe5\xf1\x99\xfc\xa4R!\xfaz\xd5`\xdbmlh\x083\xe8Q\xca\x11\xea\x11\xef?\x1e\x84	e\x14\xfc\xe2\x1dİ\xd8Ùʋ\xa9\x89\x13\xb5\xd9\xf1\x19\xcd2*P\x8ct>K\x07\x87\xd3eE\xdbs5lu\x8c\xf6\xb9A\x97\xe2Jʹ\x0f\x16\x88鯸\xa1(S\xca\x11\xea\x11\xef\xff\xf8u\xef\xb9\x1f\x0e\xee\\xb3\x85\xb0;\xe3\x1c\x0e˷:\x95\xc3\xcc\xddp\xc2*P\x8ct>K\x07\x87\xd3eE\xdbs5lu\x8c\xf6\xb9A\x97\xe2Jʹ\x0f\x16\x88鯸\xa1(_\xca\x11\xea\x11\xef\xbf\xf8u\xef\xb9\x1f\x0e\xee\\xb3\x85\xb0;\xe3\x1c\x0e˷:\x95\xc3\xcc\xddp\xc2\xc0G\x9b\x04 not found
[ 6426.875844] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[ 6426.875855] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[ 6426.875861] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22

https://www.linuxquestions.org/questions/showthread.php?p=6516952#post6516952 suggests it's about wrong firmware version.

Edit: Moving to 6.10 (boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_10;) solves it, but also breaks hardware.ipu6.

@Zylanx
Copy link

Zylanx commented Jul 30, 2024

I also have issues on an Intel NUC M15.
The devices show but the in-built microphone no longer works. I upgraded from rev: "bfb7a882678e518398ce9a31a881538679f6f092".

@Yarny0
Copy link
Contributor

Yarny0 commented Jul 30, 2024

I'm also affected...

Maybe these observations help in finding a solution:

hwinfo about sound hardware
Hardware Class: sound
Model: "Intel Audio device"
Vendor: pci 0x8086 "Intel Corporation"
Device: pci 0x51ca 
SubVendor: pci 0x17aa "Lenovo"
SubDevice: pci 0x230e 
Revision: 0x01
Driver: "sof-audio-pci-intel-tgl"
Driver Modules: "snd_sof_pci_intel_tgl"
Config Status: cfg=new, avail=yes, need=no, active=unknown
possibly relevant lines from journal
sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])                              
sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode                                                                        
sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5                                                                      
sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now                                              
sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2                                                              
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864                                                            
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0                                                     
sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30                                                
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864                                                         
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0                                                     
sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0                                                     
[85B blob data]                                                                                                                  
skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: topology: add_route failed: -22                                                   
skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: topology: could not load header: -22                                              
sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22                                                      
sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22                                                     
sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22                                
skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to instantiate card -22                                                    
skl_hda_dsp_generic: probe of skl_hda_dsp_generic failed with error -22                                                          

Bisection within nixpkgs repo identified 2ba2673 as the offending commit.

Bisection within stable kernel repo identified https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ab5a6208b4d6872b1c6ecea1867940fc668cc76d as the root cause.

The commit message states that this one is a cherry-pick of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1 . That one seems to be a security fixup: https://www.cve.org/CVERecord/?id=CVE-2024-41069 .

To check a possible link to the fireware version, I reverted ee10d90 on top of current nixos-24.05, but that did not have any effect, i.e., the bug is still present with the older linux-firmware. While it is possible that there exists another, older firmware version that could fix the problem with the current kernels, this suggests that it's a kernel problem, not a firmware problem.

@yves-tutti
Copy link

Based on the findings by @Yarny0 I found two patches which are in 6.10.y kernel-branch but not in the 6.6.43 release. By applying them to 6.6.43 in the current nixos-24.05 it seems work again.

boot.kernelPatches
      boot.kernelPatches = [
        { name = "fix-1";
          patch =  builtins.fetchurl {
            url = "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/patch/sound/soc/soc-topology.c?id=e0e7bc2cbee93778c4ad7d9a792d425ffb5af6f7";
            sha256 = "sha256:1y5nv1vgk73aa9hkjjd94wyd4akf07jv2znhw8jw29rj25dbab0q";
          };
        }
        { name = "fix-2";
          patch = builtins.fetchurl {
            url = "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/patch/sound/soc/soc-topology.c?id=0298f51652be47b79780833e0b63194e1231fa34";
            sha256 = "sha256:14xb6nmsyxap899mg9ck65zlbkvhyi8xkq7h8bfrv4052vi414yb";
          };
        }
      ];

@quyse
Copy link
Contributor

quyse commented Jul 31, 2024

Based on the findings by @Yarny0 I found two patches which are in 6.10.y kernel-branch but not in the 6.6.43 release. By applying them to 6.6.43 in the current nixos-24.05 it seems work again.
boot.kernelPatches

This fixed the issue for me, thanks!

@arbv
Copy link

arbv commented Jul 31, 2024

HP ZBook Firefly G8 - same problem.

@leNEKO
Copy link

leNEKO commented Aug 1, 2024

Same problem here

sudo nix run nixpkgs#dmidecode | fgrep -A3 'System Information'
System Information
	Manufacturer: Dell Inc.
	Product Name: XPS 9320
	Version: Not Specified
[   57.479157] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   57.484159] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[   57.484201] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[   57.484521] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   58.754487] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   58.813726] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[   58.841257] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
[   58.845633] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   58.845639] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   58.845648] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[   58.959642] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   58.959650] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   58.986355] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[   58.986541] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sink BUF3.0\xff\xffP}\x06\x88\xff\xff\xff\xfft}\x06\x88\xff\xff\xff\xff\x80}\x06\x88\xff\xff\xff\xff\x9c}\x06\x88\xff\xff\xff\xff\xa8}\x06\x88\xff\xff\xff\xff\xb4}\x06\x88\xff\xff\xff\xffg\xed\x19\xb6\x145\xc8\xd8\xcc}\x06\x88\xff\xff\xff\xff not found
[   58.986650] sof_sdw sof_sdw: ASoC: topology: add_route failed: -22
[   58.986694] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
[   58.986930] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[   58.987006] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[   58.987063] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[   58.987220] sof_sdw sof_sdw: ASoC: failed to instantiate card -22
[   58.987425] sof_sdw sof_sdw: snd_soc_register_card failed -22
[   58.987473] sof_sdw: probe of sof_sdw failed with error -22

The @yves-tutti proposed patches fix the issue as well (#330685 (comment))

@Stunkymonkey
Copy link
Contributor

has someone tested with #332002?

@leNEKO
Copy link

leNEKO commented Aug 4, 2024

@Stunkymonkey

I am not sure at all what is the proper way for testing #332002, i did try nixos-rebuild -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/release-24.05.zip boot and audio is not working better with this build.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/microphone-not-working/49807/3

@Yarny0
Copy link
Contributor

Yarny0 commented Aug 6, 2024

I can also confirm that the patches in #330685 (comment) fix the issue!

I took a closer look at the kernel versions that are packaged in NixOS 24.05 and tested them with my hardware. Here's what I observed:

Kernel contains breaking patch (discovered here) contains fixing patches (discovered here) patched kernel unpatched kernel
v6.10.3 yes yes, yes (does not apply) OK
v6.9.12 yes no OK BUGGY
v6.8.12 no no (does not apply) OK
v6.6.44 yes no OK BUGGY
v6.1.103 yes no OK BUGGY
v5.15.164 no no (does not apply) BUGGY
v5.10.223 no no (does not apply) (does not boot on my machine)
v5.4.281 no no (does not apply) (does not boot on my machine)

I guess the next step would be to propose the fixing patches for inclusion in affected LTS kernels. According to https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html , patches that fix "serious issues as reported by a user of a distribution" should only be submitted by a distribution kernel maintainer.

Dear NixOS kernel maintainer team @TredwellGit , @Ma27 , @NeQuissimus , @alyssais , how do you assess this situation? Can you help in upstreaming those patches into LTS kernels?

Thanks in advance for your support!

@alyssais
Copy link
Member

alyssais commented Aug 6, 2024

Looks like upstream is already working on it. Ping me again if this is still an issue in 6.6.45 once it comes out.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/microphone-not-working/49807/4

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/lost-laptop-audio/50306/6

@yajo
Copy link
Contributor

yajo commented Aug 10, 2024

I had the same problem and fixed it as explained here by adding:

{
  boot.extraModprobeConfig =''
    options snd-hda-intel dmic_detect=0
  '';
}

Maybe nixos-generate-config should detect this and add the patches or modprobe config to fix it?

@Yarny0
Copy link
Contributor

Yarny0 commented Aug 12, 2024

I retested with new kernels by applying #333945 . Sadly, nothing has changed -- at least on my hardware:

Kernel contains breaking patch (discovered here) contains fixing patches (discovered here) patched kernel unpatched kernel
v6.10.4 yes yes, yes (does not apply) OK
v6.6.45 yes no OK BUGGY
v6.1.104 yes no OK BUGGY

Luckily, the workaround by @yajo seems to work quite well (tested with unpatched v6.1.104, albeit superficially).

Dear @alyssais , the lkml posting you found looks promising. However, I can't find any information whether that effort is ongoing and finally ending up in a stable release. Is there anything else we can do in the meantime?

@rukmal
Copy link

rukmal commented Aug 13, 2024

I'm having the same issue on a Lenovo Thinkpad X1 12th Gen, with the kernel 6.10.3 #1-NixOS SMP PREEMPT_DYNAMIC Sat Aug 3 07:01:09 UTC 2024 x86_64 GNU/Linux.

I was able to get the speakers working by just using pulseaudio instead:

  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = true;

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/asus-zenbook-duo-2024-ux8406ma-nixos/39792/92

@callumio
Copy link
Contributor

The solution mentioned by @rukmal works for me on a MSI Summit E14 Evo (12th Gen) and the same kernel

@alyssais
Copy link
Member

Dear @alyssais , the lkml posting you found looks promising. However, I can't find any information whether that effort is ongoing and finally ending up in a stable release. Is there anything else we can do in the meantime?

I was told they'd get to it this week. They just did a release, so let's see if it ends up in the first post-release stable-queue update, and then evaluate what to do after that.

@alyssais
Copy link
Member

Just noticed the ongoing conversation beginning here.

@alyssais
Copy link
Member

@alyssais
Copy link
Member

Good news!

@alyssais
Copy link
Member

So, now that upstream is confirmed to be backporting the patches, I'd be happy to merge a Nixpkgs PR that applied them early, if somebody doesn't want to wait a week.

@moritzschaefer
Copy link
Contributor

I had the same problem and fixed it as explained here by adding:

{
  boot.extraModprobeConfig =''
    options snd-hda-intel dmic_detect=0
  '';
}

Maybe nixos-generate-config should detect this and add the patches or modprobe config to fix it?

Does this workaround need to be reverted or "doesn't it matter" once the fix is it?

@CesarGallego
Copy link

I had the same problem and fixed it as explained here by adding:

{
  boot.extraModprobeConfig =''
    options snd-hda-intel dmic_detect=0
  '';
}

Maybe nixos-generate-config should detect this and add the patches or modprobe config to fix it?

This work for me.
Thank you for your work.

@Yarny0
Copy link
Contributor

Yarny0 commented Aug 17, 2024

So, now that upstream is confirmed to be backporting the patches, I'd be happy to merge a Nixpkgs PR that applied them early, if somebody doesn't want to wait a week.

Thanks agains @alyssais for your support in this matter! For me, I can now wait for the next release.

I had the same problem and fixed it as explained here by adding:
[...]

Does this workaround need to be reverted or "doesn't it matter" once the fix is it?

I couldn't find anything but this about the term "dmic", which suggests that it's a "digital microphone". So I guess this parameter dropps support for "digital microphones". If you don't miss any functionality after adding this parameter, there shouldn't be a need to remove it later.

@Abdillah
Copy link
Contributor

It is surely related to detection in snd hda intel module: https://fossd.anu.edu.au/linux/latest/source/sound/pci/hda/hda_intel.c#L2097.

@alyssais
Copy link
Member

Should have been fixed with #335731. Let me know if the problem persists and we can re-open.

@workflow
Copy link
Contributor

workflow commented Aug 20, 2024

Same or similar issue on a Dell XPS 9700, but unfortunately none of the patches suggested above seem to work here, see #130882 (comment)

@hemangandhi
Copy link

I had the same problem and fixed it as explained here by adding:

{
  boot.extraModprobeConfig =''
    options snd-hda-intel dmic_detect=0
  '';
}

Maybe nixos-generate-config should detect this and add the patches or modprobe config to fix it?

I still needed this after upgrading. Is nixos-generate-config supposed to run after the upgrade or should this be a manual intervention?

@leNEKO
Copy link

leNEKO commented Aug 24, 2024

If i read this correctly https://nixpk.gs/pr-tracker.html?pr=335741 the PR does not seem to be available yet in nixos-24.05 ?

@AchmadFathoni
Copy link

I had the same problem and fixed it as explained here by adding:

{
  boot.extraModprobeConfig =''
    options snd-hda-intel dmic_detect=0
  '';
}

Maybe nixos-generate-config should detect this and add the patches or modprobe config to fix it?

I still needed this after upgrading. Is nixos-generate-config supposed to run after the upgrade or should this be a manual intervention?

I don't, I never run nixos-generate-config neither. 0a28ab9 just works. maybe you need to restart your computer.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/no-more-sound-on-laptop-after-upgrade-tuxedo-infinitybook-pro-16-gen7/52296/1

@astrojhgu
Copy link
Author

It seems still not solved ?

Now not any audio device is detected, even dummy sinks!

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.52, NixOS, 24.05 (Uakari), 24.05.5366.fbca5e745367`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

@donottellmetonottellyou
Copy link

donottellmetonottellyou commented Oct 1, 2024

It seems still not solved ?

It's solved for me?

Now not any audio device is detected, even dummy sinks!

I have this issue when I first start up sometimes, unplugging and replugging the audio jack for my headphones fixes this for me.

Maybe this is best diagnosed on NixOS discourse?

@p-alik
Copy link
Contributor

p-alik commented Oct 10, 2024

I had the same problem and fixed it as explained here by adding:

{
  boot.extraModprobeConfig =''
    options snd-hda-intel dmic_detect=0
  '';
}

Doesn't help me. dmic_detect is deprecated

$ dmesg | grep snd
[    0.000000] Command line: initrd=\EFI\nixos\gsbihx2ywlrjlq3jjc2sfm6diyjqix49-initrd-linux-6.6.54-initrd.efi init=/nix/store/by1iw9lb41qpgx08l2wkl04ycsx85pvi-nixos-system-ls03064-24.05.5562.1bfbbbe5bbf8/init i915.enable_psr=0 snd-intel-dspcfg.dsp_driver=1 loglevel=4
[    0.054511] Kernel command line: initrd=\EFI\nixos\gsbihx2ywlrjlq3jjc2sfm6diyjqix49-initrd-linux-6.6.54-initrd.efi init=/nix/store/by1iw9lb41qpgx08l2wkl04ycsx85pvi-nixos-system-ls03064-24.05.5562.1bfbbbe5bbf8/init i915.enable_psr=0 snd-intel-dspcfg.dsp_driver=1 loglevel=4
[   37.804591] snd_hda_intel 0000:00:1f.3: dmic_detect option is deprecated, pass snd-intel-dspcfg.dsp_driver=1 option instead
[   37.804618] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[   37.804802] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])

@p-alik
Copy link
Contributor

p-alik commented Oct 10, 2024

The issue persist for boot.kernelPackages = pkgs.linuxPackages_latest;

$ nix-info --markdown
 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.2, NixOS, 24.05 (Uakari), 24.05.5562.1bfbbbe5bbf8`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Edit:
Kernel 6.6.43 with the patch shared above by @yves-tutti resolved the problem for me. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests