No HDMI sound after monitor wakes up from sleep

There's no sound from my monitor after it wakes up from sleep. Every app (mpv, Firefox, cat /dev/random > /dev/dsp1.0, etc.) is affected. The headphone jack works fine. No problems on Fedora Linux 36 either.

Code:
FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64

$ cat /dev/sndstat
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <ATI R6xx (HDMI)> (play) default
pcm2: <ATI R6xx (HDMI)> (play)
pcm3: <ATI R6xx (HDMI)> (play)
pcm4: <Realtek ALC256 (Analog)> (play/rec)
pcm5: <Realtek ALC256 (Front Analog Mic)> (rec)
No devices installed from userspace.

$ mixer -f /dev/mixer1
Mixer vol      is currently set to  100:100
Mixer pcm      is currently set to  100:100

# pciconf -lve hdac0
hdac0@pci0:5:0:1:       class=0x040300 rev=0x00 hdr=0x00 vendor=0x1002 device=0x1637 subvendor=0x1002 subdevice=0x1637
vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device     = 'Renoir Radeon High Definition Audio Controller'
class      = multimedia
subclass   = HDA

I'm using graphics/drm-510-kmod and gpu-firmware-amd-kmod-renoir-20220511.

Monitor volume is unchanged. Not using audio/pulseaudio.
 
There's no sound from my monitor after it wakes up from sleep.
If this helps to further narrow down the problem: I am experiencing the same issue on my desktop at home.
My setup is "simpler" though as I don't use audio-over-HDMI. Instead, I have speakers connected via the 3.5mm jack to the on-board audio output.
Furthermore, my setup uses an Nvidia GTX 1080 TI with graphics/nvidia-driver.
My machine is running stable/13.
Everything else works as expected when resuming from sleep.

I'll certainly try bsduck's "tipp" next time I'm there.
 
That's just guessing, I don't use HDMI audio so I can't tell if that indeed helps, but let me know in case my tip would be tiptop nevertheless.
 
Does # service mixer restart bring sound back?
Unfortunately no, but thanks for your suggestion.

It seems that the problem is larger in scope than I first realized. HDMI audio works the very first time I use it. After waiting about 5 minutes, any subsequent attempts to output sound through HDMI audio results in silence. I have to power cycle the PC to get HDMI audio working again. Even rebooting into Linux doesn't help.

The relevant sysctls remain unchanged. Only /dev/sndstat at verbosity level 2 shows a difference before and after it stops working:
Code:
16c16
<       interrupts 0, underruns 0, feed 0, ready 0 [b:2048/1024/2|bs:2048/1024/2]
---
>       interrupts 41233, underruns 0, feed 41233, ready 0 [b:2048/1024/2|bs:2048/1024/2]
19,20c19,20
<       pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
<       interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]
---
>       pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 48000, fmt 0x00201000/0x00200010, flags 0x10000000, 0x00000023
>       interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:16384/2048/8]
22c22
<       {userland} -> feeder_root(0x00000000) -> {hardware}
---
>       {userland} -> feeder_root(0x00201000) -> feeder_format(0x00201000 -> 0x00200010) -> feeder_volume(0x00200010) -> {hardware}

It's really odd. Thankfully, the onboard audio via the headphone jack still works.
 
Does # service mixer restart bring sound back?
Didn't help in my case.
I still have not discovered a solution other than rebooting :/

For future readers: In my case I use on-board audio (3.5mm jack output). No HDMI involved. Just also no sound sometimes after resume.
 
Back
Top