Bug 411936 - After upgrade to PulseAudio 13, Plasma changes the default output device to HDMI port after every login and after I wake up my monitor connected to HDMI port from power save mode
Summary: After upgrade to PulseAudio 13, Plasma changes the default output device to H...
Status: RESOLVED WORKSFORME
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: 5.16.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-15 13:44 UTC by Patrick Silva
Modified: 2019-10-28 08:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-09-15 13:44:14 UTC
SUMMARY
I have a monitor connected to hdmi port.
Every time I start Plasma session or wake up my monitor from power save mode,
Plasma changes the default output device to HDMI port.
This behavior started after I upgrade to PulseAudio 13 on Arch Linux.

STEPS TO REPRODUCE
1. set a sound card as default output device
2. relogin
3. 

OR

1. set a sound card as default output device
2. wait for your monitor to enter power save mode
3. wake up your monitor by moving cursor

OBSERVED RESULT
plamsa-pa applet in systray indicates that HDMI port is the default output device.

EXPECTED RESULT
device output device never is changed automatically

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1
Kernel Version: 5.2.14-arch2-1-ARCH
Comment 1 Nate Graham 2019-09-15 22:18:25 UTC
If this only started happening after upgrading to PulseAudio 13, it's probably a bug in PulseAudio 13 (or at least introduced by the upgrade, even if ultimately it's our fault).

Nico, is it possible that this was caused by https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/162? Maybe the version check didn't work correctly or doesn't work on Arch for some reason?

Patrick, is there any way you can test with PulseAudio 13 and Plasma 5.17 (i.e. git master)?
Comment 2 Patrick Silva 2019-09-15 22:25:38 UTC
(In reply to Nate Graham from comment #1)
> Patrick, is there any way you can test with PulseAudio 13 and Plasma 5.17
> (i.e. git master)?
Unfortunately I can't test PulseAudio 13 with git master.
But probably Arch will provide Plasma 5.17 beta in a few days.
Comment 3 Patrick Silva 2019-09-20 16:35:13 UTC
I solved this problem on my system by renaming pulseaudio config files and reinstalling pulseaudio.

Furthermore, this problem did not occur on Void Linux running Plasma 5.16.5 after upgrade to pulseaudio 13.
Comment 4 Christoph Feck 2019-09-21 12:30:58 UTC
Patrick, how many distributions do you have installed? Your test coverage is phenomenal!
Comment 5 Patrick Silva 2019-09-21 13:13:02 UTC
(In reply to Christoph Feck from comment #4)
> Patrick, how many distributions do you have installed? Your test coverage is
> phenomenal!

desktop: Arch Linux and Void Linux
laptop: Arch (running Gnome) and Neon unstable edition
Comment 6 Lastique 2019-10-26 22:41:31 UTC
This happens to me on Kubuntu 19.10. PulseAudio 13.0, Plasma 5.16.5.

Even with the start-pulseaudio-x11 script fixed as I suggested in https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/162#note_276465 the default output device in Audio Volume applet is the HDMI output (the first one of the multiple output devices). The default output device gets reset to HDMI after every reboot.

Please, reopen.
Comment 7 Nicolas Fella 2019-10-26 23:31:13 UTC
(In reply to Nate Graham from comment #1)
> Nico, is it possible that this was caused by
> https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/162?
> Maybe the version check didn't work correctly or doesn't work on Arch for
> some reason?
No. The change was about what happens when a new sink appears, this shouldn't have anything to do with the default device.

Besides that, we don't modify the default device in plasma-pa except for the buttons in the KCM and applet, so I don't see how we could possibly mess with the setting.

My best guess would be this is a regression in PulseAudio 13 itself
Comment 8 Lastique 2019-10-28 08:29:13 UTC
I think I found the issue that I'm seeing:

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/749

The workaround of disabling module-switch-on-connect in /etc/pulse/default.pa helps in my case.