HDMI sound only works after plugging out and plugging back in

Hi,

the sound on my monitor only works after i plug out the HDMI-cable, wait a few seconds and plug it back in. Afterwards i select the HDMI-profile in my plasma-audio-settings and it works (selecting the HDMI-profile befor unplugging the cable does nothing).
Is this a known issue with an easy fix (i found nothing on the internet), or do you need some more information?

Thanks in advance!

Run the following…

aplay -l

I’m no sound guru, but usually I’d expect udev to have taken care of the necessary module loading… This is the relevant section in /etc/pulse/default.pa…

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

Pure speculation on my part, but I wonder if adding ‘load-module module-alsa-sink device=hw:x,y’ might be needed to load the appropriate sink explicitly (where x=card#, y=device#).

Reference:
https://wiki.archlinux.org/index.php/PulseAudio/Examples#Manually_configuring_PulseAudio_to_detect_the_Nvidia_HDMI

Just to clarify is your system using NVIDIA HDMI? Or other graphics vendor?

This blog mentions similar advice as the Archwiki I linked to…
https://www.piggott.me.uk/2011/03/26/how-to-make-pulseaudio-work-with-nvidia-hdmi-audio-outputs-under-fedora-and-ubuntu/

Hi,

thanks for the quick respond!

I use the intel chipset for audio.
what aplay -l shows before i unplug the HDMI-cable:

**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: PCH [HDA Intel PCH], Gerät 0: ALC283 Analog [ALC283 Analog]
  Sub-Geräte: 0/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 7: HDMI 1 [HDMI 1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 8: HDMI 2 [HDMI 2]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 9: HDMI 3 [HDMI 3]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 10: HDMI 4 [HDMI 4]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

what aplay -l shows after i replug the HDMI-cable:

**** Liste der Hardware-Geräte (PLAYBACK) **** 
Karte 0: PCH [HDA Intel PCH], Gerät 0: ALC283 Analog [ALC283 Analog] 
 Sub-Geräte: 0/1 
 Sub-Gerät #0: subdevice #0 
Karte 0: PCH [HDA Intel PCH], Gerät 3: HDMI 0 [HDMI 0] 
 Sub-Geräte: 0/1 
 Sub-Gerät #0: subdevice #0 
Karte 0: PCH [HDA Intel PCH], Gerät 7: HDMI 1 [HDMI 1] 
 Sub-Geräte: 1/1 
 Sub-Gerät #0: subdevice #0 
Karte 0: PCH [HDA Intel PCH], Gerät 8: HDMI 2 [HDMI 2] 
 Sub-Geräte: 1/1 
 Sub-Gerät #0: subdevice #0 
Karte 0: PCH [HDA Intel PCH], Gerät 9: HDMI 3 [HDMI 3] 
 Sub-Geräte: 1/1 
 Sub-Gerät #0: subdevice #0 
Karte 0: PCH [HDA Intel PCH], Gerät 10: HDMI 4 [HDMI 4] 
 Sub-Geräte: 1/1 
 Sub-Gerät #0: subdevice #0

I changed the default.pa to

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
#load-module module-udev-detect
load-module module-alsa-sink device=hw:0,3
load-module module-alsa-sink device=hw:0,0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

but the only effects are, that i now have two internal audio devices, but no audio profiles in my setup. the headphone-jack works fine (as it did before), but there’s still no HDMI-audio-output.
Mysterious.

I changed the default.pa to

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
#load-module module-udev-detect
load-module module-alsa-sink device=hw:0,3
load-module module-alsa-sink device=hw:0,0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

I’m not sure that it’s necessary to load device 0 ‘load-module module-alsa-sink device=hw:0,0’ explicitly, and perhaps one of the the other HDMI devices are relevant here? I don’t own such hardware so not able to advise further with any certainty. Hopefully, others who are familiar with HDMI hardware can chime in.

I now just loaded device=hw:0,3 (that’s the device that works with aplay, after replugging the cable of course), but i still get no sound from my monitor.
Thanks for trying to help!

Oh well, it was worth a shot. Wait for others to advise further.

Its a puzzle. Any chance that the problem is the monitor and not the compute running openSUSE ? How is the grounding between your PC and the monitor ? Do they share the same grounding ? or is the ground floating ? Note these are speculative questions and possibly not relevant.
.

I have read that there can be issues with the HDMI handshaking - Specifically when first connecting and there is no audio stream embedded, it then results in audio decoding being disabled. I have experienced similar behaviour on my Samsung TV when switching between HDMI sources sometimes (but not often enough for it to bother me to investigate further). So it might come down to the display device in question perhaps? I don’t think it’s an openSUSE-specific issue.