Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pulseaudio suddenly (re)starts on its own since update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
DrMcCoy
n00b
n00b


Joined: 12 Sep 2021
Posts: 4

PostPosted: Sun Sep 12, 2021 10:45 am    Post subject: pulseaudio suddenly (re)starts on its own since update Reply with quote

I have pulseaudio installed, but I usually start it manually when I need it, otherwise I run a pure ALSA setup.

But since the the last world update a few days ago, pulseaudio suddenly starts on its own, whenver I so much as touch any of the sound devices. Even if I'm just running alsamixer, pulseaudio starts its daemon.

For example:
- I stop pulseaudio
- I check if the pulse daemon is running. It is not
- I start alsamixer. The pulseaudio devices are shown, not the alsa ones
- I check if the pulse daemon is running. It is running

I haven't even done anything pulse specific, I just started alsamixer! Why is pulseaudio shouldering its way into this? I don't want that, is there a way to disable that behaviour?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3916

PostPosted: Sun Sep 12, 2021 1:31 pm    Post subject: Reply with quote

Its a mystery who or what starts pulseaudio.
There are no init scripts in /etc/init.d
I thought maybe a combination of elogind+dbus but that doesnt seem to be the case.
Probably the DE session.
You could try in
/etc/pulse/client.conf
Code:

autospawn = no

If that doesnt work maybe a small script to manuall turn on and off pulseaudio.
Code:

#!/bin/bash
[ ! -f /root/pulseaudio ] && mv /usr/bin/pulseaudio /root/

case $1 in
    "disable")
      rm /usr/bin/pulseaudio
      ln -s /bin/true /usr/bin/pulseaudio
      killall pulseaudio 2> /dev/null
      ;;
     "enable")
      rm /usr/bin/pulseaudio
      ln -s /root/pulseaudio  /usr/bin/pulseaudio
      ;;
      *)
       echo "usage: mypulse enable|disable"
       exit 1
       ;;
esac


Make sure to make a backup of /usr/bin/pulseaudio some place safe[/code]
_________________
:)


Last edited by alamahant on Sun Sep 12, 2021 2:14 pm; edited 5 times in total
Back to top
View user's profile Send private message
DrMcCoy
n00b
n00b


Joined: 12 Sep 2021
Posts: 4

PostPosted: Sun Sep 12, 2021 1:44 pm    Post subject: Reply with quote

I don't even have a DE as such, just a WM. I'm running Enlightenment DR16.
I'm also not running systemd.

But yeah, setting autospawn to no seems to fix the issue for me, thanks! :)

And yes, it seems like I had that set previously, but I clobbered it when I purged and reinstalled pulseaudio a few weeks ago (due to some bluetooth changes I experimented with). I completely forgot about that, and I didn't even notice the change, but that does certainly explain a few other weirdnesses.

I.e. in the end, it's all my fault, like so often. :D
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6065
Location: Removed by Neddy

PostPosted: Mon Sep 13, 2021 2:49 pm    Post subject: Reply with quote

pulseaudio will spawn (unless you tell it not to...) if anything requests PA capability.
While I was trying to switch over to pipewire I was constantly hitting this because discord would auto-start, which would request PA and thus PA would spawn....

So aspects of alsamixer (directly or indirectly) is querying PA and thus PA launches. this will be via dbus iirc
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Mon Sep 13, 2021 6:34 pm    Post subject: Reply with quote

Can it be that you have media-plugins/alsa-plugins[pulseaudio] installed?
Back to top
View user's profile Send private message
poe_1957
Apprentice
Apprentice


Joined: 26 Sep 2018
Posts: 192
Location: Mortsel

PostPosted: Wed Sep 15, 2021 11:57 am    Post subject: systemd pulseaudio Reply with quote

In systemd the pulseaudio does not come up, even installed as a service.

So in the user login you need to start pulseaudio manually in a terminal and that need to stay open as long as you want sound.
Starting pulseaudio as root does not function on boot up.

Anybody a good solution for this ?
_________________
Linuxpioneer
ALUG
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3916

PostPosted: Wed Sep 15, 2021 12:43 pm    Post subject: Reply with quote

poe_1957
I also checked there is no pulseaudio service in systemd.
Maybe use a display manager and a universal USE="pulseaudio elogind dbus"?
I think its the individual apps that request pulseaudio and then the service is started.
In my case xfce with lightdm I dont need to write anything to the terminal to have sound.
_________________
:)
Back to top
View user's profile Send private message
poe_1957
Apprentice
Apprentice


Joined: 26 Sep 2018
Posts: 192
Location: Mortsel

PostPosted: Wed Sep 15, 2021 9:40 pm    Post subject: @alamahant Reply with quote

There is indeed no service for pulseaudio. WHY?

I created it myself but no result.
The individual apps do not start pulseaudio. Pulseaudio need to be started and then it picks up the sound by the app.
Also I do not see Alsa taking over.
In the whole system i see various problems :

1) Audio not functioning like it shouild be
2) Electronic Identity card not functioning (Belgian EID does function under 5.x in ZORIN, UBUNTU,,....) in Gentoo since last change : the Cherry driver does not work anymore
3) Printing for older (XEROX 6600DN in my case does not function anymore) due to some change in version from Gentoo.
4) problem on Powermanagement with AMD processors (seems with 5.10.61 better)
5) in a previous post i mentioned some patch from SUSE to get rid of annoying error message. :
ACPI: \: failed to evaluate _DSM (0x1001)
ACPI: \: failed to evaluate _DSM (0x1001)
6)iwlwifi 0000:06:00.0: loaded firmware version 59.601f3a66.0 cc-a0-59.ucode op_mode iwlmvm
The iwlwifi drivers do not load the correct versions...
Probably the reason why no version is anymmore in green or yellow but all removed.

I removed QTwebengine and snappy. for having a working KDE desktop.
_________________
Linuxpioneer
ALUG
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3916

PostPosted: Wed Sep 15, 2021 9:52 pm    Post subject: Reply with quote

Quote:

Probably the reason why no version is anymmore in green or yellow but all removed.

Yes i noticed these white areas in many packages recently..
What does that mean exactly?
_________________
:)
Back to top
View user's profile Send private message
garrison
Apprentice
Apprentice


Joined: 18 Mar 2003
Posts: 265

PostPosted: Thu Sep 16, 2021 8:17 am    Post subject: Reply with quote

There are multiple ways pulseaudio daemon can be started
1. via systemd user service, check this via 'systemctl --user status pulseaudio.{service,socket}'
2. via desktop environment XDG integration autostart feature, there is /etc/xdg/autostart/pulseaudio.desktop file which would exec start-pulseaudio-x11 when you log in to desktop environment
3. if you do not use systemd user service, and your desktop environment does not support XDG, start-pulseaudio-x11 can be started by your desktop environment start scripts (e.g. .xinitrc or something)
Back to top
View user's profile Send private message
poe_1957
Apprentice
Apprentice


Joined: 26 Sep 2018
Posts: 192
Location: Mortsel

PostPosted: Fri Sep 17, 2021 9:13 am    Post subject: @garrison Reply with quote

I do only know one service of systemd. What is your userservice in systemd? Please explain.
I use systemctl only as root. Since otherwise no rights.
_________________
Linuxpioneer
ALUG
Back to top
View user's profile Send private message
garrison
Apprentice
Apprentice


Joined: 18 Mar 2003
Posts: 265

PostPosted: Fri Sep 17, 2021 9:54 am    Post subject: Re: @garrison Reply with quote

poe_1957 wrote:
I use systemctl only as root. Since otherwise no rights.

If you use systemd, that would manage both system and user services.
To check if your pulseaudio is being started by systemd user services, run this from your user account:
Code:
systemctl --user status pulseaudio.{service,socket}

Note '--user' flag is to operate on user services.
Back to top
View user's profile Send private message
poe_1957
Apprentice
Apprentice


Joined: 26 Sep 2018
Posts: 192
Location: Mortsel

PostPosted: Sat Sep 18, 2021 3:55 pm    Post subject: I got this as result Reply with quote

Code:
poe@POERYZEN ~ $ systemctl --user status pulseaudio.{service,socket}
○ pulseaudio.service - Sound Service
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ○ pulseaudio.socket

○ pulseaudio.socket - Sound System
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.socket; disabled; vendor preset: enabled)
     Active: inactive (dead)
   Triggers: ● pulseaudio.service
     Listen: /run/user/1000/pulse/native (Stream)

_________________
Linuxpioneer
ALUG
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum