Summary: | media-sound/mpd-0.16.2 - wrong permissions for /dev/snd/* -> no sound | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | avx <idevelop> |
Component: | New packages | Assignee: | Christoph Mende (RETIRED) <angelos> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | hwoarang, sound |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | https://forums.gentoo.org/viewtopic-p-6664759.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | cleaned mpd.conf as requested |
Description
avx
2011-04-25 21:19:18 UTC
Please attach your (sanitised) mpd.conf too. I don't see how this is mpd's problem. Your permissions are not set up properly, that's not something a media player should fix. The files are 660 root:audio on my system, which means that mpd needs to be run as a user in the audio group. Created attachment 271223 [details]
cleaned mpd.conf as requested
the output of `groups avx` and `ls -l /dev/snd` (before chmod 666) please (In reply to comment #2) > I don't see how this is mpd's problem. > Your permissions are not set up properly, that's not something a media player > should fix. The files are 660 root:audio on my system, which means that mpd > needs to be run as a user in the audio group. That's why I said, 'I seem to be the only one with this problem' - well, actually not. Thing is, I didn't change the permissions beforehand, thus they are like the system/udev has set them up and it needed my personal interferance to make it work. After a reboot, all permissions are again 660, but it doesn't work. Strangely, it also works if I set group to "audio". Strange because it always worked with group "users" for me, but now it doesn't. I can live with that, changing the group, but it's imho not obvious and a change which has been introduced somewhere. > the output of `groups avx` and `ls -l /dev/snd` (before chmod 666) please groups avx: wheel audio cdrom video cdrw usb portage messagebus plugdev games cyberjack users ls -l /dev/snd: total 0 drwxr-xr-x 2 root root 60 26. Apr 2011 by-path crw-rw---- 1 root audio 116, 7 26. Apr 2011 controlC0 crw-rw---- 1 root audio 116, 6 26. Apr 2011 hwC0D0 crw-rw---- 1 root audio 116, 5 26. Apr 2011 pcmC0D0c crw-rw---- 1 root audio 116, 4 26. Apr 15:56 pcmC0D0p crw-rw---- 1 root audio 116, 3 26. Apr 2011 pcmC0D1p crw-rw---- 1 root audio 116, 2 26. Apr 2011 pcmC0D2c crw-rw---- 1 root audio 116, 1 26. Apr 2011 seq crw-rw---- 1 root audio 116, 33 26. Apr 2011 timer I can't tell you why it worked before, but I can tell you that you definitely need to be in the audio group for a working ALSA. Otherwise there's no way mpd can access the devices. The default configuration for mpd makes it run under a new user "mpd" which is in the audio group already. You changed your configuration to a user who doesn't have access, we cannot prevent or "fix" this. I also will not add a hint in the ebuild, because this is already covered by the ALSA guide (http://www.gentoo.org/doc/en/alsa-guide.xml#doc_chap3, "Audio Group") and we can't add something like that to every ebuild that uses ALSA. There's one thing you can try: you could ask upstream if it is possible to implement a better error message to make this clear. > but I can tell you that you definitely need to be in the audio group
> for a working ALSA.
Ă„hem? My user IS IN AUDIO, so group user should also suffice, as it has for years.
Ah, sorry, missed that. The problem seems to be that setgid() changes access to only that group then, which means your mpd runs as if you were only in the users group. The implementation didn't change much between 0.15.15 and 0.16.2, so I don't see why it should have worked before. Either way, you have two choices then: a) remove the user/group lines from your mpd.conf and run it as user, so mpd gets access to all of your groups, or b) change group "users" to group "audio". This behaviour actually looks intended. The important part from the mpd.conf seems to be this:
> If not specified primary group of user specified
> with "user" setting will be used
I know using "group users" works/worked for a long time, since I've actually got another machine running with this set.
So, since for me it seems, mpd is the only application making problems here, maybe a einfo like the following would be ok?:
"If you don't intend to run mpd as user mpd, make sure group is set to audio in mpd.conf"
Anyways, I can live with the modification, so for me it's done and ok, just have to remember it for the future :)
Hi, I have similiar problem, but I'm using : user "mpd" group "users" And I had added mpd to audio group, so groups mpd goes : server snd # groups mpd audio What I've understood from forums and this bugreport, this config have to be working... In addition my /dev/snd : ls -l /dev/snd total 0 drwxr-xr-x 2 root root 60 May 19 15:11 by-path crw-rw---- 1 root audio 116, 0 May 19 15:11 controlC0 crw-rw---- 1 root audio 116, 24 May 19 15:11 pcmC0D0c crw-rw---- 1 root audio 116, 16 May 19 15:11 pcmC0D0p crw-rw---- 1 root audio 116, 25 May 19 15:11 pcmC0D1c crw-rw---- 1 root audio 116, 1 May 19 15:11 seq crw-rw---- 1 root audio 116, 33 May 19 15:11 timer (In reply to comment #10) > Hi, I have similiar problem, but I'm using : > user "mpd" > group "users" > And I had added mpd to audio group, so groups mpd goes : > server snd # groups mpd > audio > What I've understood from forums and this bugreport, this config have to be > working... No, it does not. Forcing mpd to run in the group "users" means it will _only_ run in the group users, no matter what other groups the mpd user is in. |