Find the answer to your Linux question:
Results 1 to 7 of 7
hi. I recently installed alsa but it's not working. this is the output i get from xmms when i open it and try to play an mp3 through alsa: Code: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Location
    Montreal, CA
    Posts
    198

    alsa_get_mixer(): Attaching to mixer hw:0 failed: Permission denied


    hi.
    I recently installed alsa but it's not working. this is the output i get from xmms when i open it and try to play an mp3 through alsa:
    Code:
    ** WARNING **: alsa_get_mixer(): Attaching to mixer hw:0 failed: Permission denied
    ALSA lib confmisc.c:560:(snd_determine_driver) could not open control for card 0
    ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_card_driver returned error: Permission denied
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_concat returned error: Permission denied
    ALSA lib confmisc.c:955:(snd_func_refer) error evaluating name
    ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_refer returned error: Permission denied
    ALSA lib conf.c:3948:(snd_config_expand) Evaluate error: Permission denied
    ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM default
    
    ** WARNING **: alsa_setup(): Failed to open pcm device (default): Permission denied
    obviously it's a problem with the permissions but i don't know what i need to chmod. I am working under the package user ideology in which each package is compiled and installed as it's own user. it provides added security at the cost of a few permission problems, which usually are taken care of easily.

    If someone could tell me what file(s) i need to change permissions of, it would be greatly appreciated.
    thanks
    Avatar from xkcd.com, a hilarious computer related webcomic.

  2. #2
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    Check the relevant device files in /dev and /dev/snd . Most linux distributions have a group for accessing audio devices. Joining that group might be the easy solution.
    I\'m so tired .....
    #200472

  3. #3
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Location
    Montreal, CA
    Posts
    198
    fixed it.
    I had to add GROUP="audio" to all alsa devices in /etc/udev/rules.d/50-udev.rules
    and also use the correct mixer in xmms :S
    Avatar from xkcd.com, a hilarious computer related webcomic.

  4. #4
    Just Joined!
    Join Date
    Apr 2006
    Posts
    1
    i seem to have somewhat same problem. the only thing is my root & user1 can play sound. user2 somehow doesnt. user2 was created by me via useradd. user1 was created during installation.

    i did the changes jpalfree suggested, but it still doesnt work for user2.
    xmms <mp3 file> would result in
    ** WARNING **: alsa_get_mixer(): Attaching to mixer hw:0 failed: No such device
    ALSA lib confmisc.c:672snd_func_card_driver) cannot find card '0'
    ..
    ..
    ..
    ** WARNING **: alsa_setup(): Failed to open pcm device (default): No such device

    can anybody help?

  5. #5
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Location
    Montreal, CA
    Posts
    198
    Did you add your user to the "audio" group? That might be a simple solution.

    If that's not it. It could be the xmms settings aren't set correctly. Log in as user1 and checkout the audio settings for xmms. Then compare them with user2's settings. That was partly my problem. I had to change hw:0 to hw:1 among other things.
    Avatar from xkcd.com, a hilarious computer related webcomic.

  6. #6
    Just Joined!
    Join Date
    Apr 2006
    Posts
    1
    thanks for the tips - this problem has also been baffling me for a while.
    when I vnc to the machine I can run xmms as root but if I run it as my regular user it gives me the 'alsa_get_mixer(): Attaching to mixer hw:0 failed:' shtick.

    Wierd thing is that if I go and log in at the actual physical machine (in Gnome) - then go back to xmms on my vnc session - suddenly no error - xmms plays fine under my regular user account !

    What I really want to know is what does fedora do in that log in that makes xmms suddenly work running under my regular user user account ?

    does it create some sort of temporary permissions or what ?

  7. #7
    Just Joined!
    Join Date
    Jun 2005
    Location
    Gratz, Pennsylvania, US
    Posts
    1

    Post

    Quote Originally Posted by aldoogy View Post
    thanks for the tips - this problem has also been baffling me for a while.
    when I vnc to the machine I can run xmms as root but if I run it as my regular user it gives me the 'alsa_get_mixer(): Attaching to mixer hw:0 failed:' shtick.

    Wierd thing is that if I go and log in at the actual physical machine (in Gnome) - then go back to xmms on my vnc session - suddenly no error - xmms plays fine under my regular user account !

    What I really want to know is what does fedora do in that log in that makes xmms suddenly work running under my regular user user account ?

    does it create some sort of temporary permissions or what ?
    SOLUTION:
    Code:
    chmod -R a+rw /dev/{audio,dsp,midi,mixer,snd}
    fixed two related problems on a CentOS release 4.8 machine.

    xmms error:
    Code:
    WARNING **: alsa_get_mixer(): Attaching to mixer hw:0 failed: Permission denied"
    gnome-volume-control error:
    Code:
    Sorry, no mixer elements and/or devices found

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •