You are not logged in.

#1 2024-01-28 21:28:08

ChenWu
Member
Registered: 2024-01-28
Posts: 7

[SOLVED] Kernel does not apply kernel module snd_hda_intel

Hello,

After the recent update the kernel stopped to apply snd_hda_intel kernel module
to the internal intel audio device. My system is configured to allocate the
internal Intel UHD Graphics 630 for PCI passthrough via OVMF during the bood
process.

kernel: 6.7.2-arch1-1
kernel options:
options	root=UUID=eef16dae-87d4-4a35-8211-6b584c1b2601 rw systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M printk.devkmsg=on enforcing=0 nvidia-drm.modeset=1 intel_iommu=on iommu=pt vfio-pci.ids=8086:3e92

When I remove "vfio-pci.ids=8086:3e92" from the list of kernel parameters above
the snd_hda_intel kernel is applied to the audio device and I have no issues
with sound. 8086:3e92 is ID of the UHD Graphics 630 PCI device.

Below are some outputs that might be helpful:

dmesg | grep snd

[    2.940372] ata1.00: Features: Trust Dev-Sleep NCQ-sndrcv
[    5.337666] systemd-tmpfiles[320]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    5.338071] systemd-tmpfiles[320]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.379469] systemd-tmpfiles[320]: Entry "/dev/snd" matches include prefix "/dev".
[    5.379473] systemd-tmpfiles[320]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.379477] systemd-tmpfiles[320]: Entry "/dev/snd" matches include prefix "/dev".
[    5.379481] systemd-tmpfiles[320]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    5.512166] systemd-tmpfiles[330]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    5.512581] systemd-tmpfiles[330]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.514244] systemd-tmpfiles[330]: Entry "/dev/snd" matches include prefix "/dev".
[    5.514249] systemd-tmpfiles[330]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.514252] systemd-tmpfiles[330]: Entry "/dev/snd" matches include prefix "/dev".
[    5.514256] systemd-tmpfiles[330]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    5.913349] snd_hda_intel 0000:01:00.1: Disabling MSI
[    5.913354] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[    6.978218] systemd-tmpfiles[502]: Entry "/dev/snd/seq" matches exclude prefix "/dev", skipping.
[    6.978222] systemd-tmpfiles[502]: Entry "/dev/snd/timer" matches exclude prefix "/dev", skipping.
[    6.978321] systemd-tmpfiles[502]: Entry "/dev/snd" matches exclude prefix "/dev", skipping.
[    6.978326] systemd-tmpfiles[502]: Entry "/dev/snd/timer" matches exclude prefix "/dev", skipping.
[    6.978329] systemd-tmpfiles[502]: Entry "/dev/snd" matches exclude prefix "/dev", skipping.
[    6.978332] systemd-tmpfiles[502]: Entry "/dev/snd/seq" matches exclude prefix "/dev", skipping.

lspci -vvv -nn -s 1f.3

00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
	DeviceName: Onboard - Sound
	Subsystem: Gigabyte Technology Co., Ltd Cannon Lake PCH cAVS [1458:a0cd]
	Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 16
	IOMMU group: 12
	Region 0: Memory at 67230000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at 67000000 (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: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Kernel modules: snd_hda_intel, snd_soc_skl, snd_sof_pci_intel_cnl

Also here are the IOMMU Groups. As you can see the Audio Device [8086:a348] is
in the IOMMU Group 12 while the UHD Graphics 630 [8086:3e92] is in the IOMMU
Group 0. So that the isolating of UHD Graphics 630 [8086:3e92] should not cause
any issues with the Audio Device [8086:a348].

IOMMU Group 0:
        00:02.0 Display controller [0380]: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630] [8086:3e92]
IOMMU Group 1:
        00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec2] (rev 07)
IOMMU Group 2:
        00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
        01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU104 [GeForce RTX 2080 Rev. A] [10de:1e87] (rev a1)
        01:00.1 Audio device [0403]: NVIDIA Corporation TU104 HD Audio Controller [10de:10f8] (rev a1)
        01:00.2 USB controller [0c03]: NVIDIA Corporation TU104 USB 3.1 Host Controller [10de:1ad8] (rev a1)
        01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU104 USB Type-C UCSI Controller [10de:1ad9] (rev a1)
IOMMU Group 3:
        00:12.0 Signal processing controller [1180]: Intel Corporation Cannon Lake PCH Thermal Controller [8086:a379] (rev 10)
IOMMU Group 4:
        00:14.0 USB controller [0c03]: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller [8086:a36d] (rev 10)
        00:14.2 RAM memory [0500]: Intel Corporation Cannon Lake PCH Shared SRAM [8086:a36f] (rev 10)
IOMMU Group 5:
        00:14.3 Network controller [0280]: Intel Corporation Cannon Lake PCH CNVi WiFi [8086:a370] (rev 10)
IOMMU Group 6:
        00:16.0 Communication controller [0780]: Intel Corporation Cannon Lake PCH HECI Controller [8086:a360] (rev 10)
IOMMU Group 7:
        00:17.0 SATA controller [0106]: Intel Corporation Cannon Lake PCH SATA AHCI Controller [8086:a352] (rev 10)
IOMMU Group 8:
        00:1b.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port #17 [8086:a340] (rev f0)
IOMMU Group 9:
        00:1b.4 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 [8086:a32c] (rev f0)
IOMMU Group 10:
        00:1c.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port #1 [8086:a338] (rev f0)
IOMMU Group 11:
        00:1d.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 [8086:a330] (rev f0)
IOMMU Group 12:
        00:1f.0 ISA bridge [0601]: Intel Corporation Z390 Chipset LPC/eSPI Controller [8086:a305] (rev 10)
        00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
        00:1f.4 SMBus [0c05]: Intel Corporation Cannon Lake PCH SMBus Controller [8086:a323] (rev 10)
        00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller [8086:a324] (rev 10)
        00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (7) I219-V [8086:15bc] (rev 10)
IOMMU Group 13:
        03:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808]

I have also lts kernel installed in the system, so I tried to use it to make
sure that the issue relates to the recent kernel version. And as a result
everything works as expected. The snd_hda_intel module is successfully applied
to the Audio device.

kernel: 6.6.14-1-lts
kernel options:
options	root=UUID=eef16dae-87d4-4a35-8211-6b584c1b2601 rw systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M printk.devkmsg=on enforcing=0 nvidia-drm.modeset=1 intel_iommu=on vfio-pci.ids=8086:3e92

dmsg | grep snd

[    2.926823] ata1.00: Features: Trust Dev-Sleep NCQ-sndrcv
[    5.482601] systemd-tmpfiles[319]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    5.483146] systemd-tmpfiles[319]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.484948] systemd-tmpfiles[319]: Entry "/dev/snd" matches include prefix "/dev".
[    5.484952] systemd-tmpfiles[319]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.484956] systemd-tmpfiles[319]: Entry "/dev/snd" matches include prefix "/dev".
[    5.484960] systemd-tmpfiles[319]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    5.628652] systemd-tmpfiles[329]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    5.629071] systemd-tmpfiles[329]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.630813] systemd-tmpfiles[329]: Entry "/dev/snd" matches include prefix "/dev".
[    5.630817] systemd-tmpfiles[329]: Entry "/dev/snd/timer" matches include prefix "/dev".
[    5.630820] systemd-tmpfiles[329]: Entry "/dev/snd" matches include prefix "/dev".
[    5.630825] systemd-tmpfiles[329]: Entry "/dev/snd/seq" matches include prefix "/dev".
[    6.026950] snd_hda_intel 0000:01:00.1: Disabling MSI
[    6.026955] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[    7.226316] systemd-tmpfiles[515]: Entry "/dev/snd/seq" matches exclude prefix "/dev", skipping.
[    7.226320] systemd-tmpfiles[515]: Entry "/dev/snd/timer" matches exclude prefix "/dev", skipping.
[    7.226420] systemd-tmpfiles[515]: Entry "/dev/snd" matches exclude prefix "/dev", skipping.
[    7.226423] systemd-tmpfiles[515]: Entry "/dev/snd/timer" matches exclude prefix "/dev", skipping.
[    7.226427] systemd-tmpfiles[515]: Entry "/dev/snd" matches exclude prefix "/dev", skipping.
[    7.226430] systemd-tmpfiles[515]: Entry "/dev/snd/seq" matches exclude prefix "/dev", skipping.
[   68.082252] snd_hda_intel 0000:00:1f.3: couldn't bind with audio component
[   68.104344] systemd-udevd[334]: snd_hda_codec_generic: Device is queued (SEQNUM=4925, ACTION=add)
[   68.104360] systemd-udevd[334]: snd_hda_codec_generic: Device ready for processing (SEQNUM=4925, ACTION=add)
[   68.104383] systemd-udevd[334]: snd_hda_codec_generic: sd-device-monitor(manager): Passed 182 byte to netlink monitor.
[   68.104439] systemd-udevd[334]: snd_hda_codec_generic: Device is queued (SEQNUM=4926, ACTION=add)
[   68.104445] systemd-udevd[334]: snd_hda_codec_generic: Device ready for processing (SEQNUM=4926, ACTION=add)
[   68.104454] (udev-worker)[1324]: snd_hda_codec_generic: Processing device (SEQNUM=4925, ACTION=add)
[   68.104748] (udev-worker)[1324]: snd_hda_codec_generic: Device processed (SEQNUM=4925, ACTION=add)
[   68.104774] (udev-worker)[1324]: snd_hda_codec_generic: sd-device-monitor(worker): Passed 182 byte to netlink monitor.
[   68.104793] systemd-udevd[334]: snd_hda_codec_generic: Worker [1325] is forked for processing SEQNUM=4926.
[   68.104988] (udev-worker)[1325]: snd_hda_codec_generic: Processing device (SEQNUM=4926, ACTION=add)
[   68.105284] (udev-worker)[1325]: snd_hda_codec_generic: Device processed (SEQNUM=4926, ACTION=add)
[   68.105316] (udev-worker)[1325]: snd_hda_codec_generic: sd-device-monitor(worker): Passed 168 byte to netlink monitor.
[   68.114294] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC1220: line_outs=3 (0x1b/0x15/0x16/0x0/0x0) type:line
[   68.114300] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   68.114302] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[   68.114304] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[   68.114306] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x1e/0x0
[   68.114307] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[   68.114308] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19
[   68.114310] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18
[   68.114311] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a
[   68.134259] (udev-worker)[1323]: Inserted module 'snd_hda_codec_realtek'
[   68.135640] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[   68.136745] systemd-udevd[334]: snd_hda_codec_realtek: Device is queued (SEQNUM=4928, ACTION=add)
[   68.136753] systemd-udevd[334]: snd_hda_codec_realtek: Device ready for processing (SEQNUM=4928, ACTION=add)
[   68.136764] systemd-udevd[334]: snd_hda_codec_realtek: sd-device-monitor(manager): Passed 182 byte to netlink monitor.
[   68.136798] systemd-udevd[334]: snd_hda_codec_realtek: Device is queued (SEQNUM=4929, ACTION=add)
[   68.136805] systemd-udevd[334]: snd_hda_codec_realtek: Device ready for processing (SEQNUM=4929, ACTION=add)
[   68.136821] systemd-udevd[334]: snd_hda_codec_realtek: sd-device-monitor(manager): Passed 168 byte to netlink monitor.
[   68.136880] (udev-worker)[1324]: snd_hda_codec_realtek: Processing device (SEQNUM=4929, ACTION=add)
[   68.137089] (udev-worker)[1324]: snd_hda_codec_realtek: Device processed (SEQNUM=4929, ACTION=add)
[   68.137549] (udev-worker)[1325]: snd_hda_codec_realtek: Processing device (SEQNUM=4928, ACTION=add)
[   68.137833] (udev-worker)[1325]: snd_hda_codec_realtek: Device processed (SEQNUM=4928, ACTION=add)
[   68.137865] (udev-worker)[1325]: snd_hda_codec_realtek: sd-device-monitor(worker): Passed 182 byte to netlink monitor.
[   68.138500] (udev-worker)[1327]: Module 'snd_hda_codec_hdmi' is already loaded
[   68.138501] (udev-worker)[1323]: pcmC0D0p: Setting permissions /dev/snd/pcmC0D0p, uid=0, gid=995, mode=0660
[   68.138528] (udev-worker)[1325]: pcmC0D0c: Setting permissions /dev/snd/pcmC0D0c, uid=0, gid=995, mode=0660
[   68.138560] (udev-worker)[1323]: pcmC0D0p: Successfully created symlink '/dev/char/116:8' to '/dev/snd/pcmC0D0p'
[   68.138593] (udev-worker)[1325]: pcmC0D0c: Successfully created symlink '/dev/char/116:9' to '/dev/snd/pcmC0D0c'
[   68.139612] (udev-worker)[1329]: pcmC0D2c: Setting permissions /dev/snd/pcmC0D2c, uid=0, gid=995, mode=0660
[   68.139680] (udev-worker)[1329]: pcmC0D2c: Successfully created symlink '/dev/char/116:11' to '/dev/snd/pcmC0D2c'
[   68.139897] (udev-worker)[1330]: hwC0D0: Setting permissions /dev/snd/hwC0D0, uid=0, gid=995, mode=0660
[   68.139952] (udev-worker)[1330]: hwC0D0: Successfully created symlink '/dev/char/116:12' to '/dev/snd/hwC0D0'
[   68.140138] (udev-worker)[1324]: snd_hda_codec_realtek: sd-device-monitor(worker): Passed 168 byte to netlink monitor.
[   68.140188] (udev-worker)[1331]: hwC0D2: Setting permissions /dev/snd/hwC0D2, uid=0, gid=995, mode=0660
[   68.140248] (udev-worker)[1331]: hwC0D2: Successfully created symlink '/dev/char/116:13' to '/dev/snd/hwC0D2'
[   68.140276] (udev-worker)[1328]: pcmC0D1p: Setting permissions /dev/snd/pcmC0D1p, uid=0, gid=995, mode=0660
[   68.140332] (udev-worker)[1328]: pcmC0D1p: Successfully created symlink '/dev/char/116:10' to '/dev/snd/pcmC0D1p'
[   68.145397] (udev-worker)[1330]: controlC0: /usr/lib/udev/rules.d/60-persistent-alsa.rules:12 Added SYMLINK 'snd/by-path/pci-0000:00:1f.3'
[   68.145660] (udev-worker)[1330]: controlC0: Setting permissions /dev/snd/controlC0, uid=0, gid=995, mode=0660
[   68.145773] (udev-worker)[1330]: controlC0: Successfully created symlink '/dev/snd/by-path/pci-0000:00:1f.3' to '/dev/snd/controlC0'
[   68.145800] (udev-worker)[1330]: controlC0: Successfully created symlink '/dev/char/116:14' to '/dev/snd/controlC0'
[   68.156688] systemd[1]: dev-snd-controlC0.device: Changed dead -> plugged
[   68.156693] systemd[1]: dev-snd-by\x2dpath-pci\x2d0000:00:1f.3.device: Changed dead -> plugged

lspci -vvv -s 1f.3

00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
	DeviceName: Onboard - Sound
	Subsystem: Gigabyte Technology Co., Ltd Cannon Lake PCH cAVS
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 32, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 153
	IOMMU group: 12
	Region 0: Memory at 67230000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at 67000000 (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: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee00658  Data: 0000
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel, snd_soc_skl, snd_sof_pci_intel_cnl

Thank you in advance for any help with this problem

Last edited by ChenWu (2024-02-07 20:54:29)

Offline

#2 2024-01-28 22:28:50

seth
Member
Registered: 2012-09-03
Posts: 51,842

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

LTS has

[   68.082252] snd_hda_intel 0000:00:1f.3: couldn't bind with audio component

but pulls through.
Can you manually load the snd_hda_intel module and does it get assigned?
Please post your complete system journal for both kernel boots:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

(You don't have to reboot, eg. "…-b -1" will post the journal of the previous boot)

Offline

#3 2024-01-29 00:59:35

ChenWu
Member
Registered: 2024-01-28
Posts: 7

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

seth wrote:

LTS has

[   68.082252] snd_hda_intel 0000:00:1f.3: couldn't bind with audio component

but pulls through.
Can you manually load the snd_hda_intel module and does it get assigned?
Please post your complete system journal for both kernel boots:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

(You don't have to reboot, eg. "…-b -1" will post the journal of the previous boot)

journalctl logs:
Boot 1 (no sound)
Boot 2 (sound)

Actually, for the 1st boot the lsmod output says that the snd_hda_intel is loaded and used (1).
So, running "modprobe snd_hda_intel" causes no issues

I have also noticed that 2nd boot (with sound) has the snd_hda_codec_realtek module loaded and used.
That is not the case for the 1st boot (with no sound), that does not have this module loaded at all.

Thank you for your help

Last edited by ChenWu (2024-01-29 01:00:58)

Offline

#4 2024-01-29 09:09:32

seth
Member
Registered: 2012-09-03
Posts: 51,842

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

LTS has snd_hda_codec_hdmi
There's no realtek device in either journal (ALC1220 or elsewise), how do you playback sound?
Internal speaker? Line out? [bluetooth/usb] Headphones? … HDMI?

Offline

#5 2024-01-29 17:32:29

ChenWu
Member
Registered: 2024-01-28
Posts: 7

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

seth wrote:

LTS has snd_hda_codec_hdmi
There's no realtek device in either journal (ALC1220 or elsewise), how do you playback sound?
Internal speaker? Line out? [bluetooth/usb] Headphones? … HDMI?

I use headphones wired to the motherboard's 3.5mm jack output.
Also, my monitor has internal speakers and is connected via HDMI interface. But, I do not use it.

Offline

#6 2024-01-29 21:24:44

seth
Member
Registered: 2012-09-03
Posts: 51,842

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

So where does the RT device(?) come from? Did you try to simply load that module?
What's a general "lsmod | sort" diff between the two systems?

Also:

intel_iommu=on iommu=pt

Are those parameters necessary for your to use vfio? The section in the wiki is (rightfully) contested and ideally this should™ not be required.
Did you maybe also remove them w/ the vfio to get the device working on the main kernel?
Try to just remove them.

Offline

#7 2024-01-29 23:43:48

ChenWu
Member
Registered: 2024-01-28
Posts: 7

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

seth wrote:

So where does the RT device(?) come from? Did you try to simply load that module?
What's a general "lsmod | sort" diff between the two systems?

Also:

intel_iommu=on iommu=pt

Are those parameters necessary for your to use vfio? The section in the wiki is (rightfully) contested and ideally this should™ not be required.
Did you maybe also remove them w/ the vfio to get the device working on the main kernel?
Try to just remove them.

My motherboard Gigabyte Aorus z390 Master has ALC1220 Realtek Chip.

Also the following output says (as I understand) that the codec is used for the card 0 and device 0, that is,
the internal motherboard sound card and line-out (Headphones):

sudo dmesg | grep snd

...
[   68.181942] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC1220: line_outs=3 (
[   68.181945] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x
[   68.181947] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[   68.181948] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[   68.181949] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x1e/0x0
[   68.181950] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[   68.181951] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19
[   68.181952] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18
[   68.181953] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a

The snd_hda_codec_realtek module is added only when I start to play something
first time after boot.

Kernel: 6.7.2-arch1-1 (no sound)
lsmod | sort

Kernel: 6.6.14-1-lts (sound)
lsmod | sort

As for

intel_iommu=on and iommu=pt

intel_iommu=on is required for vfio because it is off by default in the kernel
(true at least for the arch linux kernels)

I've just tried to remove them from kernel options and this breaks the ability
to use vfio for the internal graphic.

Last edited by ChenWu (2024-01-29 23:44:11)

Offline

#8 2024-01-30 09:30:57

seth
Member
Registered: 2012-09-03
Posts: 51,842

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

I've just tried to remove them from kernel options and this breaks the ability to use vfio for the internal graphic.

Does merely adding "iommu=pt" break your sound and does using only "intel_iommu=on" allow you to vfio?

Offline

#9 2024-01-30 13:41:07

seth
Member
Registered: 2012-09-03
Posts: 51,842

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

Offline

#10 2024-01-31 12:35:30

adam.brinek
Member
Registered: 2024-01-31
Posts: 1

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

@ChenWu To be honest i am not 100% sure, that my problem is same as your's.
Had problem with same kernel and my integrated intel sound card was not showing and only sound was through hdmi from my monitor. After a few tweaking i found that i don't have loaded snd_hda_codec_realtek. And was experimenting with that.
Finally i found, that i had blacklisted i915 in one of the conf files in /etc/modprobe.d/. After i comment out line

install i915 /usr/bin/false

and rebooted the system. Intel card was found and everything is working as before.
Hope this helps.

Offline

#11 2024-01-31 13:28:08

seth
Member
Registered: 2012-09-03
Posts: 51,842

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

Not the same, but likely related - from the conditional symptoms the OP will likely not have blacklisted the i915 module, but forwarding the device will prevents its implicit loading which is why I suggested to explicitly load it after multiple confirmations that not loading i915 (typically through blacklisting, though) breaks the sound w/ the most recent kernels.

Offline

#12 2024-02-04 23:42:03

ChenWu
Member
Registered: 2024-01-28
Posts: 7

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

seth wrote:

Sorry for delay. lsmod says that the i915 module is already loaded after boot, but I tried to run "modprobe i915", with no results.
Also I tried to load snd_hda_codec_realtek manually, with no results either.

I think the problem requires digging into the kernel code changes, to find out what changes are causing this.
The only way is to go through all the patches one by one from the working version to the one with the problem. And this will require a lot of time...

Thanks everyone for your help

Offline

#13 2024-02-05 11:08:12

seth
Member
Registered: 2012-09-03
Posts: 51,842

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

seth wrote:

Does merely adding "iommu=pt" break your sound and does using only "intel_iommu=on" allow you to vfio?

Offline

#14 2024-02-05 14:30:21

ChenWu
Member
Registered: 2024-01-28
Posts: 7

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

seth wrote:
seth wrote:

Does merely adding "iommu=pt" break your sound and does using only "intel_iommu=on" allow you to vfio?

Neither intel_iommu=no nor iommu=pt breaks the sound. Only the GPU isolation (vfio-pci.ids=8086:3e92) causes the issue.
vfio isolation is not working without having IOMMU turned on. Removing the intel_iommu option solves the sound problem but prevents to use VFIO for the integrated GPU.

The problem is obviously with the GPU isolation process. Isolated GPU uses vfio driver, while normally it uses i915 driver.

Offline

#15 2024-02-05 14:37:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,831

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

Try adding  snd_hda_core.gpu_bind=0 or i915.force_probe=!* to the kernel params when wanting to use gpu isolation

https://bbs.archlinux.org/viewtopic.php … 8#p2148028

Last edited by V1del (2024-02-05 14:37:41)

Offline

#16 2024-02-07 16:55:51

ChenWu
Member
Registered: 2024-01-28
Posts: 7

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

V1del wrote:

Try adding  snd_hda_core.gpu_bind=0 or i915.force_probe=!* to the kernel params when wanting to use gpu isolation

https://bbs.archlinux.org/viewtopic.php … 8#p2148028

The snd_hda_core.gpu_bind=0 option solves the issue. Thank you all for your help!


How do I mark the topic as resolved?

Last edited by ChenWu (2024-02-07 16:57:45)

Offline

#17 2024-02-07 17:00:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,831

Re: [SOLVED] Kernel does not apply kernel module snd_hda_intel

Glad to hear, please mark as [SOLVED] by editing the title in your first post.

As for the grander issue, not sure whether relevant wikis should be adjusted or this could be worth a bug report since so many more constellations exist where one might not want to bind the sound card to the gpu rather than "explicitly setting nomodeset" that are all just breaking in a weird way...

Offline

Board footer

Powered by FluxBB