HDMI audio not working after system suspend

Getting your soundcard to work, using Debian on non-i386 hardware, etc

HDMI audio not working after system suspend

Postby manuelmagic » 2020-12-09 21:06

Hi,
On my Debian 11 with XFCE I usually use the HDMI audio output for sounds, since there are a couple of small speakers on it.
Everything works fine, until I suspend the system. After that I can only play sound on the internal speaker of my PC (it is a small thinkcentre desktop), sometimes any audio output is available.
In order to get the HDMI audio output again I have to restart my pulseaudio deamon with:

Code: Select all
$ pulseaudio -k
$ pulseaudio --start

Sometimes I have to do it a couple of times to get the HDMI audio output available again.
Since I usually suspend my PC instead of switching it off, this work-around is getting boring.

You can see a couple of images of my notification area here:

- just after the system is wakened (after a suspend)
Image

- after the pulseaudio deamon restart
Image

How can I solve this issue?

I tried to duck the web for this issue but I couldn't find any solution. I also tried to search on the forum archive, without success.

Thanks in advance for your help.
manuelmagic
 
Posts: 5
Joined: 2020-12-09 20:46
Location: Italy

Re: HDMI audio not working after system suspend

Postby sgosnell » 2020-12-10 01:17

Do you really need to suspend? That's really only necessary on a laptop running on battery power. For a machine running on mains it seems to be more trouble than it's worth.

Be that as it may, I haven't seen that issue before. Check dmesg piped through tail when the suspend is resumed and see what error messages you see.
Take my advice, I'm not using it.
sgosnell
 
Posts: 974
Joined: 2011-03-14 01:49

Re: HDMI audio not working after system suspend

Postby sunrat » 2020-12-10 03:57

In pavucontrol, go to the Configuration tab and switch the profile for the the device you are not using to "Off".
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 3594
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: HDMI audio not working after system suspend

Postby manuelmagic » 2020-12-11 21:44

Hi and thank you both for your replies.

sgosnell wrote:Do you really need to suspend? That's really only necessary on a laptop running on battery power. For a machine running on mains it seems to be more trouble than it's worth.


Well, with suspend I can keep all my programs open, otherwise I'd have to save and close everything and then reopen all my stuff every time.

sgosnell wrote:Be that as it may, I haven't seen that issue before. Check dmesg piped through tail when the suspend is resumed and see what error messages you see.


I tried to reproduce the problem suspending my PC a few times, but the issue wasn't happening: I still didn't managed to understand which conditions cause it.
I'll keep the suggestion when it will happen again, thank you.

sunrat wrote:In pavucontrol, go to the Configuration tab and switch the profile for the the device you are not using to "Off".


I'm not sure if this solved my issue or if it was a positive consequence of this guide https://wiki.debian.org/Xfce-power-manager-troubleshooting that I followed in order to be able to auto-suspend the PC after a few minutes of inactivity without having to insert the root password, but for the time being the issue did not happen again.

I also tried to suspend the system manually and for inactivity a few time since I was curious tu understand what was the problem, looking also to dmesg output, but I wasn't able to pinpoint the root cause since there is no configuration that always reproduce the issue and a configuration where it never happens.

For the time being it seems solved. In your opinion having two different audio output enabled could cause it? Thanks
manuelmagic
 
Posts: 5
Joined: 2020-12-09 20:46
Location: Italy

Re: HDMI audio not working after system suspend

Postby Head_on_a_Stick » 2020-12-12 09:49

manuelmagic wrote:On my Debian 11 with XFCE

There is no "Debian 11".
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: HDMI audio not working after system suspend

Postby sgosnell » 2020-12-12 19:01

There is no "Debian 11".
Not yet, but soon.
Take my advice, I'm not using it.
sgosnell
 
Posts: 974
Joined: 2011-03-14 01:49

Re: HDMI audio not working after system suspend

Postby sgosnell » 2020-12-12 19:05

Perhaps we are not using suspend in the same context. Suspend means (at least to me) to write the contents of RAM to disk and put the system to sleep. If you have power connected full time, then it's simpler to just put the display to sleep and keep the system running. This is not the same as suspend.
Take my advice, I'm not using it.
sgosnell
 
Posts: 974
Joined: 2011-03-14 01:49

Re: HDMI audio not working after system suspend

Postby manuelmagic » 2020-12-12 22:21

Head_on_a_Stick wrote:
manuelmagic wrote:On my Debian 11 with XFCE

There is no "Debian 11".


You are correct, I was referring to Debian Bullseye, currently in testing.
manuelmagic
 
Posts: 5
Joined: 2020-12-09 20:46
Location: Italy

Re: HDMI audio not working after system suspend

Postby manuelmagic » 2020-12-12 22:33

sgosnell wrote:Perhaps we are not using suspend in the same context. Suspend means (at least to me) to write the contents of RAM to disk and put the system to sleep. If you have power connected full time, then it's simpler to just put the display to sleep and keep the system running. This is not the same as suspend.


I usually select "suspend" when I'm going away from my PC:

Image

And I selected "suspend" in the Xfce Power Manager:

Image

What you are referring is called hibernate.

From https://www.computernetworkingnotes.com/linux-tutorials/shutdown-reboot-suspend-and-hibernate-a-linux-system.html:

Sleep (suspend or standby)
This mode is also known as the standby, suspend, or suspend-to-ram mode. In this mode, Linux saves the current state of the system into the RAM and cuts the power supply of all devices except the RAM.

Hibernate
This mode is also known as the suspend-to-disk. In this mode, Linux saves the current state of the system into the hard disk and shuts down the power supply of the system. Since the current state is saved in the disk, the saved stated does not depend on the battery or external power supply.


I use suspend and not simply put the display in stand by indefinitely simply because it consumes less energy (I can hear the fan stop spinning completely) and the power status LED starts blinking on my PC instead of staying always on.
manuelmagic
 
Posts: 5
Joined: 2020-12-09 20:46
Location: Italy

Re: HDMI audio not working after system suspend

Postby sgosnell » 2020-12-13 02:14

Yes, my bad. Suspend just cuts power, that's what I do with my laptop. If saving a small amount of power is important to you, go ahead.
Take my advice, I'm not using it.
sgosnell
 
Posts: 974
Joined: 2011-03-14 01:49


Return to Hardware

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable