Comment 15 for bug 1720519

Revision history for this message
Oded Arbel (oded-geek) wrote :

The problem is in an incorrect interaction between KDE's KCM audio configuration module and PulseAudio's default configuration in Ubuntu:

* As per bug #1702794, the default PA configuration on Ubuntu enables the "switch-on-connect" module by default (in /etc/pulse/default.pa)
* "switch-on-connect" can only be loaded once, and if it gets loaded a second time, PulseAudio terminates.
* The KCM module for audio configuration has an option under "Advanced" to "Automatically switch all running streams when a new output becomes available". This checkbox updates the PulseAudio gconf configuration /system/pulseaudio/modules/switch-on-connect/enabled and sets it to "true". What that is set, when the PA gconf module gets loaded, it tries to load the switch-on-connect module again - cause PA to crash.

The fix should be - IMHO:
 - in PulseAudio don't crash when switch-on-connect gets loaded a second time, just ignore it as it is 99.99999% a configuration mistake and should not be fatal.
 - in PulseAudio gconf module, when deciding if to load modules specified in the gconf configuration, don't try to load modules already loaded.
 - in the Audio Volume KCM module, check the status of switch-on-connect in PA's default configuration and if it is enabled, show the "Automatically switch all running streams..." checkbox as checked and disabled. Only have the checkbox editable if the default PA configuration does not have switch-on-connect enabled.