General audio issues - pulseaudio permissions

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :)

Moderator: Moderators

krznv
Young Hen
Posts: 25
Joined: Tue Sep 22, 2020 20:42

Re: General audio issues

Post by krznv » Tue Sep 29, 2020 16:14

The user is in the audio group.

Stupot
Sagely Hen
Posts: 1815
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: General audio issues

Post by Stupot » Tue Sep 29, 2020 22:47

Damn, I'm really grasping at straws. Unfortunately, all this back and forth takes a lot of time. I don't frequent the IRC channels, but you might see if someone there can give you assistance so you can quickly do some back and forth.

krznv
Young Hen
Posts: 25
Joined: Tue Sep 22, 2020 20:42

Re: General audio issues

Post by krznv » Fri Oct 02, 2020 8:34

Running

Code: Select all

sudo start-pulseaudio-x11
returns

Code: Select all

Connection failure: Connection refused
pa_context_connect() failed: Connection refused
Running

Code: Select all

pulseaudio
returns

Code: Select all

E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied
The issue might be seen in this output

Pulse Audio Volume Control shows the following error
https://ibb.co/vPW7Rbr

Stupot
Sagely Hen
Posts: 1815
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: General audio issues (pulseaudio)

Post by Stupot » Fri Oct 02, 2020 14:39

Can you do this to get a more verbose output:

Code: Select all

pulseaudio -v

krznv
Young Hen
Posts: 25
Joined: Tue Sep 22, 2020 20:42

Re: General audio issues (pulseaudio)

Post by krznv » Fri Oct 02, 2020 14:55

Stupot wrote:
Fri Oct 02, 2020 14:39
Can you do this to get a more verbose output:

Code: Select all

pulseaudio -v

Code: Select all

I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling: No such file or directory
I: [pulseaudio] main.c: This is PulseAudio 13.0
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 8f8442ba072a45399dab8fcfe06f876c.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied

Stupot
Sagely Hen
Posts: 1815
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: General audio issues (pulseaudio)

Post by Stupot » Fri Oct 02, 2020 21:12

hmm, ok, I noticed you did

Code: Select all

sudo pulseaudio -k
But you can do that not as root?

Code: Select all

pulseaudio -k
pulseaudio shouldn't be running as root.

I'm thinking maybe pulseaudio is running.
Another way to check is

Code: Select all

$ ps aux | grep pulseaudio

krznv
Young Hen
Posts: 25
Joined: Tue Sep 22, 2020 20:42

Re: General audio issues (pulseaudio)

Post by krznv » Sat Oct 03, 2020 6:10

Stupot wrote:
Fri Oct 02, 2020 21:12
I'm thinking maybe pulseaudio is running.
Another way to check is

Code: Select all

$ ps aux | grep pulseaudio

Code: Select all

gdm        879  0.0  0.2 1390928 22232 ?       Sl   okt02   0:00 /usr/bin/pulseaudio --start --log-target=syslog
krznv    13201  0.0  0.0 211128   884 pts/0    S+   08:20   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox pulseaudio

Stupot
Sagely Hen
Posts: 1815
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: General audio issues (pulseaudio)

Post by Stupot » Mon Oct 05, 2020 14:49

What's odd, is if pulseaudio is already running, the output of 'pulseaudio -v' doesn't quite line up.

I get:

Code: Select all

[email protected] ~ $ pulseaudio -v
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 13.0
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 1e7191d5ecd3470faca3a8bc3a0662f7.
I: [pulseaudio] main.c: Session ID is 2.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/stupot/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib64/pulse-13.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
Yours gets the error right when mine says 'Using state directory /home/stupot/.config/pulse'

I *think* your ps aux actually exposed the issue.

Code: Select all

gdm        879  0.0  0.2 1390928 22232 ?       Sl   okt02   0:00 /usr/bin/pulseaudio --start --log-target=syslog
But mine looks like:

Code: Select all

[email protected] ~ $ ps aux | grep pulseaudio
stupot    1476  0.4  0.0 2194308 28720 ?       S<l  09:05   0:11 /usr/bin/pulseaudio --start --log-target=syslog
That means for me, pulse audio is running as stupot, and I have a home directory for said user, etc etc. For you, pulseaudio is running as gdm, the gnome display-manager/login screen.

At the same time, you previously deleted files from your user's home directory

Code: Select all

~/.config/pulse/
and they were recreated, which doesn't make any sense to me if pulseaudio is running as gdm.

I'm not sure if this just a different between gnome and KDE, or something misconfigured. I'm running KDE, not using gdm.

We can do the following to find out what spawned your pulseaudio to maybe get to the bottom of it.

Code: Select all

[email protected] ~ $ lsof /dev/snd/*
COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
pulseaudi 1476 stupot  mem    CHR  116,9           8068 /dev/snd/pcmC1D0p
pulseaudi 1476 stupot   20u   CHR 116,20      0t0  7085 /dev/snd/controlC2
pulseaudi 1476 stupot   22u   CHR 116,17      0t0  5467 /dev/snd/controlC0
grab the PID and use it in the following way:

Code: Select all

[email protected] ~ $ pstree -sp 1476
systemd(1)───pulseaudio(1476)─┬─gsettings-helpe(1667)─┬─{gsettings-helpe}(1670)
                              │                       ├─{gsettings-helpe}(1671)
                              │                       └─{gsettings-helpe}(1672)
                              ├─{pulseaudio}(1657)
                              ├─{pulseaudio}(1665)
                              └─{pulseaudio}(1666)
We can see my pulseaudio was originally started from systemd. Although systemctl doesn't really give any useful output itself.

Code: Select all

[email protected] ~ $ systemctl --user status pulseaudio
● pulseaudio.service - Sound Service
   Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

krznv
Young Hen
Posts: 25
Joined: Tue Sep 22, 2020 20:42

Re: General audio issues (pulseaudio)

Post by krznv » Mon Oct 05, 2020 16:03

Code: Select all

lsof /dev/snd/*
COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
mpv     24808 krznv  mem    CHR  116,2          6192 /dev/snd/pcmC0D0p
mpv     24808 krznv    9r   CHR 116,33      0t0 5122 /dev/snd/timer
mpv     24808 krznv   10u   CHR  116,2      0t0 6192 /dev/snd/pcmC0D0p
mpv     24808 krznv   11u   CHR 116,11      0t0 6219 /dev/snd/controlC0

Code: Select all

pstree -sp 24808
systemd(1)───systemd(1043)───mpv(24808)─┬─{mpv}(24810)
                                        ├─{mpv}(24811)
                                        ├─{mpv}(24812)
                                        ├─{mpv}(24813)
                                        ├─{mpv}(24815)
                                        ├─{mpv}(24816)
                                        ├─{mpv}(24818)
                                        ├─{mpv}(24819)
                                        ├─{mpv}(24820)
                                        ├─{mpv}(24821)
                                        ├─{mpv}(24822)
                                        ├─{mpv}(24823)
                                        ├─{mpv}(24824)
                                        ├─{mpv}(24825)
                                        ├─{mpv}(24826)
                                        ├─{mpv}(24827)
                                        ├─{mpv}(24828)
                                        └─{mpv}(24838)

Code: Select all

systemctl --user status pulseaudio

● pulseaudio.service - Sound Service
   Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2020-10-05 14:25:10 CEST; 3h 48min ago
  Process: 1404 ExecStart=/usr/bin/pulseaudio --daemonize=no (code=exited, status=1/FAILURE)
 Main PID: 1404 (code=exited, status=1/FAILURE)

okt 05 14:25:10 ThinkPad-T460 systemd[1043]: pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
okt 05 14:25:10 ThinkPad-T460 systemd[1043]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
okt 05 14:25:10 ThinkPad-T460 systemd[1043]: Stopped Sound Service.
okt 05 14:25:10 ThinkPad-T460 systemd[1043]: pulseaudio.service: Start request repeated too quickly.
okt 05 14:25:10 ThinkPad-T460 systemd[1043]: pulseaudio.service: Failed with result 'exit-code'.
okt 05 14:25:10 ThinkPad-T460 systemd[1043]: Failed to start Sound Service.
The

Code: Select all

~/.config/pulse/
directory only contains a cookie file

Stupot
Sagely Hen
Posts: 1815
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: General audio issues (pulseaudio)

Post by Stupot » Mon Oct 05, 2020 16:48

lsof /dev/snd/*
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mpv 24808 krznv mem CHR 116,2 6192 /dev/snd/pcmC0D0p
Also weird. Your /dev/snd/* doesn't list pulseaudio, only mpv.

It seems I'm a bit out of my depth on this one. Doing a bit of reading, it sounds like gdm owning pulseaudio is expected for gnome/gdm users. Since my system is not set up like that, I can't really use my system to compare against.

The only thing I can think to check is just to make sure your permissions are correct in your user's home directory (although I can't imagine they aren't correct).

Code: Select all

[email protected] ~ $ ls -l /home
total 20
dr-xr-xr-x  2 root   root   16384 Jun  7  2017 lost+found
drwx------ 79 stupot stupot  4096 Oct  5 10:48 stupot

Code: Select all

[email protected] ~ $ ls -la /home/stupot/.config/pulse
total 96
drwx------  2 stupot stupot  4096 Jun 16  2017 .
drwxr-xr-x 61 stupot stupot  4096 Oct  5 11:47 ..
-rw-r--r--  1 stupot stupot  9216 Jun  5 09:00 1e7191d5ecd3470faca3a8bc3a0662f7-card-database.x86_64-pc-linux-gnu.gdbm
-rw-r--r--  1 stupot stupot    85 Oct  5 09:05 1e7191d5ecd3470faca3a8bc3a0662f7-default-sink
-rw-r--r--  1 stupot stupot    82 Oct  5 09:05 1e7191d5ecd3470faca3a8bc3a0662f7-default-source
-rw-r--r--  1 stupot stupot  8192 Aug 21  2019 1e7191d5ecd3470faca3a8bc3a0662f7-device-manager.x86_64-pc-linux-gnu.gdbm
-rw-r--r--  1 stupot stupot 15360 Sep 29 13:14 1e7191d5ecd3470faca3a8bc3a0662f7-device-volumes.x86_64-pc-linux-gnu.gdbm
-rw-r--r--  1 stupot stupot 35840 Oct  5 09:06 1e7191d5ecd3470faca3a8bc3a0662f7-stream-volumes.x86_64-pc-linux-gnu.gdbm
-rw-------  1 stupot stupot   256 Jun 16  2017 cookie

Post Reply