I have two monitors connected to my laptop, one via DisplayPort and one via HDMI. My speakers are connected to my DisplayPort monitor and normally all works fine with audio output device set to "HDMI/DisplayPort 3 - Built-in Audio" and sound coming out of my speakers.
When working as expected my audio output devices (both in settings and pulseaudio volume control) are:
- HDMI/DisplayPort 3 - Built-in Audio (SELECTED)
- HDMI/DisplayPort - Built-in Audio
- Headphones - Built-in Audio
BUT sometimes (not always) when waking from suspend my DisplayPort output is missing and I get no sound so the devices shown are just these:
- HDMI/DisplayPort - Built-in Audio
- Headphones - Built-in Audio
Is there any way to reset/restart the sound system or have it re-scan for output devices? Any way to go about debugging this issue next time it happens? I have not found any way of solving this so far.
Also, possibly related to the problem above, even if not missing a device, the system often reverts to one of the other output devices on a reboot or wake, it won't always be set to the output I previously chose.
- Ubuntu 20.04 LTS (although this was happening on previous versions).
- Gnome 3.36.1
- X11 windowing
- Nouveau drivers on Intel HD graphics
Any help or advice appreciated, thanks.
This has recently happened to me on a new install (20.04) - not consistently, but sometimes after waking up, my preferred audio output device is just missing.
I had success by restarting pulseaudio (both gdm and my user's one), by doing
sudo killall pulseaudio
(pulseaudio -k
seemed to do nothing), and then restarting the pulseaudio user daemon withsystemctl --user restart pulseaudio.service
. I'm not sure everything is completely happy (the gdm user was running a pulseaudio instance as well) and pavucontrol seems to segfault on exit now, but at least audio is running again.I may have at least found a workaround to solve this issue even if it's not really discovering what causes it or really solving the issue in an ideal way. But in case anyone else has the same problem and has two monitors:
I went to Ubuntu settings
Screen Display
section, disabled the monitor which has the missingHDMI/DisplayPort 3
audio device, clickedApply
then re-enabled and clickedApply
. Then going toSound
settings section all 3 audio devices are shown again.At least this works around the issue without a reboot so better than nothing!
EDIT: This still happens regularly on my system (currently 21.10) and was annoying me, so I eventually scripted a workaround and put it on a hotkey to get the audio output back when it's missing. So in case it's useful to others. Basically I use
xrandr
to set the monitor to the wrong output then back to the correct output and it works 100%. If I change workspace to a blank workspace before running the script I don't have to re-arrange any windows either: