Problems Launching Pulseaudio At Startup

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

Moderators: MattKingUSA, khz

Post Reply
G M Slater
Established Member
Posts: 52
Joined: Fri May 18, 2012 5:00 pm
Location: Boise ID USA
Contact:

Problems Launching Pulseaudio At Startup

Post by G M Slater »

I am running a hybrid of KX and Ubuntu Studios. Basically I start with a vanilla installation of Ubuntu 12.10. I then add the KXStudio repositories and install jack, cadence, claudia, carla, wineasio, the low latency kernel, etc. from them. I then install all of the UbuntuStudio packages. I run a regular Unity desktop and use cadence to launch jack when working on music...

Everything works perfectly for me, except that recently Pulseaudio stopped loading at system startup. If I launch it from a command window after boot it runs fine. In looking at the startup applications in etc/xdg/autostart I noticed that both pulseaudio.desktop and pulseaudio-kde.desktop are present. Could this be the source of the problem? If so, what is the best way to keep pulseaudio-kde from loading at system start, and will disabling it cause other problems? If loading both pulseaudio and pulseaudio-kde at startup is not the cause of the problem, does anyone know what is?

Thank you in advance for helping out!
G M Slater
Established Member
Posts: 52
Joined: Fri May 18, 2012 5:00 pm
Location: Boise ID USA
Contact:

Re: Problems Launching Pulseaudio At Startup

Post by G M Slater »

@falkTX: What I normally prefer to do is have pulse load at system startup, but not jack. When I am done working on things for my day job and get ready to work on music I launch cadence and start jack. When I am done with the music session I usually stop jack and cadence, etc... This gives me the best of both worlds. It has all worked fine up until about three or four weeks ago. Now pulse will not load at system startup. It is not a huge deal as that I can always start it from a terminal, but at the very least I wanted to know what was causing the problem in the first place.

If I understand your reply correctly re-enabling pulseaudio auto-respawn will give me what I am used to? If so, will pulseaudio auto-respawn be diabled the next time I launch cadence?

Thank you in advance for any further clarification you can offer.
G M Slater
Established Member
Posts: 52
Joined: Fri May 18, 2012 5:00 pm
Location: Boise ID USA
Contact:

Re: Problems Launching Pulseaudio At Startup

Post by G M Slater »

@falkTX: I was able to resolve everything by setting autospawn = yes in ~/.pulse/client.conf. Pulse now runs at startup, I am able to start and stop jack via cadence, etc... Thanks for pointing me in the right direction!
sonicolonic
Established Member
Posts: 50
Joined: Sat Aug 08, 2009 6:32 am

Re: Problems Launching Pulseaudio At Startup

Post by sonicolonic »

Ok, I'm having a similar issue and would like to add more info to the OP's question.

Here's my reason for wanting PA and jackd. For all intents an dpurposes I have 2 soundcards. The stock onboard card, and a couple of RME Multifaces (that act like a single card more or less) for recording work. I want to use my stock soundcard so audio isn't going through my analog mixer all of the time. Simply put, I prefer to not mix business with pleasure.

I can get this to work by starting pulseaudio after I login. It works when I tried changing /.pulse/client.conf autospawn to yes, and pulseaudio immediately starts, but doesn't persist after logging back in (you explained cadence needs to stop pulseaudio to start jackd already, I get that). But how can I automate this? I've tried a couple of autostart scripts but they don't seem to run. Any ideas? I'm still a bit of a noob here, but it doesn't seem like the session/startup autostarter is autostarting. I just need it to run pulseaudio -D AFTER Cadence is happily running jackd.

Another alternative would be if Cadence just had the option to NOT bridge pulseaudio.

Thanks for all of your hard work in putting together KXStudio. I'm excited to see Linux audio come this far and can't wait to take my new system for a spin.

~bb
sonicolonic
Established Member
Posts: 50
Joined: Sat Aug 08, 2009 6:32 am

Re: Problems Launching Pulseaudio At Startup

Post by sonicolonic »

Nevermind... I wrote an actual script, and had autostart run that, specified full dir path.

In the past, and actally, concurrently, I'd be able to run something like hdspmixer just by entering "hdspmixer" into the command field (which works), doesn't work with just "pulseaudio" or any variants that I tried. Not sure why, but maybe it has to do with starting the command with sleep. Now that I think about it, the sleep and killall commands never works when inline with hdspmixer... hmmm... anyways...

Script looks like this:

Code: Select all

#!/bin/bash 

sleep 5
/usr/bin/pulseaudio -D
Saved in /home/user/
as filename.sh
make it executable
Then I just direct Autostart to run the script using the command "/home/user/filename.sh"

Don't laugh at my novel lesson sharing!! I'm just proud that I figured it out myself!

~bb
skavar
Established Member
Posts: 97
Joined: Sat Sep 15, 2012 9:21 am

Re: Problems Launching Pulseaudio At Startup

Post by skavar »

I hear you man.
Congrats
ToddMWorth
Established Member
Posts: 225
Joined: Tue Oct 23, 2012 3:59 am

Re: Problems Launching Pulseaudio At Startup

Post by ToddMWorth »

sonicolonic wrote: Simply put, I prefer to not mix business with pleasure.
Smart move. Run a VM.
Thad E Ginathom
Established Member
Posts: 369
Joined: Fri Sep 23, 2011 1:03 pm

Re: Problems Launching Pulseaudio At Startup

Post by Thad E Ginathom »

sonicolonic wrote: Another alternative would be if Cadence just had the option to NOT bridge pulseaudio.
I does, doesn't it? Uncheck PA Autostart at login
gazpacho
Established Member
Posts: 41
Joined: Wed Aug 15, 2012 1:49 am
Location: Mallorca

Re: Problems Launching Pulseaudio At Startup

Post by gazpacho »

Pulseaudio complicates things, but its convenient. On one pc with kcstudio I have purged it. On another I havent, I want to use pulse on the onboard soundcard, and jack on the audio work card separately. Going through the docs in https://help.ubuntu.com/community/Ubunt ... reparation it goes:
PulseAudio and Jack working separately

It is possible to use jack without communicating with Pulse Audio : not use Dbus. In Qjackctl (Jack Control), go to the settings and uncheck the Dbus option. Restart the computer or your session. And then, when you start jackd, Pulse Audio and Jack works separately.

It is very interesting when you have an integrated sound card and a sound card for audio. This way, the system continue to use the default sound card as if nothing changed. And audio application will only see the dedicated sound card using Jack.

Indeed, it is not very usefull if you have only one sound card.
In cadence > click configure > jack settings , there is no option to disable dbus like in qjackctl as in the above doc.
So when I boot without cadence started (and autostart jack unchecked), all audio goes through pulse to the onboard soundcard. Timidity started as daemon sounds through this one.
But as soon as I start cadence and jack on the other card for audio work (bridge type alsa>jack plugin, pulse audio started but not bridged), all sound goes to this card. Timidity daemon doesnt sound anymore, so after daemon killed and command line started as user, it suddenly sounds on the audio work soundcard. Timidity has no way that I know of to be started on a chosen soundcard.
So the question is, ¿Is the dbus disabling in qjackctl useful?, ¿Would it do any good in cadence jack configurator?.
Thanks million for a great job on kxstudio.
bravebear
Posts: 2
Joined: Wed Jan 01, 2014 9:31 pm

Re: Problems Launching Pulseaudio At Startup

Post by bravebear »

Could this topic be at all related and a possible solution:
http://www.linuxmusicians.com/viewtopic ... 47&t=10315

I have now a setup where pulseaudio and jack play well together per pulseaudio bridge, and both are always on, basically as per Cadence default settings. I just checked the "autostart at login" for the pulseaudio bridge and jack settings.
bazsound
Established Member
Posts: 480
Joined: Sat Aug 03, 2013 11:46 am

Re: Problems Launching Pulseaudio At Startup

Post by bazsound »

Why have to start and stop jack.

~Theres no reason to have to switch between 1 sound server and another when you can have jack running all the time.

Pulseaudio is a pain.

If you use alsa and have the alsajack bridges running. non jack programs will work through jack. thats the way ive been running for a while now. And it has the advantage that i can route audio from non jack programs into jack programs if i want to.

Another good thing about the alsajack bridge asswell for me, is that i now have 2 sets of speakers setup and i can route my audio to both sets of speakers which are pointed at 2 different couches.

Anyway, IMO running a kx studio install is way better than having ubuntu studio with the kx repos added. Its all setup for you. Ubuntu studio has alot of clutter. The unity interface is a little too heavy on resources, and i never liked the menu system .

KX studio + Lubuntu desktop = light on resources, quick.
Post Reply