volume jumps to 100% after monitor resumes from sleep, resets back on any volume change
Version, Distribution, Desktop Environment:
Fedora 34 Workstation (GNOME)
Description of Problem:
I have headphones connected to my monitor, i.e. the sound goes through a DisplayPort cable from my GPU. This "HDMI" (even though it's DP) sink disappears every time the monitor goes to sleep (when the session is idle for some time), and reappears after it is resumed from sleep. However, the original volume is not restored, instead it is set to 100% (even though in gnome-control-center the sliders don't show 100%, they show the correct previous volume). But this 100% volume is not "permanent", it only lasts until you try to adjust the volume, and then it resets to the previous (correct) volume value.
In other words, every time I wake up my monitor, I have to remember to tap on volume up/down buttons once (to reset it to previous volume), otherwise I get my ears blasted with 100% volume (very very unpleasant).
I've verified that this is a problem with pipewire. If I swap the
pipewire-pulseaudio for the
pulseadio package and reboot, the problem no longer happens.
I tried completely removing
~/.config/pulse/, didn't help.
I believe this might be related to #1145 (closed). But I don't experience sudden shifts in volume, it's always related to the HDMI sink re-appearing after monitor resume.
100% (at least on my end)
Steps to Reproduce:
- Switch to the HDMI output device in gnome-control-center, plug your headphones into the monitor (or use the integrated speakers, e.g. on a TV).
- Set the volume e.g. to 30%.
- Play some music.
- Put the monitor to sleep, either by session inactivity or more easily by locking your desktop, running
xset dpms force off(in an X11 session).
- Notice the headphones stopped playing. (In my case, my speakers start playing instead, showing that a sink was switched to the next one available, which is the motherboard's sound output).
- Wake up the monitor.
- Notice that your headphones resumed playback, but are blasting at 100% volume. (In my case, my speakers also stop playing, showing that a sink was switched from motherboard back to HDMI).
- Look into gnome-control-center, see that the volume slider is still set to the previous 30% (i.e. not reflecting the current state).
- Tap multimedia volume up/down keys once, and see that the volume is immediately reset back to roughly 30%.
When a sink disappears and reappears, the volume is set to 100%.
When a sink disappears and reappears, the volume is set back to the previous value it had.
Additional Info Eg.
pw-dump -N > file (As Attachment Please):