You are not logged in.

#1 2019-01-01 17:08:33

Smoerrebroed
Member
From: Germany
Registered: 2011-07-24
Posts: 106

[SOLVED] PulseAudio running for gdm

Hi All,

due to some remodeling in my audio setup at home, I would now like to use my standard desktop machine for (a bit of) music making. As I have come to accept that there is really no better component than JACK to base all of this on, I would like to get JACK working in an "on-demand" kind of style, meaning: I run Gnome desktop and would like to crank up JACK when I do audio work and shut it down afterwards.

As PulseAudio is the default sound server for Gnome, I installed pulseaudio-jack to allow PA running on top of JACK. This, in general, seems to work. At the moment I am having an issue with PA hogging my audio device (audio via nVidia HDMI in my case). I already found out that I can stop PA running

systemctl --user stop pulseaudio.socket && systemctl --user stop pulseaudio.service

However, after doing so, there are still two PA processes:

$ ps aux|grep pulse
gdm        815  0.0  0.0 1032248 11324 ?       Ssl  17:44   0:00 /usr/bin/pulseaudio --daemonize=no
gdm        820  0.0  0.0 253904  6836 ?        Sl   17:44   0:00 /usr/lib/pulse/gsettings-helper

I already created /var/lib/gdm/.config/pulse/client.conf:

daemon-binary = /bin/true

However, PA is still started for gdm (and will always respawn after killing). I found this information https://wiki.debian.org/BluetoothUser/a2dp which indicates that systemd could also somehow be involved, but as I did not find the named config file (sockets.target.wants/pulseaudio.socket), perhaps this does not apply.

Is there any generally accepted solution for this? I do not rely on accessibility features, so gdm does not have to have access to PA, but at the moment it seems really difficult to prevent it from initiating PA (and thus taking my primary sound device). TIA!

Cheers,

Smoerrebroed

Last edited by Smoerrebroed (2019-01-02 05:48:12)

Offline

#2 2019-01-01 18:08:54

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] PulseAudio running for gdm

Have you tried masking the pulseaudio service and socket as well?
https://askubuntu.com/questions/816285/ … tl-disable

I'm sure someone else who knows more about sosund than I do will be along later to help get it all configured correctly smile


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-01-01 19:14:38

Smoerrebroed
Member
From: Germany
Registered: 2011-07-24
Posts: 106

Re: [SOLVED] PulseAudio running for gdm

Actually I wanted to kinda do that, but PA ist started as part of the user configured units, not the system configured ones, so I'd have to su to gdm and then mask it but that doesn't seem possible. Perhaps this is just my limited knowledge though. :-|

Last edited by Smoerrebroed (2019-01-01 19:14:57)

Offline

#4 2019-01-02 05:47:36

Smoerrebroed
Member
From: Germany
Registered: 2011-07-24
Posts: 106

Re: [SOLVED] PulseAudio running for gdm

Alright, Slithery's hint made me explore that route once more and - tada - I found a helpful wiki entry from our friends over at Antergos that actually deals with a similar issue:

https://antergos.com/wiki/de/hardware/b … with-a2dp/

(Don't worry, there's an English version further down the page.)

While the BT stuff was not my actual issue, there are hints in there that deal with just what Slithery suggested: Masking the pulseaudio.socket service for gdm so it won't start at all. This is achieved by

$ sudo -ugdm mkdir -p /var/lib/gdm/.config/systemd/user
$ sudo -ugdm ln -s /dev/null /var/lib/gdm/.config/systemd/user/pulseaudio.socket

While this is the manual way of masking the unit, it works like a charm and finally allows me to freely access my soundcard from JACK within my own user session. Note: After getting rid of the gdm PA, it is no longer necessary to suspend/stop PA before starting JACK.

Thanks for your help! This was exactly the kind of pointer I needed.

Cheers,

Smoerrebroed

Offline

#5 2019-09-20 14:27:12

Tumadre
Member
Registered: 2019-09-20
Posts: 9

Re: [SOLVED] PulseAudio running for gdm

I also utilized this solution when running on Gnome 3.32 and it has worked until today, when I upgraded to 3.34. Has anyone else had this problem creep back in?

→ ps -ef | grep gdm | grep pulse
gdm         1065    1016  0 10:15 ?        00:00:00 /usr/bin/pulseaudio --daemonize=no
gdm         1083    1065  0 10:15 ?        00:00:00 /usr/lib/pulse/gsettings-helper

My first thought was that the PA socket file was removed, but its still in tact:

[root]# pwd
/var/lib/gdm/.config/systemd/user
[root]# ls -l
total 0
lrwxrwxrwx 1 gdm gdm 9 Sep 20 10:08 pulseaudio.socket -> /dev/null

Last edited by Tumadre (2019-09-20 14:31:12)

Offline

#6 2019-09-21 08:59:00

Varakh
Member
Registered: 2010-06-04
Posts: 10

Re: [SOLVED] PulseAudio running for gdm

Hi,

this helped me

sudo setfacl -m u:gdm:r /usr/bin/pulseaudio

And maybe you also want it to be automatically applied when pulseaudio is upgraded with the following pacman hook

$ /etc/pacman.d/hooks/pulseaudio.hook

[Trigger]
Operation = Install
Operation = Upgrade
Type = File
Target = usr/bin/pulseaudio

[Action]
Description = Preventing gdm from starting pulseaudio...
Exec = /usr/bin/setfacl -m u:gdm:r /usr/bin/pulseaudio
When = PostTransaction

Cheers
Varakh

Last edited by Varakh (2019-09-21 08:59:19)

Offline

#7 2019-09-24 06:04:25

gnumdk
Member
Registered: 2009-10-15
Posts: 175

Re: [SOLVED] PulseAudio running for gdm

Fresh ArchLinux installation, no process sunning for gdm after login (as expected since 3.32).

Offline

Board footer

Powered by FluxBB