PulseAudio HDMI/DisplayPort stops working after screensaver

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
Post Reply
durableinnovations
Level 1
Level 1
Posts: 8
Joined: Tue Oct 20, 2020 6:04 pm

PulseAudio HDMI/DisplayPort stops working after screensaver

Post by durableinnovations »

Running a fairly fresh install of Linux Mint 20. Loaded it up a few days after the LM20 release and everything has been working flawlessly until my latest update yesterday. Now, whenever the computer wakes up from the screensaver, the "HDMI / DisplayPort 2 GP107GL High Definition Audio Con\roller" option is no longer present under sound settings.

Code: Select all

pulseaudio -k
fixes it, so I'm guessing it's yet another PulseAudio bug. No big deal, but it just happens again the next time the computer wakes up from screensaver. This computer is a bare motherboard mounted to the wall behind the wall mounted TV in our living room, and something my whole family uses. Pretty sure my four year old is not ready for command line yet :lol:

Any thoughts? I'm not a programmer, just reasonably computer-literate. Give me some diagnostic code and I will give you the output.

Thanks!
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

Hi durableinnovations, and welcome to the forum.

See if this prevents the issue from happening:

In the terminal run xed admin:///etc/pulse/default.pa and when the file opens find this section:

Code: Select all

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
Change it to this:

Code: Select all

### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle
Save the file, then reboot and start testing.
durableinnovations
Level 1
Level 1
Posts: 8
Joined: Tue Oct 20, 2020 6:04 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by durableinnovations »

Thank you!

I commented that line out and the issue is solved. Probably needs to be a PulseAudio bug report, but not sure how to go about that. If you want me to un-comment the line and run any diagnostic code, I'm happy to do so. Just let me know.

Thank you for your help. Fist post on LMF, but I posted a bunch on Ubuntu forums back in the Hardy Heron days. Linux has advanced so much since then that everything usually works out of the box. I have been searching LMF for so long that I was actually surprised that I didn't have a LMF account :lol:

Thanks again!
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

I somewhat doubt Ubuntu would create a fix for this, although I might be wrong. HDMI audio is the trickiest of them all, so I'm always happy to just find an acceptable workaround.

If you wanted to report it, it should go here: https://launchpad.net/ubuntu/+source/pulseaudio/+bugs

If it's an issue that is upstream from them, they'll direct you to report it here: https://gitlab.freedesktop.org/pulseaud ... o/-/issues

I honestly don't believe either will consider it a high enough priority to do anything about, but I'm wrong at least as often as I'm right about these things. And for all I know, this might be something that is fixed in the newer versions of PulseAudio that we don't have access to.
durableinnovations
Level 1
Level 1
Posts: 8
Joined: Tue Oct 20, 2020 6:04 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by durableinnovations »

Yeah, so never mind... the issue still persists. Apparently I just did not wait long enough last night. Woke up this morning and the sound was not working again. I can still reset PulseAudio in terminal, but that's going to get tedious :( I could set screensaver to "never", but I would rather not if I can avoid it. Are there any other software fixes you can think of? Thanks!
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

Are you sure it's only the screensaver activating? Could the computer be suspending? For suspending/waking, we could automate the pulseaudio -k command, but if this is just the screensaver, I have no idea how to do the same thing, although it may be possible.

If suspending is involved, see my post here that references another post.
durableinnovations
Level 1
Level 1
Posts: 8
Joined: Tue Oct 20, 2020 6:04 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by durableinnovations »

Definitely NOT the screensaver... good call. So yeah, I just set the screensaver to "blank", set the screen-off to "never" and I'll move on with my life. Not ideal, but what is? I'm sure it will get fixed at some point... and then broken again at some point after that.

Thanks for your help!
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

durableinnovations wrote:
Tue Oct 27, 2020 7:01 pm
I'm sure it will get fixed at some point... and then broken again at some point after that.
You been reading the Ubuntu developer handbook, haven't you!! :lol:
User avatar
Cobrin
Level 1
Level 1
Posts: 9
Joined: Sun Nov 15, 2020 1:09 am
Location: Australia

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by Cobrin »

I've been going crazy ever since upgrading to LM20 and losing audio, needing to restart it. I didn't read to the last post so you can imagine my sorrow when trying out the suspend at idle method and that not working, coming back and reading it didn't work for the OP either lol.

I'll remove my setting of blank screen after 10mins too.

Big Thank You to the OP and Mr Een for at least making this thread, I should have come here first. This is the reason I've signed up today to post and make this my first port of call for everything LM.

edit: Low and behold this seems to have worked, I'll monitor it for a bit first but signs are looking good
viewtopic.php?p=1844746#p1844746
If you can't trust a 600 year old vampire in a prepubescent girl's body, who can you trust?
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

I'm afraid HDMI audio is a bit foreign to me, and occasionally flaky in Linux in general.

It is possible a udev rule or a systemd script could help here, to at least automate the pulseaudio -k command. I'm not sure it would work, but we won't know if we don't try. I'll need to see the output of this command:

Code: Select all

lspci -vvn | grep -A1 040[1-3]
User avatar
Cobrin
Level 1
Level 1
Posts: 9
Joined: Sun Nov 15, 2020 1:09 am
Location: Australia

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by Cobrin »

spoke too soon it doesn't work, I've only now just let it go to the screen saver (SS) and then further have the TV output go black. On moving the mouse and the screen displaying the desktop audio is gone still. Looks like no SS for me.

with no audio the output from your command is:

00:1b.0 0403: 8086:1e20 (rev 04)
Subsystem: 1043:8415
--
01:00.1 0403: 10de:0fb9 (rev a1)
Subsystem: 1458:372c

edit: system info tells me my Audio is I'm using Device two as you know :-

Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: ASUSTeK P8H77-I
driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20
Device-2: NVIDIA GP107GL High Definition Audio vendor: Gigabyte driver: snd_hda_intel
v: kernel bus ID: 01:00.1 chip ID: 10de:0fb9
Sound Server: ALSA v: k5.4.0-53-generic
If you can't trust a 600 year old vampire in a prepubescent girl's body, who can you trust?
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

Just to confirm, pulseaudio -k does bring back the sound still, correct?
User avatar
Cobrin
Level 1
Level 1
Posts: 9
Joined: Sun Nov 15, 2020 1:09 am
Location: Australia

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by Cobrin »

MrEen wrote:
Sun Nov 15, 2020 1:10 pm
Just to confirm, pulseaudio -k does bring back the sound still, correct?
yes correct, it's only when the display returns from black, as in the video feed is off and I interrupt it to get back to my desktop there's no audio. Not audio until I run pulseaudio -k.

If I still have the dimmed desktop wallpaper and date/time showing and I interrupt it to go back to my desktop audio is fine and still there.

Thanks again for taking the time out.
If you can't trust a 600 year old vampire in a prepubescent girl's body, who can you trust?
User avatar
Cobrin
Level 1
Level 1
Posts: 9
Joined: Sun Nov 15, 2020 1:09 am
Location: Australia

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by Cobrin »

Interesting, I changed gfx driver from nVidia to xserver-xorg-video-nouveau, I did the same testing and the behaviour is the same. I was thinking that there might be something on nvidias side, but alas no it's not the case. I've used different quality HDMI cables and different HDMI ports on the tv and gfx card, still no change in behaviour.
If you can't trust a 600 year old vampire in a prepubescent girl's body, who can you trust?
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

Okay, let's try something I've never done before and see if this works.

In the terminal run xed admin:///lib/udev/rules.d/90-pulseaudio.rules and when the file opens inset this immediately above the last line:

Code: Select all

[code]ATTRS{idVendor}=="10de", ATTRS{idProduct}=="0fb9", RUN+="/bin/bash -c 'pulseaudio -k'"
[/code]

Reboot and test the sound.

If/when then fails to work, undo the change then try what's here under Fixing PulseAudio switching off HDMI sound on Suspend. Change this command:

Code: Select all

sudo -u rick -E pacmd set-card-profile 0 output:hdmi-stereo
to this:

Code: Select all

sudo -u YourUserName -E pulseaudio -k
Reboot and test again.

Let me know if either work.
User avatar
Cobrin
Level 1
Level 1
Posts: 9
Joined: Sun Nov 15, 2020 1:09 am
Location: Australia

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by Cobrin »

I have done them all and nothing worked. Thanks for your help I'll keep the SS off me thinks.
If you can't trust a 600 year old vampire in a prepubescent girl's body, who can you trust?
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

Damn!

HDMI is the trickiest to get working properly when there are issues. And I don't use it myself, making it harder to find a workable solution. I'll send you a message if I find anything else worth trying.
User avatar
Cobrin
Level 1
Level 1
Posts: 9
Joined: Sun Nov 15, 2020 1:09 am
Location: Australia

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by Cobrin »

You're a busy man MrEen, your efforts aren't rewarded enough thanks for your time and effort.
If you can't trust a 600 year old vampire in a prepubescent girl's body, who can you trust?
User avatar
MrEen
Level 22
Level 22
Posts: 15169
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio HDMI/DisplayPort stops working after screensaver

Post by MrEen »

My pleasure. :D
Post Reply

Return to “Sound, Multimedia, & Codecs”