Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

Incorrect permissions on /dev/snd/*

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

Incorrect permissions on /dev/snd/*

  • Quote

Post by LaraCraft304 » Wed May 28, 2014 6:58 pm

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: Select all

$ 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: Select all

$ 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
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Wed May 28, 2014 8:58 pm

Allo.........

I would check first if there is an audio group by executing

Code: Select all

vigr
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
Top
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

  • Quote

Post by LaraCraft304 » Wed May 28, 2014 10:02 pm

Logicien wrote:Allo.........

I would check first if there is an audio group by executing

Code: Select all

vigr
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: Select all

$ 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.
Top
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

  • Quote

Post by LaraCraft304 » Thu May 29, 2014 12:57 am

I enable debug in /etc/udev/udev.conf and doing this made everything work ... this is very strange.

The journalctl log: https://gist.github.com/LaraCraft304/b7 ... 3856b504bf
Top
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

  • Quote

Post by LaraCraft304 » Thu May 29, 2014 2:21 pm

Today I restarted again, and again the problem appeared ....

Log: https://gist.github.com/LaraCraft304/cf ... e1c2b78dda

What the hell!
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Thu May 29, 2014 4:47 pm

Did you read PulseAudio - Gentoo Wiki?
Paul
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Thu May 29, 2014 5:12 pm

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: Select all

chown -R root:audio /dev/snd/*
More precise can be this line

Code: Select all

chown root:audio /dev/snd/{controlC0,pcmC0D0c,pcmC0D0p,pcmC0D1p,pcmC0D2c,pcmC0D3p,seq,timer}

Code: Select all

chmod 0755 /etc/local.d/local.start
You need root permissions.
Paul
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Fri May 30, 2014 7:41 am

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.
Top
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

  • Quote

Post by LaraCraft304 » Fri May 30, 2014 2:53 pm

VoidMage wrote:
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.
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Fri May 30, 2014 3:47 pm

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.
Top
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

  • Quote

Post by LaraCraft304 » Fri May 30, 2014 6:29 pm

VoidMage wrote: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.
getfacl: https://gist.github.com/LaraCraft304/09 ... 914eb43b9a

Pulseaudio Log: https://gist.github.com/LaraCraft304/f7 ... 495dde42c7
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Sat May 31, 2014 4:14 am

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: Select all

exec ck-launch-session dbus-launch --exit-with-session --sh-syntax startxfce4
Than I am sure to open a Consolekit session. The command

Code: Select all

ck-list-sessions
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.
Last edited by Logicien on Sat May 31, 2014 12:06 pm, edited 1 time in total.
Paul
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Sat May 31, 2014 6:47 am

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.
Top
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

  • Quote

Post by LaraCraft304 » Thu Jun 19, 2014 6:33 pm

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
Top
LaraCraft304
n00b
n00b
User avatar
Posts: 15
Joined: Tue May 13, 2014 11:03 pm
Contact:
Contact LaraCraft304
Website

  • Quote

Post by LaraCraft304 » Fri Jul 11, 2014 10:35 pm

Damn! Nobody knows what is happening?
[/code]
I'm currently using this unit to bypass the problem (and works well):

Code: Select all

[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
Top
gary987
n00b
n00b
Posts: 15
Joined: Sat Oct 07, 2006 1:09 am

  • Quote

Post by gary987 » Sun May 31, 2015 11:26 pm

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
Top
Post Reply

16 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic