Bug 1202492 - Audio devices missing when running kernel 5.19.x
Audio devices missing when running kernel 5.19.x
Status: RESOLVED FIXED
: 1202452 (view as bug list)
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Sound
Current
x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
: ---
Assigned To: Joerg Roedel
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-17 12:20 UTC by Martti Laaksonen
Modified: 2022-09-12 10:19 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
dmesg output from kernel 5.18.15 (95.08 KB, text/plain)
2022-08-17 12:20 UTC, Martti Laaksonen
Details
lsmod output from kernel 5.18.15 (7.76 KB, text/plain)
2022-08-17 12:21 UTC, Martti Laaksonen
Details
alsa-info.sh output from kernel 5.18.15 (45.26 KB, text/plain)
2022-08-17 12:22 UTC, Martti Laaksonen
Details
inxi -xxA output from kernel 5.18.15 (515 bytes, text/plain)
2022-08-17 12:23 UTC, Martti Laaksonen
Details
dmesg output from kernel 5.19.1 (93.77 KB, text/plain)
2022-08-17 12:23 UTC, Martti Laaksonen
Details
lsmod output from kernel 5.19.1 (7.47 KB, text/plain)
2022-08-17 12:24 UTC, Martti Laaksonen
Details
alsa-info.sh output from kernel 5.19.1 (5.81 KB, text/plain)
2022-08-17 12:24 UTC, Martti Laaksonen
Details
inxi -xxA output from kernel 5.19.1 (470 bytes, text/plain)
2022-08-17 12:25 UTC, Martti Laaksonen
Details
modprobe commands - reload snd-hda-intel (4.38 KB, text/plain)
2022-08-17 14:59 UTC, Martti Laaksonen
Details
dmesg output after reload of snd-hda-intel (94.93 KB, text/plain)
2022-08-17 14:59 UTC, Martti Laaksonen
Details
kernel 5.18.15 snd-hda-intel modinfo (10.17 KB, text/plain)
2022-08-17 15:30 UTC, Martti Laaksonen
Details
kernel 5.19.1 snd-hda-intel modinfo (10.17 KB, text/plain)
2022-08-17 15:31 UTC, Martti Laaksonen
Details
dmesg output from kernel 5.19.1-4.g4fdb301-default (93.98 KB, text/plain)
2022-08-17 18:48 UTC, Martti Laaksonen
Details
lsmod output from kernel 5.19.1-4.g4fdb301-default (7.43 KB, text/plain)
2022-08-17 18:48 UTC, Martti Laaksonen
Details
alsa-info.sh output from kernel 5.19.1-4.g4fdb301-default (5.79 KB, text/plain)
2022-08-17 18:49 UTC, Martti Laaksonen
Details
dmesg output from kernel 6.0.0-rc1-3.g7bd57d5-default (96.27 KB, text/plain)
2022-08-17 18:50 UTC, Martti Laaksonen
Details
lsmod output from kernel 6.0.0-rc1-3.g7bd57d5-default (7.59 KB, text/plain)
2022-08-17 18:50 UTC, Martti Laaksonen
Details
alsa-info.sh output from kernel 6.0.0-rc1-3.g7bd57d5-default (5.83 KB, text/plain)
2022-08-17 18:50 UTC, Martti Laaksonen
Details
dmesg output from kernel 5.19.1-1.ga80d391-default (132.31 KB, text/plain)
2022-08-18 10:49 UTC, Martti Laaksonen
Details
dmesg output from kernel 5.19.1-1.ga80d391-default amd_iommu=off (130.58 KB, text/plain)
2022-08-18 11:47 UTC, Martti Laaksonen
Details
dmesg output from kernel 5.19.1-1.g6993685-default (96.75 KB, text/plain)
2022-08-19 06:31 UTC, Martti Laaksonen
Details
dmesg output from kernel 5.19.3-1.g6a8683f-default (98.20 KB, text/plain)
2022-08-23 11:29 UTC, Martti Laaksonen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martti Laaksonen 2022-08-17 12:20:22 UTC
Opening a new bug report as suggested in https://bugzilla.opensuse.org/show_bug.cgi?id=1202452.

After Tumbleweed releases started shipping kernel 5.19 sound input and output devices are missing.

When booted with previous kernel 5.18.15 audio devices are present and working.

The (hopefully) relevant details between 5.18 and 5.19 kernels are in the attached files.
Comment 1 Martti Laaksonen 2022-08-17 12:20:55 UTC
Created attachment 860835 [details]
dmesg output from kernel 5.18.15
Comment 2 Martti Laaksonen 2022-08-17 12:21:55 UTC
Created attachment 860836 [details]
lsmod output from kernel 5.18.15
Comment 3 Martti Laaksonen 2022-08-17 12:22:35 UTC
Created attachment 860837 [details]
alsa-info.sh output from kernel 5.18.15
Comment 4 Martti Laaksonen 2022-08-17 12:23:13 UTC
Created attachment 860838 [details]
inxi -xxA output from kernel 5.18.15
Comment 5 Martti Laaksonen 2022-08-17 12:23:51 UTC
Created attachment 860839 [details]
dmesg output from kernel 5.19.1
Comment 6 Martti Laaksonen 2022-08-17 12:24:18 UTC
Created attachment 860840 [details]
lsmod output from kernel 5.19.1
Comment 7 Martti Laaksonen 2022-08-17 12:24:57 UTC
Created attachment 860841 [details]
alsa-info.sh output from kernel 5.19.1
Comment 8 Martti Laaksonen 2022-08-17 12:25:19 UTC
Created attachment 860842 [details]
inxi -xxA output from kernel 5.19.1
Comment 9 Takashi Iwai 2022-08-17 14:01:23 UTC
Could you try to reload snd-hda-intel module?  e.g. logout, goto VT1, and do
  modprobe -r snd-hda-intel
  modprobe snd-hda-intel

and give the dmesg output afterward.
Comment 10 Takashi Iwai 2022-08-17 14:03:38 UTC
Oh, at the second modprobe, try to pass dyndbg=+p option, i.e.
  modprobe snd-hda-intel dyndbg=+p
Comment 11 Martti Laaksonen 2022-08-17 14:57:59 UTC
Ok, I did what you asked, twice actually, because when I checked the dmesg output after the first time, I did not see anything sound driver related output.
Nothing on the second attempt either.

Logs attached.
Comment 12 Martti Laaksonen 2022-08-17 14:59:13 UTC
Created attachment 860844 [details]
modprobe commands - reload snd-hda-intel
Comment 13 Martti Laaksonen 2022-08-17 14:59:56 UTC
Created attachment 860845 [details]
dmesg output after reload of snd-hda-intel
Comment 14 Takashi Iwai 2022-08-17 15:03:54 UTC
Thanks.  That's weird.

Could you give the output of "modinfo snd-hda-intel" on 5.19.1 kernel?
Comment 15 Takashi Iwai 2022-08-17 15:04:15 UTC
... also modinfo from 5.18 kernel, too.
Comment 16 Martti Laaksonen 2022-08-17 15:30:37 UTC
Created attachment 860846 [details]
kernel 5.18.15 snd-hda-intel modinfo
Comment 17 Martti Laaksonen 2022-08-17 15:31:10 UTC
Created attachment 860847 [details]
kernel 5.19.1 snd-hda-intel modinfo
Comment 18 Takashi Iwai 2022-08-17 15:33:13 UTC
The modinfo outputs look OK as well.  Both contain the modalias for your devices (1022:15e3), so that's expected.

Now, please check how the sysfs entries for snd-hda-intel look (after loading snd-hda-intel).  For example, in /sys/bus/pci/drivers directory, it should have snd_hda_intel subdirectory.  On my machine, it's like:

% ls -l /sys/bus/pci/drivers/snd_hda_intel/
total 0
lrwxrwxrwx 1 root root    0 Aug 17 17:16 0000:00:1f.3 -> ../../../../devices/pci0000:00/0000:00:1f.3
--w------- 1 root root 4096 Aug 17 17:16 bind
lrwxrwxrwx 1 root root    0 Aug 17 13:20 module -> ../../../../module/snd_hda_intel
--w------- 1 root root 4096 Aug 17 17:16 new_id
--w------- 1 root root 4096 Aug 17 17:16 remove_id
--w------- 1 root root 4096 Aug 17 13:19 uevent
--w------- 1 root root 4096 Aug 17 17:16 unbind

Does the subdirectory exist on your 5.19 system?
Comment 19 Takashi Iwai 2022-08-17 15:39:19 UTC
If the subdirectory for snd_hda_intel is present, try the following:

% echo 0000:0b:00.6 > /sys/bus/pci/drivers/snd_hda_intel/bind

It corresponds to the PCI slot of your onboard audio.
Comment 20 Martti Laaksonen 2022-08-17 16:01:50 UTC
The subdirectory exists but it is missing those links to PCI devices.

5.18.15-1-default:
total 0
lrwxrwxrwx 1 root root    0 elo    17 18:39 0000:0b:00.1 -> ../../../../devices/pci0000:00/0000:00:08.1/0000:0b:00.1
lrwxrwxrwx 1 root root    0 elo    17 18:39 0000:0b:00.6 -> ../../../../devices/pci0000:00/0000:00:08.1/0000:0b:00.6
--w------- 1 root root 4096 elo    17 18:39 bind
lrwxrwxrwx 1 root root    0 elo    17 18:27 module -> ../../../../module/snd_hda_intel
--w------- 1 root root 4096 elo    17 18:39 new_id
--w------- 1 root root 4096 elo    17 18:39 remove_id
--w------- 1 root root 4096 elo    17 18:27 uevent
--w------- 1 root root 4096 elo    17 18:39 unbind

5.19.1-1-default:
total 0
--w------- 1 root root 4096 elo    17 18:44 bind
lrwxrwxrwx 1 root root    0 elo    17 18:44 module -> ../../../../module/snd_hda_intel
--w------- 1 root root 4096 elo    17 18:44 new_id
--w------- 1 root root 4096 elo    17 18:44 remove_id
--w------- 1 root root 4096 elo    17 18:43 uevent
--w------- 1 root root 4096 elo    17 18:44 unbind

Trying to do that bind thingy using either of the PCI slots shown in kernel 5.18.15 sysfs directory listing fails with 'Device or resource busy' error.

bender:~ # echo 0000:0b:00.6 > /sys/bus/pci/drivers/snd_hda_intel/bind
-bash: echo: write error: Device or resource busy
bender:~ # echo 0000:0b:00.1 > /sys/bus/pci/drivers/snd_hda_intel/bind
-bash: echo: write error: Device or resource busy
Comment 21 Takashi Iwai 2022-08-17 16:04:51 UTC
OK, and what are bound on those devices?  You can see the entries in /sys/bus/pci/devices/* subdirectories.

The bound driver could be seen in the symlink there, e.g. on mine is such as:

% ls -l /sys/bus/pci/devices/0000:00:1f.3/driver
lrwxrwxrwx 1 root root 0 Aug 17 13:19 /sys/bus/pci/devices/0000:00:1f.3/driver -> ../../../bus/pci/drivers/snd_hda_intel/
Comment 22 Martti Laaksonen 2022-08-17 16:26:55 UTC
Nothing is bound on them, as far as I can tell.

Just to be sure I'm still looking at correct devices, 'lspci -D' displays these devices:
0000:0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
0000:0b:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller


mlaakson@bender:~> ls -l /sys/bus/pci/devices/0000:0b:00.1/
total 0
-r--r--r-- 1 root root  4096 elo    17 19:15 ari_enabled
-rw-r--r-- 1 root root  4096 elo    17 19:15 broken_parity_status
-r--r--r-- 1 root root  4096 elo    17 18:50 class
-rw-r--r-- 1 root root  4096 elo    17 18:50 config
-r--r--r-- 1 root root  4096 elo    17 19:15 consistent_dma_mask_bits
-r--r--r-- 1 root root  4096 elo    17 19:15 current_link_speed
-r--r--r-- 1 root root  4096 elo    17 19:15 current_link_width
-rw-r--r-- 1 root root  4096 elo    17 19:15 d3cold_allowed
-r--r--r-- 1 root root  4096 elo    17 18:50 device
-r--r--r-- 1 root root  4096 elo    17 19:15 dma_mask_bits
-rw-r--r-- 1 root root  4096 elo    17 19:15 driver_override
-rw-r--r-- 1 root root  4096 elo    17 19:15 enable
lrwxrwxrwx 1 root root     0 elo    17 19:15 iommu -> ../../0000:00:00.2/iommu/ivhd0
lrwxrwxrwx 1 root root     0 elo    17 18:50 iommu_group -> ../../../../kernel/iommu_groups/1
-r--r--r-- 1 root root  4096 elo    17 18:50 irq
drwxr-xr-x 2 root root     0 elo    17 19:15 link
-r--r--r-- 1 root root  4096 elo    17 19:15 local_cpulist
-r--r--r-- 1 root root  4096 elo    17 19:15 local_cpus
-r--r--r-- 1 root root  4096 elo    17 19:15 max_link_speed
-r--r--r-- 1 root root  4096 elo    17 19:15 max_link_width
-r--r--r-- 1 root root  4096 elo    17 19:15 modalias
-rw-r--r-- 1 root root  4096 elo    17 19:15 msi_bus
-rw-r--r-- 1 root root  4096 elo    17 18:50 numa_node
drwxr-xr-x 2 root root     0 elo    17 19:15 power
-r--r--r-- 1 root root  4096 elo    17 19:15 power_state
--w--w---- 1 root root  4096 elo    17 19:15 remove
--w------- 1 root root  4096 elo    17 19:15 rescan
--w------- 1 root root  4096 elo    17 19:15 reset
-rw-r--r-- 1 root root  4096 elo    17 19:15 reset_method
-r--r--r-- 1 root root  4096 elo    17 19:15 resource
-rw------- 1 root root 16384 elo    17 19:15 resource0
-r--r--r-- 1 root root  4096 elo    17 18:50 revision
lrwxrwxrwx 1 root root     0 elo    17 18:50 subsystem -> ../../../../bus/pci
-r--r--r-- 1 root root  4096 elo    17 18:50 subsystem_device
-r--r--r-- 1 root root  4096 elo    17 18:50 subsystem_vendor
lrwxrwxrwx 1 root root     0 elo    17 19:15 supplier:pci:0000:0b:00.0 -> ../../../virtual/devlink/pci:0000:0b:00.0--pci:0000:0b:00.1
-rw-r--r-- 1 root root  4096 elo    17 18:50 uevent
-r--r--r-- 1 root root  4096 elo    17 18:50 vendor


mlaakson@bender:~> ls -l /sys/bus/pci/devices/0000:0b:00.6/
total 0
-r--r--r-- 1 root root  4096 elo    17 19:14 ari_enabled
-rw-r--r-- 1 root root  4096 elo    17 19:14 broken_parity_status
-r--r--r-- 1 root root  4096 elo    17 18:50 class
-rw-r--r-- 1 root root  4096 elo    17 18:50 config
-r--r--r-- 1 root root  4096 elo    17 19:14 consistent_dma_mask_bits
-r--r--r-- 1 root root  4096 elo    17 19:14 current_link_speed
-r--r--r-- 1 root root  4096 elo    17 19:14 current_link_width
-rw-r--r-- 1 root root  4096 elo    17 19:14 d3cold_allowed
-r--r--r-- 1 root root  4096 elo    17 18:50 device
-r--r--r-- 1 root root  4096 elo    17 19:14 dma_mask_bits
-rw-r--r-- 1 root root  4096 elo    17 19:14 driver_override
-rw-r--r-- 1 root root  4096 elo    17 19:14 enable
lrwxrwxrwx 1 root root     0 elo    17 19:14 firmware_node -> ../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:33/device:41
lrwxrwxrwx 1 root root     0 elo    17 19:14 iommu -> ../../0000:00:00.2/iommu/ivhd0
lrwxrwxrwx 1 root root     0 elo    17 18:50 iommu_group -> ../../../../kernel/iommu_groups/1
-r--r--r-- 1 root root  4096 elo    17 18:50 irq
drwxr-xr-x 2 root root     0 elo    17 19:14 link
-r--r--r-- 1 root root  4096 elo    17 19:14 local_cpulist
-r--r--r-- 1 root root  4096 elo    17 19:14 local_cpus
-r--r--r-- 1 root root  4096 elo    17 19:14 max_link_speed
-r--r--r-- 1 root root  4096 elo    17 19:14 max_link_width
-r--r--r-- 1 root root  4096 elo    17 19:14 modalias
-rw-r--r-- 1 root root  4096 elo    17 19:14 msi_bus
-rw-r--r-- 1 root root  4096 elo    17 18:50 numa_node
drwxr-xr-x 2 root root     0 elo    17 19:14 power
-r--r--r-- 1 root root  4096 elo    17 19:14 power_state
--w--w---- 1 root root  4096 elo    17 19:14 remove
--w------- 1 root root  4096 elo    17 19:14 rescan
-r--r--r-- 1 root root  4096 elo    17 19:14 resource
-rw------- 1 root root 32768 elo    17 19:14 resource0
-r--r--r-- 1 root root  4096 elo    17 18:50 revision
lrwxrwxrwx 1 root root     0 elo    17 18:50 subsystem -> ../../../../bus/pci
-r--r--r-- 1 root root  4096 elo    17 18:50 subsystem_device
-r--r--r-- 1 root root  4096 elo    17 18:50 subsystem_vendor
-rw-r--r-- 1 root root  4096 elo    17 18:50 uevent
-r--r--r-- 1 root root  4096 elo    17 18:50 vendor
-r--r--r-- 1 root root  4096 elo    17 19:14 waiting_for_supplier
Comment 23 Takashi Iwai 2022-08-17 16:59:33 UTC
Hrm, it's not trivial to see what's blocking :-<

Just to be sure, could you try 6.0-rc1 kernel to see whether the same issue is present?  A kernel is found in OBS Kernel:HEAD repo.
Also, the latest 5.19.x kernel is found in OBS Kernel:stable repo, too.

6.0-rc1 kernel has some known issue, so we'd like to see only whether it detects the devices at boot or not.
Comment 24 Martti Laaksonen 2022-08-17 18:47:08 UTC
Tested with:
kernel:stable 5.19.1-4.g4fdb301-default
kernel:HEAD 6.0.0-rc1-3.g7bd57d5-default.

No change, audio devices are still missing.
Comment 25 Martti Laaksonen 2022-08-17 18:48:15 UTC
Created attachment 860856 [details]
dmesg output from kernel 5.19.1-4.g4fdb301-default
Comment 26 Martti Laaksonen 2022-08-17 18:48:49 UTC
Created attachment 860857 [details]
lsmod output from kernel 5.19.1-4.g4fdb301-default
Comment 27 Martti Laaksonen 2022-08-17 18:49:25 UTC
Created attachment 860858 [details]
alsa-info.sh output from kernel 5.19.1-4.g4fdb301-default
Comment 28 Martti Laaksonen 2022-08-17 18:50:03 UTC
Created attachment 860859 [details]
dmesg output from kernel 6.0.0-rc1-3.g7bd57d5-default
Comment 29 Martti Laaksonen 2022-08-17 18:50:35 UTC
Created attachment 860860 [details]
lsmod output from kernel 6.0.0-rc1-3.g7bd57d5-default
Comment 30 Martti Laaksonen 2022-08-17 18:50:58 UTC
Created attachment 860861 [details]
alsa-info.sh output from kernel 6.0.0-rc1-3.g7bd57d5-default
Comment 31 Martti Laaksonen 2022-08-17 18:54:22 UTC
snd-hda-intel reload also does not have any effect on either kernel.
Comment 32 Takashi Iwai 2022-08-18 05:52:33 UTC
Thanks.  It's no surprising, let's continue debugging.  You can uninstall 6.0-rc1 and Kernel:stable kernel packages again.

I'm building a test kernel with a debug patch in OBS home:tiwai:bsc1202492 repo.
The kernel should be available later (after an hour or so) at
  http://download.opensuse.org/repositories/home:/tiwai:/bsc1202492/standard/
Please give it a try later.

This kernel will print (probably lots of) debug messages at probing each device, starting with the prefix "XXX".  Please give the dmesg output after the boot and after trying to bind manually.
Comment 33 Martti Laaksonen 2022-08-18 10:49:44 UTC
Created attachment 860898 [details]
dmesg output from kernel 5.19.1-1.ga80d391-default
Comment 34 Martti Laaksonen 2022-08-18 10:51:08 UTC
Just booted the test kernel and did the bind operation. No reloading of snd-hda-intel or anything else.
Comment 35 Takashi Iwai 2022-08-18 11:35:12 UTC
Thanks!

Could you try to boot with amd_iommu=off?  Alternatively, iommu=off.
Both may break something else, but we'd like to know whether this makes the audio device recoverable again.
Comment 36 Takashi Iwai 2022-08-18 11:44:42 UTC
... and I'm building another test kernel with a potential workaround (not a fix!) in OBS home:tiwai:bsc1202492-2 repo.  Once after the build finishes, could you give this a try, too?  It'll appear later at:
  http://download.opensuse.org/repositories/home:/tiwai:/bsc1202492-2/standard/
Comment 37 Martti Laaksonen 2022-08-18 11:47:52 UTC
Created attachment 860899 [details]
dmesg output from kernel 5.19.1-1.ga80d391-default amd_iommu=off
Comment 38 Martti Laaksonen 2022-08-18 11:49:29 UTC
Booting the test kernel with amd_iommu=off made audio devices working again.
Comment 39 Takashi Iwai 2022-08-18 12:02:44 UTC
Good to hear.

As far as I understand, this is a regression due to the IOMMU DMA ownership support, as it seems (the upstream commit 512881eacfa72c2136b27b9934b7b27504a9efc2).
The PCI core receives -EBUSY from iommu_device_use_default_domain() at pci_dma_configure() for HD-audio devices by some reason, resulting in the probe error.

It seems that the problem happens only with AMD, so far, and not on every AMD platform.

Joerg, could you take a look?
Comment 40 Martti Laaksonen 2022-08-19 06:31:18 UTC
Can confirm that the workaround implemented in the test kernel 5.19.1-1.g6993685-default also works with default kernel boot options, i.e. no need to pass amd_iommu=off or iommu=off.
Comment 41 Martti Laaksonen 2022-08-19 06:31:51 UTC
Created attachment 860921 [details]
dmesg output from kernel 5.19.1-1.g6993685-default
Comment 42 Takashi Iwai 2022-08-19 08:07:12 UTC
*** Bug 1202452 has been marked as a duplicate of this bug. ***
Comment 43 Takashi Iwai 2022-08-19 08:09:55 UTC
Thanks for the update.  FWIW, the workaround in OBS home:tiwai:bsc1202492-2 repo is to pass driver_managed_dma=true in hda_intel.c.
Comment 44 Takashi Iwai 2022-08-23 06:13:04 UTC
The issue was reported to the upstream:
  https://lore.kernel.org/r/874jy4cqok.wl-tiwai@suse.de

Pre request from the upstream devs, now I'm building a test kernel with some debug prints in IOMMU driver.
It's being built in OBS home:tiwai:bsc1202492-3 repo.  Once after the build finishes, it'll be available at
  http://download.opensuse.org/repositories/home:/tiwai:/bsc1202492-3/standard/

Could you try it later, confirm that the problem is still present (no HD-audio), and give the dmesg output?
Comment 45 Martti Laaksonen 2022-08-23 11:29:15 UTC
Created attachment 861004 [details]
dmesg output from kernel 5.19.3-1.g6a8683f-default
Comment 46 Martti Laaksonen 2022-08-23 11:35:54 UTC
Tested audio with test kernel 5.19.3-1.g6a8683f-default, can confirm audio devices are still missing.

dmesg output attached.

I did notice in the dmesg output a stack trace from iommu_attach_group which I suppose is part of your debug printouts.
Comment 47 Takashi Iwai 2022-08-23 11:40:01 UTC
Thanks!  The stack trace is intentional to show the call site.

The log indicates that the code path changing the group->domain is:
  amdgpu_pci_probe ->
  amdgpu_driver_load_kms ->
  amdgpu_device_init ->
  amdgpu_amdkfd_device_init ->
  kgd2kfd_device_init ->
  kgd2kfd_resume_iommu ->
  kfd_iommu_resume ->
  amd_iommu_init_device ->
  iommu_attach_group ->
  __iommu_attach_group

that happens during AMDGPU driver probe.  Afterwards, snd-hda-intel driver gets probed, but it fails because those audio PCI devices belong  to the same IOMMU group as the AMD graphics PCI device, and the group->domain is no longer equal with group->default_domain.
Comment 48 Takashi Iwai 2022-09-06 16:27:00 UTC
Now I'm building a test kernel with a test patch suggested by the upstream dev.
It's being built in OBS home:tiwai:bsc1202492-4 repo.  Once after the build finishes, it'll appear at
  http://download.opensuse.org/repositories/home:/tiwai:/bsc1202492-4/standard/

Can anyone check it later and report back whether it fixes the problem or not?
Comment 49 a b 2022-09-07 07:35:55 UTC
I can't boot this Kernel 5.19.7-2.1.gb78279d.
After some minutes it comes a messages with the hint to save the sosreport.
At this time my keyboard is still offline. So i can't give you that file.
Comment 50 Takashi Iwai 2022-09-07 07:40:20 UTC
(In reply to a b from comment #49)
> I can't boot this Kernel 5.19.7-2.1.gb78279d.
> After some minutes it comes a messages with the hint to save the sosreport.
> At this time my keyboard is still offline. So i can't give you that file.

Hmm, could you check whether the kernel in OBS Kernel:HEAD still boots fine?
  http://download.opensuse.org/repositories/Kernel:/stable/standard/

If this works and the test kernel doesn't, it's a bug in the patch.  If both don't boot, it's an issue in the upstream kernel.
Comment 51 Martti Laaksonen 2022-09-07 08:39:00 UTC
I also had the same problem with the test kernel not booting properly and non-functional keyboard, so the only way out was to power cycle the machine.

The default kernel 5.19.7-3.g11a0be1-default from http://download.opensuse.org/repositories/Kernel:/stable/standard/ boots without issues and audio also works with that kernel.
Comment 52 a b 2022-09-07 09:37:22 UTC
I can confirm this.
Kernel 5.19.7-3.g11a0be1-default is booting. And Audio works.
 
Thanks.
Comment 53 Takashi Iwai 2022-09-07 10:05:58 UTC
Thanks, then it's likely a bug in the patch.  I'll report it back.
Comment 54 Takashi Iwai 2022-09-07 14:52:01 UTC
I noticed an obvious bug in the patch.  Now another test kernel is being rebuilt with the corrected patch in OBS home:tiwai:bsc1202492-5 repo.
Could you give it a try later again?
Comment 55 Martti Laaksonen 2022-09-07 17:13:37 UTC
The latest test kernel 5.19.7-1.g0ce4ebb-default booted just fine and HD-audio also works.

I take it you don't need any logs besides the confirmation that it seemingly works?
Comment 56 Takashi Iwai 2022-09-08 07:47:39 UTC
Thanks, that's enough.  I informed the positive news to the upstream dev.
Let's wait for the official fix patch.
Comment 57 a b 2022-09-08 11:23:51 UTC
After regular update yesterday: 
No problems with kernel 5.19.7-1-default from main repository as yet.
Comment 58 Takashi Iwai 2022-09-12 10:19:33 UTC
Now the upstream fix patch landed to 6.0-rc5, and I backported to stable branch for TW kernel.

FWIW, the upstream commit 2380f1e8195ef612deea1dc7a3d611c5d2b9b56a
    iommu: Fix false ownership failure on AMD systems with PASID activated