damentz / liquorix-package

Liquorix Debian Package
https://liquorix.net
GNU General Public License v2.0
285 stars 23 forks source link

No Intel Tiger Lake audio driver with Liquorix-Kernel 6.8.9-2 for Debian Trixie, with 6.8.9-1 it is ok #170

Closed meijkl closed 4 months ago

meijkl commented 4 months ago

Upgraded yesterday to "Liquorix-Kernel 6.8.9-2-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 6.8-11.1~trixie (2024-05-06) x86_64 GNU/Linux" and the audio driver was no longer available:

$ cat /proc/asound/cards --- no soundcards ---

With version 6.8.9-1 it is ok:

$ cat /proc/asound/cards 0 [sofhdadsp ]: sof-hda-dsp - sof-hda-dsp DellInc.-Inspiron75062n1

$ lspci | grep -i audio 00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)

Do you need further information?

Looking forward to your feedback + many thanks for your efforts Klaus

damentz commented 4 months ago

What is the output of the following command?

find /etc/sysctl* -type f | xargs grep max_map_count

The last kernel update in 6.8.9-2 simply makes this value read only so that distributions don't tamper with it. The value it sets makes it effectively unlimited. What might be happening is a script that runs at boot tries changing this value and crashes whatever remaining steps it wants to take.

meijkl commented 4 months ago

The output is null, no output at all: root@my-i7506:/home/my# find /etc/sysctl* -type f | xargs grep max_map_count root@my-i7506:/home/my#

Output of the first command is: root@my-i7506:/home/my# find /etc/sysctl* -type f /etc/sysctl.conf /etc/sysctl.conf.dpkg-dist /etc/sysctl.d/99-i915psp.conf /etc/sysctl.d/README.sysctl root@my-i7506:/home/my#

damentz commented 4 months ago

Interesting, can you provide the output on both kernels with cat /proc/sys/vm/max_map_count ?

meijkl commented 4 months ago

Identical for both kernels:

6.8.9-1: root@my-i7506:/home/my# cat /proc/sys/vm/max_map_count 2147483642 root@my-i7506:/home/my#

6.8.9-2: root@my-i7506:/home/my# cat /proc/sys/vm/max_map_count 2147483642 root@my-i7506:/home/my# uname -a Linux my-i7506 6.8.9-2-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 6.8-11.1~trixie (2024-05-06) x86_64 GNU/Linux

damentz commented 4 months ago

Ok, I have a few things I'd like you to try:

  1. Provide the output of inxi -Axx for both kernels. Separately, I would appreciate output of inxi -b to understand what system you're running.
  2. On both kernels run lsmod | awk '{print $1}' | head -n -1 | sort > results.txt (use a unique name for each file). Once you have both, run diff -Npau result1 result2, where result1 and result2 are the two file names.
  3. Compare the kernel logs between the two kernels. To keep it simple, look for errors with sudo journalctl -kp3 per boot. Issues with loading sof-hda-dsp may also be hidden elsewhere in the logs; looking for alsa, hda, sound, etc, may be necessary to get any interesting kernel logs that may indicate the problem.

And last, I suspect something else is going on with your system. Have you tried overall doing a full power cycle where power is removed entirely to let capacitors drain on your motherboard? I'm wondering if your audio not working is just a coincidence and not related to the kernel at all.

meijkl commented 4 months ago

Good Morning!

Let's start with an answer to your final remark: The problem with kernel 6.8.9-2 shows up deterministically and when I reboot to Debian kernel 6.1 or Liquorix 6.8.9-1 audio works deterministically and immediately without powercycling etc.

I've executed all commands as requested but while trying some other checks I've maybe found the root cause:

6.8.9-2: root@my-i7506:/home/my# dmesg|grep hda [ 3.694478] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 3.694610] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver [ 4.023099] failed to validate module [snd_sof_intel_hda_common] BTF: -22

6.8.9-1: root@my-i7506:/home/my# dmesg|grep hda [ 3.756137] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 3.758546] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver [ 4.101401] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5 [ 4.101404] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now [ 4.108851] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology file: intel/sof-tplg/sof-hda-generic-2ch.tplg [ 4.208275] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred [ 4.264839] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC3204: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker [ 4.270103] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 4.270107] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0) [ 4.270109] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0 [ 4.274388] snd_hda_codec_realtek ehdaudio0D0: inputs: [ 4.274390] snd_hda_codec_realtek ehdaudio0D0: Headset Mic=0x19 [ 4.274392] snd_hda_codec_realtek ehdaudio0D0: Headphone Mic=0x1a [ 4.317802] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3 [ 4.336107] input: sof-hda-dsp Headphone Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input28 [ 4.337341] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input29 [ 4.337379] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input30 [ 4.337418] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input31

Please let me know if you still need the output from the other commands.

damentz commented 4 months ago

Can you try the latest kernel that was released yesterday?

Reading about instances of failed to validate module [<MODULE NAME>] BTF: -22 indicates some type error compiling code. Debian builds are still performed from my local system for cost reasons, but I intend to move them into the cloud at some point once I can make sure costs stay manageable. This means the build could have been affected by a bit flip in memory (I don't have ECC memory to account for that), and that could cause anomalies in builds.

meijkl commented 4 months ago

Great, it works! Thanks for your effort!

root@my-i7506:/home/my# uname -a Linux my-i7506 6.8.9-3-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 6.8-12.1~trixie (2024-05-09) x86_64 GNU/Linux root@my-i7506:/home/my# dmesg|grep hda [ 3.966240] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 3.966356] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver [ 4.128503] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5 [ 4.128507] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now [ 4.134828] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology file: intel/sof-tplg/sof-hda-generic-2ch.tplg [ 4.236765] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred [ 4.295821] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC3204: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker [ 4.295826] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 4.295828] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0) [ 4.295829] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0 [ 4.295830] snd_hda_codec_realtek ehdaudio0D0: inputs: [ 4.295831] snd_hda_codec_realtek ehdaudio0D0: Headset Mic=0x19 [ 4.295833] snd_hda_codec_realtek ehdaudio0D0: Headphone Mic=0x1a [ 4.338484] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3 [ 4.356778] input: sof-hda-dsp Headphone Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input28 [ 4.356822] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input29 [ 4.356864] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input30 [ 4.359981] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input31

Best regards Klaus

damentz commented 4 months ago

Great! I'll have to figure out what caused the anomaly, but good to know the latest build works. Marking as resolved.