EEK. Ubuntu studio using system wide instance of pulseaudio

What other apps and distros do you use to round out your studio?

Moderators: khz, MattKingUSA

millerthegorilla
Established Member
Posts: 70
Joined: Wed Oct 26, 2011 11:22 am

EEK. Ubuntu studio using system wide instance of pulseaudio

Postby millerthegorilla » Tue Jul 23, 2019 1:00 pm

In ubuntu studio disco dingo, pulseaudio is listed as being a child process of systemd (using pstree).

However, I cannot find any reference to a systemd unit file.

I am relatively certain that I have always been advised to never run pulsaudio as a system wide instance, for security reasons.

I also am unable to stop pulseaudio from autospawning - I have edited the /etc/pulse/client.conf, and created a .config/pulse/client.conf with autospawn=no.
I have tried a systemctl command I found on the net:
sudo systemctl --global disable pulseaudio.service pulseaudio.socket
but to no avail.
Is there anyone who knows if it is possible to stop pulseaudio, without removing it?
Cheers, I only have 16 gigs of ram so don't want to continue running out of memory, because of the badly configured system.
I wish kxstudio were alive still. I might even try the 16.04 QT4 release just for the sake of it.
Oh well.

User avatar
sysrqer
Established Member
Posts: 1835
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: EEK. Ubuntu studio using system wide instance of pulseaudio

Postby sysrqer » Tue Jul 23, 2019 1:23 pm

It's probably set up to run as a user service:

Code: Select all

sudo systemctl --user disable pulseaudio.service && sudo systemctl --user disable pulseaudio.socket


I can't imagine that pulseaudio is going to make much difference to your ram usage though.

User avatar
khz
Established Member
Posts: 1202
Joined: Thu Apr 17, 2008 6:29 am
Location: German

Re: EEK. Ubuntu studio using system wide instance of pulseaudio

Postby khz » Tue Jul 23, 2019 1:58 pm

<IMHO>Using two soundservers at the same time does not make sense for a LAW. Additionally, using pulseaudio consumes more processes resulting in CPU, Ram, ... no matter how much.</IMHO>
I do this via qjackctl as a user as described in my signature "Debian ...".
Jack without pulseaudio:
  • Setup >> Options > [X] Execute script at startup: "systemctl --user stop pulseaudio.socket && systemctl --user stop pulseaudio.service"
  • Setup >> Options > [X] Run script after shutdown: "killall -9 jackdbus && systemctl --user start pulseaudio.socket && systemctl --user start pulseaudio.service")
FZ - Does humor belongs in Music?
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
    I don't care about the freedom of speech because I have nothing to say.

User avatar
nikgnomicradio
Established Member
Posts: 89
Joined: Wed Feb 07, 2018 9:31 pm
Contact:

Re: EEK. Ubuntu studio using system wide instance of pulseaudio

Postby nikgnomicradio » Tue Jul 23, 2019 2:01 pm

millerthegorilla wrote:I have always been advised to never run pulsaudio as a system wide instance, for security reasons.


Pulseaudio documentation confirms it is usually not good to run Pulseaudio as system-wide daemon
But Pulseaudio running under systemd is not running as system-wide daemon
it still uses daemon.conf and dafault.pa configuration and ignores system.pa
running as user@1000 allows some secure root access for some Pulseaudio functions
(I believe this is for network streaming and some interaction with Xserver, but I do not use pulseaudio functions that need this)

the systemd services can be checked with:

Code: Select all

systemctl --user status pulseaudio.service pulseaudio.socket


to stop Pulseaudio autospwaning need to disable pulseaudio.socket first:

Code: Select all

systemctl --user disable pulseaudio.socket --now

then disable the pulseaudio.service:

Code: Select all

systemctl --user disable pulseaudio --now


But there should be no need to disable Pulseaudio and/or autospawning
A modern Linux system is more than capable of managing JACK and Pulseaudio with D-Bus
and even without D-Bus, usually only need to suspend Pulseaudio if it gets in the way of JACK:

Code: Select all

pacmd suspend 1

millerthegorilla
Established Member
Posts: 70
Joined: Wed Oct 26, 2011 11:22 am

Re: EEK. Ubuntu studio using system wide instance of pulseaudio

Postby millerthegorilla » Tue Jul 23, 2019 3:16 pm

Thanks for your detailed reply, #nicgnomicradio.

I didn't think to check the --user flag of systemd, I only know of one other app that uses it, which profile-sync-daemon.

I have removed pulseaudio. As I did, it took ubuntustudio-controls, and all of the ubuntu theming, the desktop, menu etc.
in fact all of this went....
indicator-sound* osspd* osspd-pulseaudio* pulseaudio* pulseaudio-module-bluetooth* pulseaudio-module-jack* ubuntustudio-audio* ubuntustudio-controls* ubuntustudio-default-settings* ubuntustudio-desktop* ubuntustudio-desktop-core* ubuntustudio-installer* ubuntustudio-menu* ubuntustudio-video*

I guess I was supposed to leave it, but what I did was install the kxstudio repos and then update, upgrade and install cadence.
I've now got the same config, but with 40% dsp load and no xruns. Go figure.
I use older equipment so I have to be quite strict about what runs and what doesn't, and I haven't found anything that works quite as well as falktx's versions of software when it comes to low jitter, low latency etc.
So, now to install the menu and plugins and hopefully it will work.
I like pulseaudio for the use of listening to audio from the web browser and stuff, but I'm relatively certain that I can still do that with alsa and chromium. I hope it works cause I want to sample from it.
Anyway, thanks all.

User avatar
English Guy
Established Member
Posts: 470
Joined: Wed Oct 17, 2012 7:28 pm
Location: England

Re: EEK. Ubuntu studio using system wide instance of pulseaudio

Postby English Guy » Tue Jul 23, 2019 8:28 pm

I am still disabling pulse as it did interfere and cause xruns

I set it so it does not respawn and put commands to stop and start it within my qjackctl setup

I think you can also use the services command to stop it. I use services and kill everything I don't need before a session.


Return to “Linux Distributions & Other Software”

Who is online

Users browsing this forum: No registered users and 3 guests