You are not logged in.

#1 2014-10-10 19:34:07

mortecouille
Member
From: Belgium
Registered: 2009-11-02
Posts: 8

[SOLVED] Mpd permissions

Hi guys.

So last week I updated my system and for some reason, mpd stopped working. The log says :

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM dmix
Oct 10 21:13 : alsa_output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "plug:dmix": No such file or directory
Oct 10 21:13 : output: Failed to open audio output

Which AFAIK usually means wrong permissions, right? It's not impossible because it seems running mpd as root "solves" the problem (although dmix does not work!?).
My mpd user is in the audio group :

# groups mpd
audio mpd

# ls -l /dev/snd
total 0
drwxr-xr-x  2 root root       80 Oct 10  2014 by-path
crw-rw----+ 1 root audio 116,  5 Oct 10  2014 controlC0
crw-rw----+ 1 root audio 116,  2 Oct 10  2014 controlC1
crw-rw----+ 1 root audio 116,  9 Oct 10  2014 hwC0D0
crw-rw----+ 1 root audio 116,  4 Oct 10  2014 hwC1D0
crw-rw----+ 1 root audio 116,  7 Oct 10  2014 pcmC0D0c
crw-rw----+ 1 root audio 116,  6 Oct 10 21:18 pcmC0D0p
crw-rw----+ 1 root audio 116,  8 Oct 10  2014 pcmC0D1p
crw-rw----+ 1 root audio 116,  3 Oct 10  2014 pcmC1D3p
crw-rw----+ 1 root audio 116,  1 Oct 10  2014 seq
crw-rw----+ 1 root audio 116, 33 Oct 10  2014 timer

Any suggestion?
Thanks!

Last edited by mortecouille (2014-10-10 19:57:07)

Offline

#2 2014-10-10 19:41:00

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Mpd permissions

what does "run mpd as root" mean?

did you actually change the config and removed the user line? or does it simply mean "not using the systemd service file"


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#3 2014-10-10 19:54:59

mortecouille
Member
From: Belgium
Registered: 2009-11-02
Posts: 8

Re: [SOLVED] Mpd permissions

Rasi wrote:

what does "run mpd as root" mean?

did you actually change the config and removed the user line? or does it simply mean "not using the systemd service file"

The first one, but just as I checked this, I noticed that mpd.conf has a "group" option and uncommeting and setting it to "audio" seems to have done the trick. Looks like the primary group of my "mpd" user is the "mpd" group and it doesn't like that. No idea if it was the case before or why it used to work if it was. Also the dmix thing was due to me tinkering with the mpd.conf earlier and forgetting to revert some changes.

Anyway. Feeling kind of stupid now... but thanks!

Offline

Board footer

Powered by FluxBB