Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

how to shutdown pulseaudio

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
morgon
Posts: 189
Joined: 2010-08-28 03:04

how to shutdown pulseaudio

#1 Post by morgon »

Hi,

I have a fresh install of stretch and have not changed much of the pulseaudio-configuration (all I changed was adding "autospawn = no" in /etc/pulse/client.conf).

For some software I now need to run jackd and want to shut down pulseaudio:

Code: Select all

/home/mh > ps -ef | grep pulse
Debian-+  2950   548  0 18:05 ?        00:00:00 /usr/bin/pulseaudio --daemonize=no
Debian-+  2952  2950  0 18:05 ?        00:00:00 /usr/lib/x86_64-linux-gnu/pulse/gconf-helper
mh        3149   688  7 18:10 ?        00:00:00 pulseaudio --start
mh        3153  3149  0 18:10 ?        00:00:00 /usr/lib/x86_64-linux-gnu/pulse/gconf-helper

/home/mh > pulseaudio --kill

/home/mh > ps -ef | grep pulse
Debian-+  2950   548  0 18:05 ?        00:00:00 /usr/bin/pulseaudio --daemonize=no
Debian-+  2952  2950  0 18:05 ?        00:00:00 /usr/lib/x86_64-linux-gnu/pulse/gconf-helper

So with "pulseaudio --kill" I can get rid of the pulseaudio-processes running under my id, but a few others remain. What are they, how can I shut them down and how can I start them again?

And it seems pulseaudio is not started via systemd but via some other magic. Does anybody understand how this works?

Many thanks!

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: how to shutdown pulseaudio

#2 Post by tynman »

I once tried to figure out how pulseaudio started in Debian Jessie, but failed. It has remained a mystery to me. But un-installing it took care of not having it running.

Code: Select all

apt-get remove pulseaudio

bigrigdriver
Posts: 145
Joined: 2014-09-01 17:04
Location: East Central Illinois, USA

Re: how to shutdown pulseaudio

#3 Post by bigrigdriver »

Here's a tip from LinuxPlanet that might help: http://www.linuxplanet.com/linuxplanet/tutorials/7130/2
Registered GNU/Linux user #170078

Go ask google before you ask on these boards.

It it isn't broken, Tweak It !!!

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: how to shutdown pulseaudio

#4 Post by golinux »

tynman wrote:I once tried to figure out how pulseaudio started in Debian Jessie, but failed. It has remained a mystery to me. But un-installing it took care of not having it running.

Code: Select all

apt-get remove pulseaudio
Amen to that. It's potterware. Of course it wants to take over in a non-linux way. After all, lennart's the boss, not you. ;) Just nuke it and be happy.
May the FORK be with you!

chronics
Posts: 13
Joined: 2012-12-11 22:03

Re: how to shutdown pulseaudio

#5 Post by chronics »

If you dont want to uninstall you can run pasuspender -- application where application is the app you are trying to run without pulse. I prefer to run pactl suspend-sinks 1 1 , the first 1 is the sink and second 1 is suspend, you can renable the sink with pactl suspend-sinks 1 0 . Doing this allows me to use alsa for bit perfect audio and then enable pulse once I'm done. To get your list of sinks run pacmd list-sinks.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: how to shutdown pulseaudio

#6 Post by sunrat »

You can use pasuspender if you don't want to remove it - https://wiki.debian.org/PulseAudio#Dyna ... .2Fdisable

I still think Pulseaudio is a solution looking for a problem, although it does have a vague use case for some people. I don't bother removing it any more if it is installed by default although it usually means setting at least one extra volume control than before it existed. Can't say I had problems with sound before it existed though, using just ALSA.

Snap, @chronics. :D
I don't think it interferes with audio such that it would be perfect with ALSA and not perfect with Pulse. Pulse is just a layer on top of ALSA which tells ALSA what to do. It's not a different signal path or anything afaik.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: how to shutdown pulseaudio

#7 Post by morgon »

Thanks so far but I don't want to remove it and I don't want to use pasuspender.

I have tried pasuspender but I nevertheless have a problem with jackd. In order not to chase some jackd vs pulseaudio problems I simply want to make sure that pulseaudio is not running before I investigate any further.

But pulseaudio is not bad, I want to keep it, it's just that to play with a particular software I need to run jackd.

So the initial question remains unanswered: How to I shut down pulseaudio and how does it get started anyway?

Many thanks!

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: how to shutdown pulseaudio

#8 Post by peer »


User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: how to shutdown pulseaudio

#9 Post by debiman »

morgon wrote:So with "pulseaudio --kill" I can get rid of the pulseaudio-processes running under my id, but a few others remain.
have you tried repeating the same command with sudo?
And it seems pulseaudio is not started via systemd but via some other magic.
sure?
systemctl|grep pulse?

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: how to shutdown pulseaudio

#10 Post by morgon »

Yes I have tried to use "pulseaudio --kill" as root:

Code: Select all

sudo pulseaudio -k
E: [pulseaudio] main.c: Failed to kill daemon: No such process
So the offending processes do not run as root, but I have no idea what account they are running under as there is no entry for the displayed owner "Debian-+" in /etc/passwd.

It's all very mysterious to me....

And no, "systemctl | grep pulse " does not return anything and I cannot find an unit-file for pulse. So the magic of how it actually get's started also remains a mystery.

Still hoping for someone who knows.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: how to shutdown pulseaudio

#11 Post by stevepusser »

Pulseaudio in Jessie and newer runs for the session user, not as system. I doubt those related settings you see will affect jack...how about just trying an experiment to see?
MX Linux packager and developer

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: how to shutdown pulseaudio

#12 Post by morgon »

I will experiment, but it's not about jack as such.

It's about understanding what's going on.

chronics
Posts: 13
Joined: 2012-12-11 22:03

Re: how to shutdown pulseaudio

#13 Post by chronics »

@sunrat.
Pulse affects the sound in that it introduces a software layer which allows you to manipulate the sound and you cannot prevent this, for instance with pulse on mpd I have never been able to get it to playback above 44.1k . This link has a good explanation https://www.musicpd.org/doc/user/advanc ... it_perfect. @morgan why dont your try pactl, once you suspend it pulse will not hold a lock on the soundcard output, which should allow jackd to run as needed. YOu could also try the exit command.

pactl(1) General Commands Manual pactl(1)

NAME
pactl - Control a running PulseAudio sound server

suspend-sink SINK 1|0
Suspend or resume the specified sink (which may be specified either by its symbolic name, or by its numeric index), depending whether 1 (suspend) or 0 (resume) is passed as last argument.
Suspending a sink will pause all playback. Depending on the module implementing the sink this might have the effect that the underlying device is closed, making it available for other appli‐
cations to use. The exact behaviour depends on the module.

exit Asks the PulseAudio server to terminate.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: how to shutdown pulseaudio

#14 Post by sunrat »

Sorry for thread detour but I think we've hit a brick wall with OP's question, needs more research.
chronics wrote:@sunrat.
Pulse affects the sound in that it introduces a software layer which allows you to manipulate the sound and you cannot prevent this, for instance with pulse on mpd I have never been able to get it to playback above 44.1k .
I got a 24bit/96k file to play at 32bit/48k in mpd after setting in /etc/pulse/daemon.conf avoid-resampling = true :? Sound card is M-Audio Audiophile 2496.

Code: Select all

cat /proc/asound/card*/pcm*p/sub*/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 10
rate: 48000 (48000/1)
This ain't over! But lunchtime now. :wink:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: how to shutdown pulseaudio

#15 Post by sunrat »

Oops, helps to actually uncomment the above-mentioned parameter in daemon.conf:

Code: Select all

cat /proc/asound/card*/pcm*p/sub*/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 10
rate: 96000 (96000/1)
Success!

OP, I'm interested in tracking down how pulse starts too, so will do more research later.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: how to shutdown pulseaudio

#16 Post by sunrat »

It appears Pulseaudio is started at boot simply by a file pulseaudio.desktop in /etc/xdg/autostart/
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

chronics
Posts: 13
Joined: 2012-12-11 22:03

Re: how to shutdown pulseaudio

#17 Post by chronics »

Thats Interesting Sunrat, is the start from /etc/xdg/autostart new in stretch or was that how pulse started before? I see mpd.desktop there too which I know was defintely not autostarting for users previously when stretch was still testing. I will try setting pulse at above 16bit44.1khz as thats news to me, will be interesting to see what my sound card says and if I actually hear the difference. Need to look into my config more because it looks like pulse is started twice.

christo@burma:~$ ps aux | grep pulse
Debian-+ 1549 0.0 0.0 1313840 7600 ? Ssl Sep24 0:00 /usr/bin/pulseaudio --daemonize=no
Debian-+ 1570 0.0 0.0 129952 2468 ? S Sep24 0:00 /usr/lib/x86_64-linux-gnu/pulse/gconf-helper
christo+ 2093 0.3 0.1 2114284 20688 ? S<l Sep24 54:52 /usr/bin/pulseaudio --start --log-target=syslog
christo+ 2227 0.0 0.0 129952 2348 ? S Sep24 0:00 /usr/lib/x86_64-linux-gnu/pulse/gconf-helper
christo+ 26292 0.0 0.0 12784 940 pts/5 S+ 01:24 0:00 grep pulse

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: how to shutdown pulseaudio

#18 Post by sunrat »

I'm on Sid so can't tell you much about Stretch. Pulse only starts once, as user. I also have mpd.desktop in there.
Master clock for sound card needed to be changed to 96k to allow 96k playback.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply