Pulseaudio bridge is gone after sleep, KXStudio 14.04

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: MattKingUSA, khz

Post Reply
kvr2007
Established Member
Posts: 6
Joined: Wed May 28, 2014 12:01 am

Pulseaudio bridge is gone after sleep, KXStudio 14.04

Post by kvr2007 »

Hello, LinuxMusicians and KXStudio users!

I was giving a try to ALSA->PulseAudio->Jack (Plugin) bridge in Cadence. The bridge works nice and seamless, however, sometimes after suspend (usually a long one, like overnight) the bridge is gone and Cadence says:

Pulseaudio is started, but not bridged.

I cannot restore the bridge from Cadence, unless I kill Pulseaudio and then hit 'Start' for Pulseaudio bridge.
I also tried to restore the bridge manually by running the following script:

/usr/bin/cadence-pulse2jack

The script did not restore the bridge and gave the following messages:

Failure: Module initialization failed
Daemon not responding.

I looked at the bash code of cadence-pulse2jack script, looks like the issue is in the initialization command for Pulseaudio (see bottom of the script):

Code: Select all

pulseaudio --daemonize --high-priority --realtime --disallow-module-loading --exit-idle-time=-1 --file=$FILE -n
I changed the command to (removed --disallow-module-loading):

Code: Select all

pulseaudio --daemonize --high-priority --realtime --exit-idle-time=-1 --file=$FILE -n
and the Pulseaudio bridge is now restored after pressing the corresponding Start button in Cadence. However, the bridge still disappears after a long suspend. I guess I could just set the cadence-pulse2jack script run every time after suspend, but I was wondering if there is a neater solution... Could you please also provide some insight into how exactly the Pulseaudio bridge is made in KXStudio and how it is handled before/after suspend?

Thanks in advance!
kvr2007
Established Member
Posts: 6
Joined: Wed May 28, 2014 12:01 am

Re: Pulseaudio bridge is gone after sleep, KXStudio 14.04

Post by kvr2007 »

Hello, falkTX!
I wish didn't have to use Pulseaudio, but as long as I need Skype I'll have to use it, too :( Anyway, I looked through available PA modules here:
http://www.freedesktop.org/wiki/Softwar ... r/Modules/
and I haven't found any candidates to be added to play+rec.pa file. I think for now I'll stick with my modified cadence-pulse2jack script. In case anybody is interested this is how you set the script to run after resume from suspend:

create an executable file:
/etc/pm/sleep.d/10_restore-pulse
with the following content (substitute $USER with your username):

Code: Select all

case "${1}" in
    resume|thaw)
       su $USER -c '/usr/bin/cadence-pulse2jack'
;;
esac
Post Reply