Bug 88949

Summary: module-switch-on-connect not found
Product: PulseAudio Reporter: q7uswgjtck <q7uswgjtck>
Component: modulesAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart, q7uswgjtck
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description q7uswgjtck@snkmail.com 2015-02-03 17:25:13 UTC
A few days ago, this module suddenly stopped loading:

   $ pacmd load-module module-switch-on-connect    
   Welcome to PulseAudio! Use "help" for usage information.
   >>> Module load failed.
   >>> 

This has always worked fine in the past.  I've had it in my /etc/pulse/default.pa for a while, but then PulseAudio stopped starting up upon boot.  It turned out that this line was the reason (as I found when I tried to start it manually).  Commenting out the line allows PulseAudio to start up as usual.

I am not sure what changed.  If you like, I can tell you the most recent package updates to my system (according to /var/lib/dpkg.log*).  I am using Linux Mint 17.1 "Rebecca", MATE Edition (a derivative of Ubuntu 14.04).
Comment 1 Tanu Kaskinen 2015-02-04 21:21:19 UTC
The bug title says that the module is "not found", does that mean that you have actually checked that the module is missing from the module directory?
Comment 2 q7uswgjtck@snkmail.com 2015-02-04 23:00:54 UTC
No, the module is still there (I think: see below).  What I meant was "Module load failed," sorry.  

$ ls -l `locate module-switch-on-connect`
-rw-r--r-- 1 root root 10312 Apr  4  2014 /usr/lib/pulse-4.0/modules/module-switch-on-connect.so
Comment 3 Tanu Kaskinen 2015-02-04 23:08:09 UTC
What's the PulseAudio version? The module location suggests 4.0, but if PulseAudio has different version, then that would explain the error.

If your PulseAudio version is 4.0, then check the PulseAudio log. Here are instructions for getting the log: https://wiki.ubuntu.com/PulseAudio/Log

When module-switch-on-connect is loaded without arguments, the only reason that can make it fail is that PulseAudio either doesn't find the module, or the module is inaccessible or corrupted. That strongly suggests a packaging bug, but let's continue debugging it here anyway...
Comment 4 q7uswgjtck@snkmail.com 2015-02-05 00:11:02 UTC
Thanks for your help, Tanu.  The version is 4.0 (obtained with pulseaudio --version).  

When I followed the logging directions, I was unable to reproduce the bug.  I ran the pacmd command in another window while the logging was happening, and it was now able to load the module (which works correctly).

The logging instructions required killing and restarting pulseaudio, and this seems to be enough to allow the loading to work (it is not necessary to be logging or to set autospawn = no).  

So, is something going wrong when pulseaudio is starting up upon boot, so that it is not able to load the module either then or when explicitly asked at the command line?
Comment 5 Tanu Kaskinen 2015-02-25 17:46:59 UTC
Sorry for the slow reply...

To get the verbose log during boot (or rather during login, assuming that you're running PulseAudio as a user service as usual), you can put these options to ~/.config/pulse/daemon.conf:

log-target = newfile:/home/you/pulse.log
log-level = debug

That will make PulseAudio log to pulse.log in your home directory, with debug logging. Every time PulseAudio starts, a new file will be created. The first file will have name pulse.log, the second will have name pulse.log.1, then pulse.log.2 etc.
Comment 6 GitLab Migration User 2018-07-30 09:34:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/30.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.