LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-10-2017, 08:02 AM   #1
Uncleoilybag
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Rep: Reputation: 8
Pulseaudio will not autostart


Linux Mint has been working perfectly for months - I then installed a few video editor programs to try them out ( avidemux, flowblade) ...since then nothing but problems with sound.

I have narrowed the problem down to this - the pulseaudio daemon does not autostart.

When I boot up - no sound. If I open a terminal and enter " pulseaudio -D " then everything works perfectly.
This is my workaround every time I boot up.

So - for some reason autostarting PA no longer works. What stopped it?

OK you say - easy answer - just go into Control Centre > Startup Applications and add pulseaudio -D to start up on boot.
Yup - been there - done that - still doesn't start PA
Delete $HOME/.pulse folder - yes done that too - but no long term solution.

Could anybody suggest any actions to make PA start up on boot?
Does anybody have any idea what program is 'stopping ' my PA from autostarting like it used to do?

Thank you for reading this
 
Old 03-10-2017, 08:58 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
well you could un-install all of that software you installed, then see if that gets it back to how it was. then if yes, just install one at a time and work with it for a bit to see if it is that one that is stopping PA from autostarting, if no, then install the next one, same thing until you find which one is doing this to your system.

then you'll have a start point to work with.
 
Old 03-10-2017, 10:07 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
You can create that condition by adding "autospawn = no" to /etc/pulse/client.conf. Perhaps you need to change that to "autospawn = yes".
 
Old 03-10-2017, 11:45 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,585

Rep: Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351
Another thing to check is whether something like jackd was installed and is initially blocking the sound hardware. Check out the dependencies of the packages you installed for clues, perhaps?
Personally I think the first thing I would do would be to reinstall pulseaudio and see whether that resolves it.
 
Old 03-10-2017, 03:50 PM   #5
Uncleoilybag
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 8
autospawn = yes - this did not give me a permanent solution.

To re install PA - is this the only thing I need to enter?

sudo apt-get --reinstall pulseaudio

Last edited by Uncleoilybag; 03-11-2017 at 02:44 AM.
 
Old 03-11-2017, 07:48 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
$ sudo apt-get install --reinstall pulseaudio

Bear in mind that there are many parts (packages) and that is but one of them. You can have a pulseaudio over jackd setup (I do). And many other configurations. Alsa is the audio driver of sorts, everything else is a layer on top of that. Although the more layers, the less likely it'll be to taste at boot without serious admin skillz. I just accept that there's post boot steps I have to do for my audio setup, but my setup is hardly typical.

You might check the logs to see if pulseaudio tried to start, but failed to for reasons.

# journalctl -a
# less /var/log/syslog
$ dmesg | less
$ COLUMNS=255 ps faux
 
Old 03-11-2017, 09:07 AM   #7
Uncleoilybag
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 8
Thanks Shadow7 - I found these lines which are probably very relevant.
Do they give you any clue as to may next move ( actually I've not yet done a pulseaudio re-install)

Mar 11 14:50:07 QuadCore-Mint pulseaudio[1077]: [autospawn] core-util.c: Home directory not accessible: Permission denied
Mar 11 14:50:07 QuadCore-Mint pulseaudio[1077]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
Mar 11 14:50:07 QuadCore-Mint pulseaudio[1077]: [pulseaudio] main.c: Failed to acquire autospawn lock


and later

Mar 11 14:50:16 QuadCore-Mint pulseaudio[1769]: Failed to open module module-jack-source.so: module-jack-source.so: cannot open shared ob
Mar 11 14:50:16 QuadCore-Mint pulseaudio[1769]: Failed to open module "module-jack-source".
Mar 11 14:50:16 QuadCore-Mint pulseaudio[1769]: Module load failed.
Mar 11 14:50:16 QuadCore-Mint pulseaudio[1769]: Failed to initialise daemon.
and more


Mar 11 14:51:21 QuadCore-Mint pulseaudio[2377]: Failed to find a working profile.
Mar 11 14:51:21 QuadCore-Mint pulseaudio[2377]: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-0499_1009-00
Mar 11 14:51:25 QuadCore-Mint pulseaudio[2377]: Failed to open cookie file '/home/colin/.config/pulse/cookie': No such file or directory
Mar 11 14:51:25 QuadCore-Mint pulseaudio[2377]: Failed to load authentication key '/home/colin/.config/pulse/cookie': No such file or dir
 
Old 03-11-2017, 09:53 AM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Seems you have a few permission issues going on there. Did you do something with pulse as root? It might have created config files in the wrong place with the wrong permissions.

/.pulse* ???
~/.pulse* ???

Modern version put them in:

~/.config/pulse/

But it may have be assigned to root. And maybe some /run/ and /sys/ type things, but those should clear with a reboot.

$ ls -al .config/pulse*

Baring customization deleting the configs and restarting pulse will fix a lot of those config permission issues.
 
Old 03-11-2017, 11:11 AM   #9
Uncleoilybag
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 8
I haven't knowingly done something with pulse as root .

I entered ls -al .config/pulse* and got

colin@QuadCore-Mint ~ $ ls -al .config/pulse*
total 56
drwx------ 2 colin colin 4096 Mar 8 23:12 .
drwxr-xr-x 41 colin colin 4096 Mar 10 23:31 ..
-rw-r--r-- 1 colin colin 32768 Mar 8 23:12 8441891e86e24d76b9616edf516d5734-card-database.tdb
-rw-r--r-- 1 colin colin 12288 Mar 8 23:12 8441891e86e24d76b9616edf516d5734-device-volumes.tdb
-rw-r--r-- 1 colin colin 696 Mar 8 23:12 8441891e86e24d76b9616edf516d5734-stream-volumes.tdb

Do you recommend I reinstall pulseaudio - if so do i need to get rid of any old config files - and where would they be?

Thank you so much for your help
 
Old 03-20-2017, 03:16 AM   #10
Uncleoilybag
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 8
I have 'sort of' come up with a solution.

I discovered that it is some sort of conflict between JACK and PULSEAUDIO. I eventually discovered that the program jackdbus was automatically starting ( and yet as far as I can tell, no program was using jack ).
I had a program called Cadence which was in the startup programs, which automatically started jackdbus. So I have stopped that from ever starting up jackdbus and now my pulseaudio seems to start working OK and consequently all the other programs using sound seem to work.

So I suppose my next question is... is it possible to get JACK and PA to 'work together in perfect harmony' (as the song goes) or is that just a pipedream?
 
Old 03-20-2017, 05:43 AM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
jackdbus is jack2 it works fine, but conflicts with jack aka jackd (as far as ps output goes, basically the same app/process). It is quirky on my debian jessie system. I basically have to start/stop jackdbus and pulseaudio one or more times to have pulseaudio show up in qjackctl which is when you know it's now working.

$ pulseaudio --kill
$ jack_control stop
$ sudo kill -9 $(pgrep jackdbus)

Assumes autospawn=no and nothing is using your audio.

$ jack_control start

Might take a while and further configuration might be needed.

FILE: myjackdbus.sh
Code:
#!/bin/bash

#jack_control start
jack_control ds alsa
jack_control eps realtime false
jack_control dps device hw:1
jack_control dps rate 48000
jack_control dps nperiods 3
jack_control dps period 512

exit 0
$ ./myjackdbus.sh

Which starts pulseaudio as part of that effort. Actually starts with jack_control start. And this is when I check qjackctl to see if pulse showed up. Often times I have to $(pulseaudio --kill) and $(pulseaudio --start) to have it show up. But once it shows up, I'm using alsa, jackd, and pulse. And can do fancy things like the alsaequal plugin for a 10 band EQ. Or the calf plugin for a 30 band EQ. Although you have to do the rerouting / connections to bridge pulse to jackd and back to use the plugin (qjackctl or jack_* tools for CLI ways). One advantage of this route is that I can network audio with pulseaudio, so the EQ processing can be off my main machine and I only need one set of good speakers and one good audio interface.
 
Old 03-21-2017, 08:36 AM   #12
Uncleoilybag
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 8
Thanks Shadow7 for that comprehensive reply.
I have to confess I don't understand everything you've written but I'm getting there - slowly.
I don't use qjackctl ( should I be doing?) but I do have a program - cadence which allows me to control and configure jack
I've noticed (using System Monitor, looking at Processes) that when I start jack .. jackdbus says 'running and then PA says 'sleeping' .. and any program that was using PA eg a media player such as xplayer just stops producing any sound - and then if I stop jack then jackdbus says 'sleeping', PA says 'running' and any media player immediately starts producing sound again.
So that seems to be an 'either/or' situation - they're not really working together.
 
Old 03-21-2017, 12:28 PM   #13
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
There's special configuration that is needed (not default for most distros) when using a pulseaudio over jackd (jackdbus) setup. If that is indeed what you want to be doing. By default most distros don't use jack.

http://jackaudio.org/faq/pulseaudio_and_jack.html

Relative to my debian jessie install, I make the following changes. Disclaimer, might be incomplete like origami instructions.

FILE: $HOME/.asoundrc
Code:
pcm.pulse { type pulse fallback sysdefault }
ctl.pulse { type pulse fallback sysdefault }
pcm.!default { type pulse fallback sysdefault }
ctl.!default { type pulse fallback sysdefault }
This allows pulse to use alsa (or jack).

$ sudo apt-get install pulseaudio-module-jack

This allows pulseaudio to use jack.

FILE: /etc/pulse/default.pa
Code:
load-module module-native-protocol-tcp auth-ip-acl=192.168.2.0/24;127.0.0.1
set-default-sink jack_out
set-default-source jack_in
Those "additions" so pulse uses jack. And users that didn't start pulse (or jack) can use the audio over networking. Plus not-local machines.

FILE:$HOME/.config/pulse/client.conf
Code:
default server = 127.0.0.1
So users that did NOT launch pulse can access pulse over the network(lo/loopback). With the non-local IP in that location for not-local machines.

FILE: /etc/pulse/client.conf
Code:
autospawn = no
This allows pulseaudio to die (stop) and stay dead. I tend the change my configuration depending on what I am doing. Pulseaudio can take a bit of RAM away from other tasks. And jack can take a bit of CPU resources. Plus other quirks when networking audio and the system clock times differ / drift. It's just nice to have options.

When I want to use alsa natively and ignore the frills, I comment out most of the configurations and change the .asoundrc to suit. Plus stopping pulseaudio, jackdbus, and whatever else is using what I want for other things. I might need those frills to record a video, but disabling them when editing the video can literally save days of processing time. Then again all of my machines are years olds, or spec towards that age.
 
1 members found this post helpful.
Old 03-21-2017, 05:31 PM   #14
Uncleoilybag
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 8
That's brilliant - lots to think about there.
That link was very useful.
Thank you for your patience .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bypass pulseaudio problems and crashes when you don't have pulseaudio. Rinndalir Linux - Software 1 08-31-2016 01:00 PM
[SOLVED] Squeeze + Pulseaudio + Alsa and USB Midi device causes Pulseaudio crash mad4linux Debian 1 01-26-2011 03:57 AM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM
KDE 4 Autostart Program Bash Script to Write Autostart Bash Scripts for You! jdmcdaniel3 SUSE / openSUSE 1 05-03-2010 06:17 AM
tomboy autostart in xfce, though not on autostart list zlya Linux - Desktop 2 11-10-2009 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration