You are not logged in.

#1 2020-03-11 14:05:27

karcher
Member
Registered: 2018-01-09
Posts: 140

No sound with pulseaudio

Hi all,

since a few weeks I was having issues with the sound, namely no sound after I was starting my system from hibernation or sleep mode. So, often I had to do a restart to get the sound back. The last few days there is not sound even when I start/restart my system. I normally fix it by deleting as root the pulseaudio config folder (/home/user/.config/pulse/) and restart pulseaudio. Some file get recreated with normal user ownership, but I think the ownership changes to root after restart again. Sometimes I cannot the set volume from the keyboard and I have to do it over pavucontrol.

Here some debug info:

$ systemctl --user status pulseaudio.service  
● pulseaudio.service - Sound Service
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2020-03-11 14:22:47 CET; 5min ago
TriggeredBy: ● pulseaudio.socket
    Process: 1519 ExecStart=/usr/bin/pulseaudio --daemonize=no (code=exited, status=1/FAILURE)
   Main PID: 1519 (code=exited, status=1/FAILURE)

Mar 11 14:22:47 kronos systemd[1385]: Failed to start Sound Service.
Mar 11 14:22:47 kronos systemd[1385]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
Mar 11 14:22:47 kronos systemd[1385]: Stopped Sound Service.
Mar 11 14:22:47 kronos systemd[1385]: pulseaudio.service: Start request repeated too quickly.
Mar 11 14:22:47 kronos systemd[1385]: pulseaudio.service: Failed with result 'exit-code'.
Mar 11 14:22:47 kronos systemd[1385]: Failed to start Sound Service.


$ pulseaudio --check  
W: [pulseaudio] core-util.c: Failed to open configuration file '/home/user/.config/pulse//daemon.conf': Permission denied
W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Permission denied


$ pacmd list-source-outputs
No PulseAudio daemon running, or not running as session daemon.

Any ideas how can I permanently fix it?

Offline

#2 2020-03-11 14:38:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,428

Re: No sound with pulseaudio

Pulseaudio should never be started as root so how does this even happen? Why are you deleting the directory as root in the first place? There should never be a reason for that. Have you started graphical applications with sudo? What happens on "restart"? What are you starting? What session do you open up? Do you have a config or so in .profile that starts pulse as root?

Offline

#3 2020-03-11 15:26:12

karcher
Member
Registered: 2018-01-09
Posts: 140

Re: No sound with pulseaudio

Pulseaudio should never be started as root so how does this even happen?

No idea...

Why are you deleting the directory as root in the first place?

as I wrote before, because ownership changes.

Have you started graphical applications with sudo?

Hmm, yes. I think started gparted or etcher with sudo. But why does it play a role?

What are you starting?

I mean system restart to get the sound back.

What session do you open up?

What do you mean by that?

Do you have a config or so in .profile that starts pulse as root?

AFAIK no, but I'll check it again.

Last edited by karcher (2020-03-11 15:26:55)

Offline

#4 2020-03-11 15:40:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,428

Re: No sound with pulseaudio

Post

systemctl status
sudo journalctl -b

when the issue occurs again. By session I mean what do you start to start using the computer, do you log in in the terminal/a display manager/what kind of graphical environment do you start up?

It's common pitfall if you start graphical utiliites with sudo, that some environment information might still point to your users home directory instead of roots and all sorts of hell break loose, you should ideally never do that or rather use specialized tools like gksu or kdesu that do proper "graphics aware" privilege elevation. You are doing "something" that starts at least pulseaudio as root while it thinks that the $HOME it has to manipulate is the one of your user.

We have to find that "something" this will be something you've configured or are running.

Offline

#5 2020-04-06 10:09:33

karcher
Member
Registered: 2018-01-09
Posts: 140

Re: No sound with pulseaudio

So, the issue persists and I can't identify a pattern when it occurs. Sometimes it happens, sometimes not. I usually reboot my system once a week and during this time I set it on either hibernation or standby. Today I I've updated all packages and did reboot and the sound does not work again. With journalctl I see:

Failed to start Sound Service.

and the ownership of the .config/pulse folder is changed again to the root.

Here is the output of:
$ systemctl status
https://zerobin.net/?496055a67b407742#h … IuPH9arm8=
and
$ sudo journalctl -b
https://zerobin.net/?a0a66dab58d49ef3#M … FFhySSrGY=


By session I mean what do you start to start using the computer, do you log in in the terminal/a display manager/what kind of graphical environment do you start up?

In my ~/.xinitrc I see that default session is i3.

Offline

#6 2020-04-06 10:27:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,428

Re: No sound with pulseaudio

On a random guess I'd say disable the docker service. Check your shell profiles /etc/profile and/or /etc/profile.d or similar.  If you don't want to rely on guesswork, set up an audit watcher checking for permission/file adjustments on the .pulse dir https://wiki.archlinux.org/index.php/Audit_framework that way you should be able to find the culprit

Offline

Board footer

Powered by FluxBB