how to shutdown pulseaudio

Everything about X, Gnome, KDE, ... and everything running on it

how to shutdown pulseaudio

Postby morgon » 2017-10-02 15:25

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!
morgon
 
Posts: 74
Joined: 2010-08-28 03:04

Re: how to shutdown pulseaudio

Postby tynman » 2017-10-02 17:53

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
tynman
 
Posts: 49
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

Re: how to shutdown pulseaudio

Postby bigrigdriver » 2017-10-02 18:43

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

Go as google before you ask on these boards.

It it isn't broken, Tweak It !!!
bigrigdriver
 
Posts: 134
Joined: 2014-09-01 17:04
Location: East Central Illinois, USA

Re: how to shutdown pulseaudio

Postby golinux » 2017-10-02 19:12

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!
User avatar
golinux
 
Posts: 1255
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: how to shutdown pulseaudio

Postby chronics » 2017-10-02 21:13

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.
chronics
 
Posts: 13
Joined: 2012-12-11 22:03

Re: how to shutdown pulseaudio

Postby sunrat » 2017-10-02 21:23

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!
User avatar
sunrat
 
Posts: 2052
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: how to shutdown pulseaudio

Postby morgon » 2017-10-02 23:13

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!
morgon
 
Posts: 74
Joined: 2010-08-28 03:04

Re: how to shutdown pulseaudio

Postby peer » 2017-10-03 05:01

peer
 
Posts: 34
Joined: 2017-03-26 10:14

Re: how to shutdown pulseaudio

Postby debiman » 2017-10-03 06:56

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?
User avatar
debiman
 
Posts: 1619
Joined: 2013-03-12 07:18

Re: how to shutdown pulseaudio

Postby morgon » 2017-10-03 17:15

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.
morgon
 
Posts: 74
Joined: 2010-08-28 03:04

Re: how to shutdown pulseaudio

Postby stevepusser » 2017-10-03 21:33

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?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Krita 3.3.2.1, Pale Moon 27.6.0, Audacity 2.2.0, mpv 0.27.0, Corebird 1.7.1, Firefox 57.0, SMPlayer 17.11.2
User avatar
stevepusser
 
Posts: 8935
Joined: 2009-10-06 05:53

Re: how to shutdown pulseaudio

Postby morgon » 2017-10-04 21:25

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

It's about understanding what's going on.
morgon
 
Posts: 74
Joined: 2010-08-28 03:04

Re: how to shutdown pulseaudio

Postby chronics » 2017-10-05 23:19

@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.
chronics
 
Posts: 13
Joined: 2012-12-11 22:03

Re: how to shutdown pulseaudio

Postby sunrat » 2017-10-06 00:49

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
 
Posts: 2052
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: how to shutdown pulseaudio

Postby sunrat » 2017-10-06 06:19

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
 
Posts: 2052
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Next

Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable