View previous topic :: View next topic |
Author |
Message |
karr Tux's lil' helper
Joined: 03 Feb 2004 Posts: 120 Location: albuquerque
|
Posted: Sat Feb 26, 2005 11:42 pm Post subject: udev, /dev/sound permissions problem |
|
|
With recent versions of udev(052, and 054) I have had a problem with sound not working when I first boot my computer, but if I run /etc/init.d/alsasound restart, sound starts working. I have alsa set to start at the boot runlevel. Today, I noticed something interesting about the permissions in /dev/sound when restarting alsa. Here is the output of "ls -l /dev/sound/*"
Code: |
crw------- 1 karr audio 14, 12 Feb 26 17:32 /dev/sound/adsp
crw------- 1 karr audio 14, 28 Feb 26 17:32 /dev/sound/adsp1
crw------- 1 karr audio 14, 4 Feb 26 17:32 /dev/sound/audio
crw------- 1 karr audio 14, 20 Feb 26 17:32 /dev/sound/audio1
crw------- 1 karr audio 14, 3 Feb 26 17:32 /dev/sound/dsp
crw------- 1 karr audio 14, 19 Feb 26 17:32 /dev/sound/dsp1
crw------- 1 karr audio 14, 0 Feb 26 17:32 /dev/sound/mixer
crw------- 1 karr audio 14, 16 Feb 26 17:32 /dev/sound/mixer1
crw------- 1 karr audio 14, 1 Feb 26 17:32 /dev/sound/sequencer
crw------- 1 karr audio 14, 8 Feb 26 17:32 /dev/sound/sequencer2
|
And here is the output after /etc/init.d/alsasound restart:
Code: |
crw-rw---- 1 root audio 14, 12 Feb 26 17:40 /dev/sound/adsp
crw-rw---- 1 root audio 14, 4 Feb 26 17:40 /dev/sound/audio
crw-rw---- 1 root audio 14, 3 Feb 26 17:40 /dev/sound/dsp
crw-rw---- 1 root audio 14, 0 Feb 26 17:40 /dev/sound/mixer
crw-rw---- 1 root audio 14, 1 Feb 26 17:40 /dev/sound/sequencer
crw-rw---- 1 root audio 14, 8 Feb 26 17:40 /dev/sound/sequencer2
|
Does anyone have an idea what udev config I need to change?
Here is what I currently have in my /etc/udev/permissions.d/50-udev.permissions file for audio devices:
Code: |
# audio devices
dsp*:root:audio:0660
audio*:root:audio:0660
midi*:root:audio:0660
mixer*:root:audio:0660
sequencer*:root:audio:0660
sound/*:root:audio:0660
snd/*:root:audio:0660
beep:root:audio:0660
admm*:root:audio:0660
adsp*:root:audio:0660
aload*:root:audio:0660
amidi*:root:audio:0660
dmfm*:root:audio:0660
dmmidi*:root:audio:0660
sndstat:root:audio:0660
|
|
|
Back to top |
|
|
doode n00b
Joined: 09 May 2003 Posts: 13
|
Posted: Sun Feb 27, 2005 7:36 pm Post subject: |
|
|
I'm having the same problem.. Can't seem to figure it out.. Anyone else? |
|
Back to top |
|
|
lbrtuk l33t
Joined: 08 May 2003 Posts: 910
|
Posted: Sun Feb 27, 2005 8:09 pm Post subject: |
|
|
.permissions files are being phased out. You need to specify them along with the rules. |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Mon Feb 28, 2005 7:24 am Post subject: |
|
|
every time you login, pam is setting permissions on your device nodes (setting you as the owner, specifying its own permissions, etc). this overrides whatever udev has just set. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
karr Tux's lil' helper
Joined: 03 Feb 2004 Posts: 120 Location: albuquerque
|
Posted: Tue Mar 01, 2005 6:18 am Post subject: |
|
|
I've made some progress on getting this to work. I removes /etc/security/console.perms, which leaves the permissions closer to correct.
Code: |
crw-rw---- 1 root audio 14, 12 Feb 26 17:32 /dev/sound/adsp
crw-rw---- 1 root audio 14, 28 Feb 26 17:32 /dev/sound/adsp1
crw-rw---- 1 root audio 14, 4 Feb 26 17:32 /dev/sound/audio
crw-rw---- 1 root audio 14, 20 Feb 26 17:32 /dev/sound/audio1
crw-rw---- 1 root audio 14, 3 Feb 26 17:32 /dev/sound/dsp
crw-rw---- 1 root audio 14, 19 Feb 26 17:32 /dev/sound/dsp1
crw-rw---- 1 root audio 14, 0 Feb 26 17:32 /dev/sound/mixer
crw-rw---- 1 root audio 14, 16 Feb 26 17:32 /dev/sound/mixer1
crw-rw---- 1 root audio 14, 1 Feb 26 17:32 /dev/sound/sequencer
crw-rw---- 1 root audio 14, 8 Feb 26 17:32 /dev/sound/sequencer2
|
But I still do not have sound. If I do /etc/init.d/alsasound resart I get the same results as before
Code: |
crw-rw---- 1 root audio 14, 12 Feb 26 17:40 /dev/sound/adsp
crw-rw---- 1 root audio 14, 4 Feb 26 17:40 /dev/sound/audio
crw-rw---- 1 root audio 14, 3 Feb 26 17:40 /dev/sound/dsp
crw-rw---- 1 root audio 14, 0 Feb 26 17:40 /dev/sound/mixer
crw-rw---- 1 root audio 14, 1 Feb 26 17:40 /dev/sound/sequencer
crw-rw---- 1 root audio 14, 8 Feb 26 17:40 /dev/sound/sequencer2
|
And sound works. One other thing I have noticed is that alsamixer shows a lot of channel being turned off, or missing in the first state, after boot. I returns to normal after resarting alsa. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Wed Mar 02, 2005 2:08 am Post subject: |
|
|
I've got this problem too but in /dev/snd, not /dev/sound. It only seems to happen to some of my device nodes though.
Code: | crw------- 1 root audio 116, 0 Mar 2 01:39 controlC0
crw------- 1 root audio 116, 32 Mar 2 01:39 controlC1
crw-rw---- 1 root audio 116, 40 Mar 2 01:39 midiC1D0
crw-rw---- 1 root audio 116, 41 Mar 2 01:39 midiC1D1
crw-rw---- 1 root audio 116, 42 Mar 2 01:39 midiC1D2
crw-rw---- 1 root audio 116, 43 Mar 2 01:39 midiC1D3
crw------- 1 root audio 116, 24 Mar 2 01:39 pcmC0D0c
crw------- 1 root audio 116, 16 Mar 2 01:39 pcmC0D0p
crw-rw---- 1 root audio 116, 1 Mar 2 01:39 seq
crw------- 1 root audio 116, 33 Mar 2 01:39 timer |
I didn't happen until I upgraded to udev-52. I've got udev-54 now but it's still occurring. The permissions are set correctly in 50-udev.permissions. I'm interested to hear that these files are being phased out. I did wonder what the point in them was since the permissions can be set in the rule files. Could that be the problem then? Because 50-udev.rules doesn't set any permissions for these nodes.
Code: | # alsa devices
SUBSYSTEM="sound", GROUP="audio"
KERNEL="controlC[0-9]*", NAME="snd/%k"
KERNEL="hw[CD0-9]*", NAME="snd/%k"
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
KERNEL="midiC[D0-9]*", NAME="snd/%k"
KERNEL="timer", NAME="snd/%k"
KERNEL="seq", NAME="snd/%k" |
I'll try this and let you know what happens next time I restart. I've been restarting all night and I can't be bothered to do it again right now. |
|
Back to top |
|
|
nonotme Guru
Joined: 29 Sep 2003 Posts: 356 Location: on.ca
|
Posted: Tue Mar 08, 2005 6:37 am Post subject: |
|
|
just a fyi, but running udevstart is sufficient to enable the new rules. _________________ Please append [Solved] to your thread if appropriate, it helps everyone. |
|
Back to top |
|
|
Epikuros n00b
Joined: 19 Aug 2003 Posts: 56 Location: Helsinki, Finland
|
Posted: Sat Mar 12, 2005 8:24 pm Post subject: |
|
|
I have the same "problem" (just a slight annoyance imho). My devices are slightly different before and after the restart. Send more info soon. _________________ ---
Epikuros |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Sat Mar 12, 2005 11:12 pm Post subject: |
|
|
Should have replied to this ages ago. My attempt at fixing it didn't work. Grr. |
|
Back to top |
|
|
Morimando Guru
Joined: 14 Feb 2005 Posts: 339 Location: Germany
|
Posted: Sat Mar 12, 2005 11:52 pm Post subject: |
|
|
Maybe it's a problem with PAM? Did it give you some weird output lately?
I had some problems with PAM being weird when i changed my system to pure udev/Reiser4, so it's merely a guess, i'm running pam version 0.77-r8 and it works fine. _________________ That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Sun Mar 13, 2005 12:06 am Post subject: |
|
|
That's what I've got but there's a newer version. Gonna try that out. |
|
Back to top |
|
|
karr Tux's lil' helper
Joined: 03 Feb 2004 Posts: 120 Location: albuquerque
|
Posted: Wed Apr 06, 2005 7:22 pm Post subject: |
|
|
I finally found the problem: coldplug. I removed it from the boot runlevel, and sound now works. Hope this helps you guys. |
|
Back to top |
|
|
juniper l33t
Joined: 22 Oct 2004 Posts: 959 Location: we the north
|
Posted: Mon Apr 11, 2005 1:30 am Post subject: |
|
|
karr wrote: | I've made some progress on getting this to work. I removes /etc/security/console.perms, which leaves the permissions closer to correct.
Code: |
crw-rw---- 1 root audio 14, 12 Feb 26 17:32 /dev/sound/adsp
crw-rw---- 1 root audio 14, 28 Feb 26 17:32 /dev/sound/adsp1
crw-rw---- 1 root audio 14, 4 Feb 26 17:32 /dev/sound/audio
crw-rw---- 1 root audio 14, 20 Feb 26 17:32 /dev/sound/audio1
crw-rw---- 1 root audio 14, 3 Feb 26 17:32 /dev/sound/dsp
crw-rw---- 1 root audio 14, 19 Feb 26 17:32 /dev/sound/dsp1
crw-rw---- 1 root audio 14, 0 Feb 26 17:32 /dev/sound/mixer
crw-rw---- 1 root audio 14, 16 Feb 26 17:32 /dev/sound/mixer1
crw-rw---- 1 root audio 14, 1 Feb 26 17:32 /dev/sound/sequencer
crw-rw---- 1 root audio 14, 8 Feb 26 17:32 /dev/sound/sequencer2
|
But I still do not have sound. If I do /etc/init.d/alsasound resart I get the same results as before
Code: |
crw-rw---- 1 root audio 14, 12 Feb 26 17:40 /dev/sound/adsp
crw-rw---- 1 root audio 14, 4 Feb 26 17:40 /dev/sound/audio
crw-rw---- 1 root audio 14, 3 Feb 26 17:40 /dev/sound/dsp
crw-rw---- 1 root audio 14, 0 Feb 26 17:40 /dev/sound/mixer
crw-rw---- 1 root audio 14, 1 Feb 26 17:40 /dev/sound/sequencer
crw-rw---- 1 root audio 14, 8 Feb 26 17:40 /dev/sound/sequencer2
|
And sound works. One other thing I have noticed is that alsamixer shows a lot of channel being turned off, or missing in the first state, after boot. I returns to normal after resarting alsa. |
i was having the same problem with my optical device /dev/hdc and i commented out everything in /etc/security/console.perms and it all works now.
so, my question is, what is the point of /etc/security/console.perms (if i am just going to comment out everything anyways)?
j |
|
Back to top |
|
|
zoltix Apprentice
Joined: 22 Mar 2004 Posts: 249 Location: Brusssels
|
Posted: Wed Apr 13, 2005 4:03 pm Post subject: |
|
|
I have the sampe problem ...... |
|
Back to top |
|
|
alligator421 Apprentice
Joined: 30 Jul 2003 Posts: 191
|
Posted: Sat Apr 30, 2005 5:18 pm Post subject: +1 |
|
|
I had the same problem with udev and alsa.
Commenting all stuff in /etc/security/console.perms fixed the problem.
What I understand of the problem is that udev is setting all devices in /dev as root but when setting /etc/security/console.perms,
the console owner is trying make a link/node as a simple user in /dev but it can't because of the permissions. So the link below can't be made.
lrwxrwxrwx 1 root root 9 Apr 30 18:35 /dev/dsp -> sound/dsp |
|
Back to top |
|
|
thepustule Apprentice
Joined: 22 Feb 2004 Posts: 212 Location: Toronto, Canada
|
Posted: Sun May 01, 2005 1:00 am Post subject: |
|
|
Honestly!
Devfs is deprecated in the kernel. The newest Gentoo install handbook now instructs us to use udev. And this is how well it works?
And .permissions is "being phased out"? What's up with that? So the /dev filesystem we're supposed to be using still has major design decisions still in the process of being worked out? What's wrong with this picture?
Can anyone explain to me how this is supposed to be BETTER than devfs? At least devfs WORKED! |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Sun May 01, 2005 1:08 am Post subject: |
|
|
I haven't been getting this problem in a long time and to be honest, I'd rather go through a few glitches in order to get udev than having to stick with devfs forever. It might have worked but it was a total mess. Let's not turn this into yet another udev vs devfs debate though. |
|
Back to top |
|
|
thepustule Apprentice
Joined: 22 Feb 2004 Posts: 212 Location: Toronto, Canada
|
Posted: Sun May 01, 2005 1:24 am Post subject: |
|
|
Fair enough...
My question wasn't so much about which is better udev or devfs, but more about the wisdom of switching gentoo when when udev seems to still be grossly unready.
Anyhow...
I noticed in /etc/security/console.perms that the line for sound is explicitly configured as 600 root.audio
What is the logic behind this? I mean, the very fact that we have a group called "audio" - wouldn't it make sense to make it 660? Or is this something I don't quite understand about what this file is doing? |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Sun May 01, 2005 1:41 am Post subject: |
|
|
I don't really understand that either. A lot of the other things seem to say 660. |
|
Back to top |
|
|
alligator421 Apprentice
Joined: 30 Jul 2003 Posts: 191
|
Posted: Sun May 01, 2005 4:51 pm Post subject: |
|
|
mmmh. My problem was not completely resolved after all.
Beside alsa, I had still problems with my usb printer as well.
udev was creating a node /dev/usb as a file, instead of a directory thus preventing /dev/usb/lp0 from popping up.
I browsed a while to find that current udev-045 is at fault and simply sucks.
Quote: |
echo "sys-fs/udev ~x86" >> /etc/portage/package.keywords
|
It installed udev-056. No more problems with devices now.
alsa-oss /dev/dsp emulation and /dev/usb/lp0 are resolved for me. |
|
Back to top |
|
|
tecknojunky Veteran
Joined: 19 Oct 2002 Posts: 1937 Location: Montréal
|
Posted: Tue May 03, 2005 8:23 am Post subject: |
|
|
How do you get rid of this stupid audio group and simply let every user the ability to use the sound device? _________________ (7 of 9) Installing star-trek/species-8.4.7.2::talax. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Tue May 03, 2005 8:37 am Post subject: |
|
|
I wouldn't recommend removing the audio device but you could adjust the permissions to allow "others" to use the device. 666 instead of 660 for example. |
|
Back to top |
|
|
tecknojunky Veteran
Joined: 19 Oct 2002 Posts: 1937 Location: Montréal
|
Posted: Tue May 03, 2005 10:06 am Post subject: |
|
|
What's strange is that my Esound daemon dies on start up. init.d will issue [OK] but when grepping th ps -ef output, esd is dead gone. After zapping and restarting it, apps can now use sound, but before I applied your permisson hack, it'd still not work.
WHat's wrong with my sound? _________________ (7 of 9) Installing star-trek/species-8.4.7.2::talax. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Tue May 03, 2005 11:28 am Post subject: |
|
|
Esound is known for being very wobbly. I don't really use it. Try seeing if you can get any log output from it. |
|
Back to top |
|
|
dirt n00b
Joined: 01 Apr 2005 Posts: 4
|
Posted: Sat May 07, 2005 10:12 pm Post subject: |
|
|
Listen to dsd... and take a look at /etc/security/console.perms file.
Thanks, |
|
Back to top |
|
|
|