View previous topic :: View next topic |
Author |
Message |
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
Posted: Wed May 28, 2014 6:58 pm Post subject: Incorrect permissions on /dev/snd/* |
|
|
Hello,
I'm having this problem a few days and I can not solve at all. Every time I reboot the computer, the files in /dev/snd/* become owned by root group and not audio group as it should be.
Code: |
$ perms /dev/snd/*
755 drwxr-xr-x 2 root root 60 Mai 28 15:48 /dev/snd/by-path
660 crw-rw----+ 1 root root 116, 0 Mai 28 15:48 /dev/snd/controlC0
660 crw-rw----+ 1 root root 116, 24 Mai 28 15:48 /dev/snd/pcmC0D0c
660 crw-rw----+ 1 root root 116, 16 Mai 28 15:48 /dev/snd/pcmC0D0p
660 crw-rw----+ 1 root root 116, 17 Mai 28 15:48 /dev/snd/pcmC0D1p
660 crw-rw----+ 1 root root 116, 26 Mai 28 15:48 /dev/snd/pcmC0D2c
660 crw-rw----+ 1 root root 116, 19 Mai 28 15:48 /dev/snd/pcmC0D3p
660 crw-rw----+ 1 root root 116, 1 Mai 28 15:48 /dev/snd/seq
660 crw-rw----+ 1 root root 116, 33 Mai 28 15:48 /dev/snd/timer
|
Everything seems right with udev rules, eg:
Code: |
$ udevadm info /dev/snd/seq
P: /devices/virtual/sound/seq
N: snd/seq
E: DEVNAME=/dev/snd/seq
E: DEVPATH=/devices/virtual/sound/seq
E: MAJOR=116
E: MINOR=1
E: SUBSYSTEM=sound
E: TAGS=:uaccess:
E: USEC_INITIALIZED=60
|
|
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Wed May 28, 2014 8:58 pm Post subject: |
|
|
Allo.........
I would check first if there is an audio group by executing
and check if the users I want to allow to be in the audio group are really in. If the audio group do not exist, I would create it and restart Udev. If the devices files in /etc/snd stay with the root group, I would restart Gentoo. If the audio group do not appear, I would check if it manage devices files somewhere else, of course in the /dev directory.
Can you ear music as root user? Otherwise check your kernel configuration. You can create Udev rules to force the audio group for audio devices files. That will not tell why Udev do not set it by itself.
If the audio group exist, be sure that all the users you want are in. _________________ Paul |
|
Back to top |
|
|
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
Posted: Wed May 28, 2014 10:02 pm Post subject: |
|
|
Logicien wrote: | Allo.........
I would check first if there is an audio group by executing
and check if the users I want to allow to be in the audio group are really in. If the audio group do not exist, I would create it and restart Udev. If the devices files in /etc/snd stay with the root group, I would restart Gentoo. If the audio group do not appear, I would check if it manage devices files somewhere else, of course in the /dev directory.
Can you ear music as root user? Otherwise check your kernel configuration. You can create Udev rules to force the audio group for audio devices files. That will not tell why Udev do not set it by itself.
If the audio group exist, be sure that all the users you want are in. |
audio group exist and are ok:
Code: |
$ cat /etc/group | grep audio
audio:x:18:lara
|
My sound card is not detected with these permissions (root:root), only if I do a chown (root:audio) and restart pulseaudio. |
|
Back to top |
|
|
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
|
Back to top |
|
|
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Thu May 29, 2014 5:12 pm Post subject: |
|
|
I had a problem with Pavucontrol recently. It could not communicate with the Pulseaudio server and was not working. It was working before even if my users where all in the audio group. I just come from to remove all my users from the audio group and Pavucontrol restart to be able to communicate with the Pulseaudio server and work again.
So the Gentoo wiki is explicite. Do not put any user in the audio group, even the pulse user. My users are not in the pulse and pulse-access groups too. My /dev/snd devices files are all in the audio group in my Gentoo installation.
I have no explanation for your audio goup problem. As a workround, for the moment, until you find the cause, you can chown the device files in the /dev/snd directory at boot time with an executable script named for example, local.start in the /etc/local.d directory with a line like this
Code: | chown -R root:audio /dev/snd/* |
More precise can be this line
Code: | chown root:audio /dev/snd/{controlC0,pcmC0D0c,pcmC0D0p,pcmC0D1p,pcmC0D2c,pcmC0D3p,seq,timer} |
Code: | chmod 0755 /etc/local.d/local.start |
You need root permissions. _________________ Paul |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Fri May 30, 2014 7:41 am Post subject: |
|
|
Quote: | 660 crw-rw----+ 1 root root 116, 24 Mai 28 15:48 /dev/snd/pcmC0D0c |
"I think I have a problem, but (most likely) it exists only in my head"
That '+' at the end refers to ACLs, which combined with 'TAGS=:uaccess:' means that most likely everything is already working fine. |
|
Back to top |
|
|
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
Posted: Fri May 30, 2014 2:53 pm Post subject: |
|
|
VoidMage wrote: | Quote: | 660 crw-rw----+ 1 root root 116, 24 Mai 28 15:48 /dev/snd/pcmC0D0c |
"I think I have a problem, but (most likely) it exists only in my head"
That '+' at the end refers to ACLs, which combined with 'TAGS=:uaccess:' means that most likely everything is already working fine. |
Pulseaudio not detects the sound card with root:root, only a "dummy output"... if i do a chown root:audio and restart pulseaudio, the sound card is detected.
The problem really exists. |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Fri May 30, 2014 3:47 pm Post subject: |
|
|
So, let's go to basic questions.
First, elaborate on that '+', that is 'getfacl' on those nodes.
Then confirm you're running under systemd (as that tag strongly suggests).
Then pastebin log from pulseaudio and sound related parts of systemd log. |
|
Back to top |
|
|
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sat May 31, 2014 4:14 am Post subject: |
|
|
Are you under Systemd, yes or no? Because, when you use Pulseaudio, you have to remove your users from the audio group, including the pulse user (taken from PulseAudio - Gentoo Wiki). logind from Systemd manage the permissions of the users and could allow them to access the audio devices even if the devices files in /dev/snd are not in the audio group (not verified).
If you are not under Systemd, you are under Openrc. That's mean that it is Consolekit who manage users audio permissions after put them out of the audio group. If you do not have a user Consolekit session open, Pulseaudio will not allow you to use the audio devices (verified).
Some display managers can start a Consolekit session for a user when he open a desktop session (not verified). Me, I use $HOME/.xinitrc to open a Consolekit session when I start X with the startx command, here for Xfce4.
Code: | exec ck-launch-session dbus-launch --exit-with-session --sh-syntax startxfce4 |
Than I am sure to open a Consolekit session. The command
list open Consolekit sessions. I am on Openrc.
That's a tricky part of the Pulseaudio theory who is not, en passant, mandatory. You can continue to resolv your audio group problem, keeping your users in and use Alsa without Pulseaudio.
More to understand in Use headsets with Bluez 5 mini HowTo. _________________ Paul
Last edited by Logicien on Sat May 31, 2014 12:06 pm; edited 1 time in total |
|
Back to top |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Sat May 31, 2014 6:47 am Post subject: |
|
|
There's something odd about those two pastebins.
In the one with permissions, ACLs aren't set, despite that it seemed they were in the previous posts.
In pulseaudio log, there seem to be either missing modules or some of them were silently skipped...
Which useflags was pulseaudio built with ?
Perhaps that bit about audio group and systemd plays a role too. |
|
Back to top |
|
|
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
Posted: Thu Jun 19, 2014 6:33 pm Post subject: |
|
|
VoidMage wrote: | There's something odd about those two pastebins.
In the one with permissions, ACLs aren't set, despite that it seemed they were in the previous posts.
In pulseaudio log, there seem to be either missing modules or some of them were silently skipped...
Which useflags was pulseaudio built with ?
Perhaps that bit about audio group and systemd plays a role too. |
+X +alsa +asyncns +caps +dbus +gdbm +glib +gtk +orc +realtime +systemd +udev |
|
Back to top |
|
|
LaraCraft304 n00b
Joined: 13 May 2014 Posts: 15
|
Posted: Fri Jul 11, 2014 10:35 pm Post subject: |
|
|
Damn! Nobody knows what is happening?
[/code]
I'm currently using this unit to bypass the problem (and works well):
Code: |
[Unit]
Description=Hell! Fix this shit!
[Service]
Type=oneshot
ExecStart=/usr/bin/udevadm test /devices/virtual/sound/seq
ExecStart=/usr/bin/udevadm test /devices/virtual/sound/timer
ExecStart=/usr/bin/udevadm test /devices/pci0000:00/0000:00:07.0/sound/card0/controlC0
ExecStart=/usr/bin/udevadm test /devices/pci0000:00/0000:00:07.0/sound/card0/pcmC0D0c
ExecStart=/usr/bin/udevadm test /devices/pci0000:00/0000:00:07.0/sound/card0/pcmC0D0p
ExecStart=/usr/bin/udevadm test /devices/pci0000:00/0000:00:07.0/sound/card0/pcmC0D1p
ExecStart=/usr/bin/udevadm test /devices/pci0000:00/0000:00:07.0/sound/card0/pcmC0D2c
ExecStart=/usr/bin/udevadm test /devices/pci0000:00/0000:00:07.0/sound/card0/pcmC0D3p
[Install]
WantedBy=multi-user.target
|
|
|
Back to top |
|
|
gary987 n00b
Joined: 07 Oct 2006 Posts: 15
|
Posted: Sun May 31, 2015 11:26 pm Post subject: |
|
|
emerge -Dav consolekit
pulled in new udev scripts
I had the same symptoms you described with the group being root rather than audio. Running the above command solved it for me. I'm am also running OpenRc. Running pulseaudio or not seems to be irrelevant.
Cheers,
Gary |
|
Back to top |
|
|
|