Bug 1200593

Summary: No sound from HDMI
Product: [openSUSE] openSUSE Distribution Reporter: Chris Wong <viking018-mailbox>
Component: KernelAssignee: openSUSE Kernel Bugs <kernel-bugs>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: tiwai, viking018-mailbox
Version: Leap 15.4   
Target Milestone: ---   
Hardware: 64bit   
OS: openSUSE Leap 15.4   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Dump of dmesg after boot.
Output of alsa-info.sh --no-upload

Description Chris Wong 2022-06-16 07:04:04 UTC
I am using AMD Ryzen 5 5600G after upgraded from 15.3 to 15.4 sound does come out of HDMI. It seems snd_hda_codec_hdmi not being loaded during boot process. I had to run YaST to add kernel module "AMD ACP Renoir PCI driver", the add process failed load to the kernel module but pasystray manage find "New sink Renoir Radon High Definition Audio Controller Digital Stereo (HDMI)" and load snd_hda_codec_hdmi.

My Hardware:

0a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [1002:1638] (rev c9) (prog-if 00 [VGA controller])
        Subsystem: Gigabyte Technology Co., Ltd Device [1458:d000]
        Flags: bus master, fast devsel, latency 0, IRQ 30
        Memory at ffe0000000 (64-bit, prefetchable) [size=256M]
        Memory at fff0000000 (64-bit, prefetchable) [size=2M]
        I/O ports at e000 [size=256]
        Memory at fca00000 (32-bit, non-prefetchable) [size=512K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable- Count=1/4 Maskable- 64bit+
        Capabilities: [c0] MSI-X: Enable+ Count=4 Masked-
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [270] #19
        Capabilities: [2a0] Access Control Services
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Capabilities: [400] #25
        Capabilities: [410] #26
        Capabilities: [440] #27
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

0a:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
        Flags: bus master, fast devsel, latency 0, IRQ 41
        Memory at fca80000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [2a0] Access Control Services
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

OS version:

5.14.21-150400.22-default

Sound modules after boot:

snd_hda_intel          57344  0
snd_intel_dspcfg       28672  1 snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_hda_codec         172032  1 snd_hda_intel
snd_hwdep              16384  1 snd_hda_codec
snd_hda_core          106496  2 snd_hda_intel,snd_hda_codec
snd_pcm               172032  3 snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              40960  1 snd_pcm
snd                   114688  5 snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
soundcore              16384  1 snd


Sound modules after add "AMD ACP Renoir PCI driver"

snd_hda_codec_hdmi     73728  1
snd_hda_intel          57344  4
snd_intel_dspcfg       28672  1 snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_hda_codec         172032  2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core          106496  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               172032  5 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              40960  1 snd_pcm
snd                   114688  13 snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
soundcore              16384  1 snd

Best Regards
Comment 1 Takashi Iwai 2022-06-17 14:48:25 UTC
Could you give alsa-info.sh output?  Run the script with --no-upload option.
Also, give the dmesg output, too.
Comment 2 Chris Wong 2022-06-18 06:03:32 UTC
Created attachment 859675 [details]
Dump of dmesg after boot.

Requested by Takashi Iwai
Comment 3 Chris Wong 2022-06-18 06:05:45 UTC
Created attachment 859676 [details]
Output of alsa-info.sh --no-upload

Requested by Takashi Iwai
Comment 4 Takashi Iwai 2022-06-18 07:03:17 UTC
It looks like snd-hda-* modules are included in initrd unnecessarily and without all needed modules.  Do you have some extra config for dracut, e.g. from amdgpu-pro stuff in /etc/dracut.d/* or /usr/lib/dracut.d/*?  There was a known problem in the past that caused a broken initrd.
Comment 5 Chris Wong 2022-06-18 10:45:37 UTC
No such directories exists on my PC.

sudo ls /usr/lib/dracut.d/*
ls: cannot access '/usr/lib/dracut.d/*': No such file or directory

sudo ls /etc/dracut.d/*
ls: cannot access '/etc/dracut.d/*': No such file or directory
Comment 6 Takashi Iwai 2022-06-18 12:01:54 UTC
It was a typo; it's dracut.conf.d, not dracut.d.
Comment 7 Chris Wong 2022-06-18 12:30:19 UTC
ls -l /usr/lib/dracut/dracut.conf.d/
total 12
-rw-r--r-- 1 root root 1066 May 12 01:26 01-dist.conf
-rw-r--r-- 1 root root  112 May  7 22:18 50-sg3_utils.conf
-rw-r--r-- 1 root root  147 May  8 01:30 dm-parts.conf

ls -l /etc/dracut.conf.d/
total 4
-rw-r--r-- 1 root root 487 May 12 01:26 99-debug.conf

file contents in /usr/lib/dracut/dracut.conf.d

01-dist.conf
# SUSE specific dracut settings
#
# SUSE by default always builds as small as possible initrd for performance
# and resource reasons.
# If you like to build a generic initrd which works on other platforms than
# on the one dracut/mkinitrd got called comment out below setting(s).
hostonly="yes"
hostonly_cmdline="yes"

compress="zstd -3 -T0 -q"

i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
omit_drivers+=" i2o_scsi "

# Below adds additional tools to the initrd which are not urgently necessary to
# bring up the system, but help to debug problems.
# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools
# are installed and add more if you need them. This specifically helps if you
# use:
# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|
# mount|pre-pivot|cleanup]
# boot parameter or if you are forced to enter the dracut emergency shell.

# add_dracutmodules+=debug

50-sg3_utils.conf
# Add new rules file to ensure consistency
install_items+=" /usr/lib/udev/rules.d/54-before-scsi-sg3_id.rules "

dm-parts.conf
# This file has recently been added to kpartx.
# Not all dracut versions know about it.
install_items+=" /usr/lib/udev/rules.d/11-dm-parts.rules "

file content in /etc/dracut.conf.d

99-debug.conf
# Below adds additional tools to the initrd which are not urgently necessary to
# bring up the system, but help to debug problems.
# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools
# are installed and add more if you need them. This specifically helps if you
# use:
# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|
# mount|pre-pivot|cleanup]
# boot parameter or if you are forced to enter the dracut emergency shell.

# add_dracutmodules+=debug
Comment 8 Takashi Iwai 2022-06-18 14:55:21 UTC
OK, those look normal.  Then how about /etc/modules-load.d/* and /usr/lib/modules-load.d/* entries?

Last but not least, please check the content of lsinitrd.  I guess it contains snd-hda-* modules, but we need to verify whether my guess is correct.
Comment 9 Chris Wong 2022-06-19 05:59:22 UTC
ls -l /etc/modules-load.d
total 4
-rw-r--r-- 1 root root 14 May 26 08:30 yast.conf

cat /etc/modules-load.d/yast.conf
snd-hda-intel

 ls -l /usr/lib/modules-load.d/
total 8
-rw-r--r-- 1 root root 102 May  8 01:30 multipath.conf
-rw-r--r-- 1 root root   3 Jan 28 20:56 sg.conf

cat /usr/lib/modules-load.d/multipath.conf 
# Load device-handler and multipath module at boot
scsi_dh_alua
scsi_dh_emc
scsi_dh_rdac
dm-multipath

cat /usr/lib/modules-load.d/sg.conf 
sg
Comment 10 Chris Wong 2022-06-19 06:03:53 UTC
lsinitrd does containt some snd-hda modules, but it does not contain snd-hda-codec-hdmi that direct the sound to hdmi.

sudo lsinitrd |grep snd
-rw-r--r--   1 root     root         7911 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/core/snd-hwdep.ko.zst
-rw-r--r--   1 root     root        55214 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/core/snd.ko.zst
-rw-r--r--   1 root     root        83005 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/core/snd-pcm.ko.zst
-rw-r--r--   1 root     root        22962 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/core/snd-rawmidi.ko.zst
-rw-r--r--   1 root     root         4945 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/core/snd-seq-device.ko.zst
-rw-r--r--   1 root     root        22011 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/core/snd-timer.ko.zst
-rw-r--r--   1 root     root        48721 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/hda/snd-hda-core.ko.zst
-rw-r--r--   1 root     root         5797 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/hda/snd-intel-dspcfg.ko.zst
-rw-r--r--   1 root     root         3667 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/hda/snd-intel-sdw-acpi.ko.zst
-rw-r--r--   1 root     root        85561 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/pci/hda/snd-hda-codec.ko.zst
-rw-r--r--   1 root     root        26676 May 12 03:00 lib/modules/5.14.21-150400.22-default/kernel/sound/pci/hda/snd-hda-intel.ko.zst
Comment 11 Takashi Iwai 2022-06-19 08:43:40 UTC
(In reply to Chris Wong from comment #9)
> ls -l /etc/modules-load.d
> total 4
> -rw-r--r-- 1 root root 14 May 26 08:30 yast.conf
> 
> cat /etc/modules-load.d/yast.conf
> snd-hda-intel

That's it.  This must be an old leftover config that breaks things.
Remove this file, and recreate initrd (e.g. just run mkinitrd as root), then reboot / retest.
Comment 12 Chris Wong 2022-06-19 10:19:05 UTC
Carried out your instruction and issue resolved.

Thanks for your help.
Comment 13 Takashi Iwai 2022-06-20 12:11:45 UTC
Let's close.