Sound does not work for non-root users with snd-intel8x0 based card. Running system-config-soundcard as root works all ok, I can hear the test tune and saving the settings produces sane looking config files. However, when running an audio application (mpg321 from livna or any other like totem, etc) as a normal user I get these errors and no sound at all: Playing MPEG stream from test.mp3 ... MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_card_driver return ed error: No such device ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_concat returned er ror: No such device ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_refer returned err or: No such device ALSA lib conf.c:3982:(snd_config_expand) Evaluate error: No such device ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM default ALSA snd_pcm_open error: No such device The same command as root works all ok. I also see in X log following errors: ALSA lib pcm_hw.c:1207:(_snd_pcm_hw_open) Invalid value for card ALSA lib pcm_hw.c:1207:(_snd_pcm_hw_open) Invalid value for card FWIW, the machine is dual boot RHEL4/F8T3+devel and under RHEL4 sound works for all users. No other errors found in various config files.
Just noticed that my another machine that was working yesterday now has this same problem (also snd-intel8x0 based card) so clearly some of the updates during the past day or two broke this.
Just noticed that the same command works from a console but not from a gnome-terminal! Even when GNOME is running audio works from console. If I switch to console when trying to play under GNOME then it starts working and stops again when switching back to GNOME. This is with alsa-lib-1.0.15-0.3.rc3.fc8.
A-ha! Found the root cause for this: I have ~/.xinitrc file which sets up some keybindings etc and launches finally gnome-session. If I remove this file, sound works all ok. Changing component.
So the question is: is there some global/common xinitrc file I should source in my ~/.xinitrc to get audio working or should startx (or other global X init script) be fixed?
And FWIW, my ~/.xinit has been working well at least since Fedora Core 1.
Please try to enable ConsoleKit service and reboot. It should set proper rights to /dev/snd/*.
Thanks for looking into this. ConsoleKit has been running all the time so it does not solve this issue. FWIW, under /dev/snd I always see: root@localhost:~# ls -al /dev/snd/* crw-rw----+ 1 root root 116, 13 Nov 27 19:41 /dev/snd/controlC0 crw-rw----+ 1 root root 116, 6 Nov 27 19:41 /dev/snd/controlC1 crw-rw----+ 1 root root 116, 12 Nov 27 19:41 /dev/snd/pcmC0D0c crw-rw----+ 1 root root 116, 11 Nov 27 19:41 /dev/snd/pcmC0D0p crw-rw----+ 1 root root 116, 10 Nov 27 19:41 /dev/snd/pcmC0D1c crw-rw----+ 1 root root 116, 9 Nov 27 19:41 /dev/snd/pcmC0D2c crw-rw----+ 1 root root 116, 8 Nov 27 19:41 /dev/snd/pcmC0D3c crw-rw----+ 1 root root 116, 7 Nov 27 19:41 /dev/snd/pcmC0D4p crw-rw----+ 1 root root 116, 5 Nov 27 19:41 /dev/snd/pcmC1D0c crw-rw----+ 1 root root 116, 4 Nov 27 19:41 /dev/snd/pcmC1D0p crw-rw----+ 1 root root 116, 3 Nov 27 19:41 /dev/snd/seq crw-rw----+ 1 root root 116, 2 Nov 27 19:40 /dev/snd/timer root@localhost:~# To summarize: 1) Sound works on console (with mpg321 etc) 2) Sound works under GNOME without .xinitrc 3) Sound does not work under GNOME with .xinitrc And now I see: 4) Sound works under GNOME with .xinitrc if I start gnome-sessions, then log in to a console and then try to get a sound out with a newly started application. Applications that were started during GNOME startup, like volume control, still think that sound is disabled. Thanks.
I'm having the same problem on my Thinkpad T61. The audio hw is 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03) Sound worked fine on my fresh F-8 installation, but an update broke it about a month ago or so. Sound will work only if I run pulseaudio daemon manually with sudo AND mpg321 with sudo as well. If pulseaudio is not run as root, it will complain with: ALSA lib pcm_hw.c:1207:(_snd_pcm_hw_open) Invalid value for card E: module-alsa-sink.c: Error opening PCM device hw:0: No such device E: module.c: Failed to load module "module-alsa-sink" (argument: "device=hw:0 sink_name=alsa_output.pci_8086_284b_alsa_playback_0"): initialization failed. I'm running a fairly standard F-8 gnome setup (ConsoleKit is running).
This is weird -- I could swear that I have this problem a couple of minutes ago. Then while pulseaudio server was running (I didn't know that), I removed and stopped all PA-related services. Suddenly GStreamer-based applications begun to work -- but remember I haven't switched pulseaudio off and gstreamer had PA as default output. However, mplayer -ao pulse still didn't work. Just thought it might be interesting.
One more weird thing -- gstreamer apps work even with ALSA set as output, but aplay doesn't play saying: [matej@viklef Latin]$ LANG=C aplay Joyce_-_Garota_de_Ipanema.wav ALSA lib pcm_dmix.c:866:(snd_pcm_dmix_open) unable to open slave aplay: main:546: audio open error: Device or resource busy [matej@viklef Latin]$ Can aplay play through alsa-plugin-pulseaudio?
Reporter, could we get output of ck-list-session command with and without that ~/.xinitrc, please?
I suspect that this happened when I moved the consolekit registration stuff from xinit into xinitrc, to solve a different problem.
Thanks for looking into this. I'll attach a stripped down ~/.xinitrc which is enough to reproduce and ck-list-session output both with and without that rc file.
Created attachment 282971 [details] xinitrc reproducer A ~/.xinitrc file which can be used to reproduce this bug.
Created attachment 282981 [details] ck-list-sessions output with ~/.xinitrc
Created attachment 282991 [details] ck-list-sessions output without ~/.xinitrc
Adding the following lines to /etc/security/console.perms.d/50-default.perms made ConsoleKit change the /dev/snd/* permissions: <sound>=/dev/dsp* /dev/snd/* <console> 0600 <sound> 0600 root
I get this same error with no .xinitrc non-root: ** WARNING **: alsa_setup_mixer(): Failed to find mixer element: PCM root: works
Based on the date this bug was created, it appears to have been reported during the development of Fedora 8. In order to refocus our efforts as a project we are changing the version of this bug to '8'. If this bug still exists in rawhide, please change the version back to rawhide. (If you're unable to change the bug's version, add a comment to the bug and someone will change it for you.) Thanks for your help and we apologize for the interruption. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
Thank you for taking the time to report this bug report.Changing bug status to Assigned and the version of the bug to version 8. Thanks, Regards, Balaji
I just installed Fedora 9 Preview on my system and the problem remains.
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I just run into this too, after upgrade to Fedora 9 (it worked with _updated_ F8) ... $ mplayer Kalinka.mp3 MPlayer SVN-r25979 rpm.livna.org (C) 2000-2007 MPlayer Team CPU: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz (Family: 6, Model: 15, Stepping: 6) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with runtime CPU detection. mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing Kalinka.mp3. Audio file file format detected. Clip info: Title: Kalinka Artist: Chor SA im. Alexandrova Album: Year: Comment: Genre: Unknown ========================================================================== Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3) ========================================================================== [AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '0' [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory [AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory [AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [AO_ALSA] alsa-lib: conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory [AO_ALSA] alsa-lib: pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM default [AO_ALSA] Playback open error: No such file or directory [AO OSS] audio_setup: Can't open audio device /dev/dsp: Permission denied [AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '0' [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory [AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory [AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [AO_ALSA] alsa-lib: conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory [AO_ALSA] alsa-lib: pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM default [AO_ALSA] Playback open error: No such file or directory AO: [pulse] Init failed: Connection refused [AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le [AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '0' [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory [AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory [AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory [AO_ALSA] alsa-lib: conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory [AO_ALSA] alsa-lib: pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM default [AO SDL] Unable to open audio: ARTS can not open audio device DVB card number must be between 1 and 4 AO: [null] 44100Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A: 24.7 (24.7) of 135.0 (02:15.0) 0.3% Exiting... (Quit) $ su Heslo: # mplayer Kalinka.mp3 MPlayer SVN-r25979 rpm.livna.org (C) 2000-2007 MPlayer Team CPU: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz (Family: 6, Model: 15, Stepping: 6) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with runtime CPU detection. mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing Kalinka.mp3. Audio file file format detected. Clip info: Title: Kalinka Artist: Chor SA im. Alexandrova Album: Year: Comment: Genre: Unknown ========================================================================== Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3) ========================================================================== AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A: 3.4 (03.4) of 135.0 (02:15.0) 0.7% Exiting... (Quit) I have empty ~/.xinitrc, and I get the same problem in text mode too my soundcard is 00:1b.0 Audio device: Intel Corporation 631xESB/632xESB High Definition Audio cController (rev 09) I do not how many people are affected, but not having the ability to use audio is a big problem for a distro, and having this open for a half year does not give a good impression ...
Same here... fresh F9 x86_64 install, ICH8 audio works fine when logged in as root but broken as a normal user. My alsa-info.sh output is here: http://www.alsa-project.org/db/?f=21bb1e27fae1967000c7288406e3fe8ddfe3caa3 - Mike
The permission fixes to /etc/security/console.perms.d/50-default.perms in comment 17 fixed the problem for me. - Mike
F10Beta still has this problem and the fix in the comment 17 fixes it. Please apply.
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This problem is still present in Fedora 10. The two-line fix offered in comment 17 still fixes the problem. Any changes to get this done, it's been over a year since the initial report..? Thanks.
Hi there, just got the same issue and got it solved by adding as in the "post 17", these lines into /etc/security/console.perms.d/50-default.perms: "Make sure you put (0666 root) instead of (0600 root). @the TOP : <sound>=/dev/dsp* /dev/snd/* @the bottom: <console> 0666 <sound> 0666 root It now works just as perfect. Thanks Sylvain
I am getting the permission denied issue (on a T61p with f10, updated as of last night): [sinuhe@seshat ~]$ alsamixer alsamixer: function snd_ctl_open failed for default: Permission denied [sinuhe@seshat ~]$ Everything works fine as root, or as a user from a text console, but upon startx (~/.xinitrc has "exec fvwm" only), as a user I get the above.
I repeated comment 17's suggestion (step 29's 0666 mode is disconcerting) with success.
After testing F11 Beta I see that 2.5 half years after reporting this and 1.5 years since a user provided proposed a cure this bug is still unfixed.
Created attachment 337992 [details] Patch to include sound devices in /etc/security/console.perms.d/50-default.perms
Let's try something new: /etc/security/console.perms.d/50-default.perms is actually part of the 'pam' package. Daniel: Can you change the component on this bug to 'pam'?
You diagnosed your problem correctly in comment 15 and 16. ConsoleKit thinks that your session is not active, thus, you don't get acls on the sound devices (which are set up for the active session). If you do your own hand-rolled session, you are responsible for registering with ConsoleKit.
> ConsoleKit thinks that your session is not active, thus, you don't get acls on > the sound devices (which are set up for the active session). If you do your own > hand-rolled session, you are responsible for registering with ConsoleKit. Well the thing is that this has worked for years and years before ConsoleKit came and there should be no need to introduce these kind of regressions even if ConsoleKit brings in some additional features. Anyway, I inspected this "own hand-rolled session" thingy and found the command ck-xinit-session (but no man page or command line help for it). If put to ~/.xinitrc it does not help. If run from a terminal after GNOME is launched mpg123 etc work ok. BUT! When hitting Ctrl+C to quit mpg123 the whole system is shut down! Yes, this is just insane: I had a root session on another console but when a regular user innocently just tried to stop his application with Ctrl+C under GNOME, the whole system went down in flames. I am changing the component to 'pam' as suggested to see if they could apply the proposed fix in Comment 17.
No, pam_console will not manage sound devices anymore.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
> When hitting Ctrl+C to quit mpg123 the whole system is shut down! My bad, this was a side-effect of another unrelated local configuration test. Otherwise my last statement is still true: > If put to ~/.xinitrc it does not help. If run from a terminal after GNOME is > launched mpg123 etc work ok. This seems to be true for both ck-launch-session and ck-xinit-session.
ck-xinit-session is supposed to be used as a parent process for your entire session. /etc/X11/xinit/xinitrc is supposed to do that already. Not sure why that is not working for you.
> ck-xinit-session is supposed to be used as a parent process for your > entire session. Ah, ok, finally I got it. If I modify the aforementioned ~/.xinitrc as # Initialize ConsoleKit session if needed [[ -x /usr/bin/ck-xinit-session ]] && CK_XINIT_SESSION="/usr/bin/ck-xinit-session" # Add your favorite window manager / desktop environment for wm in gnome-session startkde fvwm do which $wm > /dev/null 2>&1 && exec $CK_XINIT_SESSION $wm done then I finally have sounds working and also a Shut Down button in the System menu! > /etc/X11/xinit/xinitrc is supposed to do that already. Not sure why > that is not working for you. With ~/.xinitrc it is not executed at all. And also, without ~/.xinitrc the test -a -z "$XDG_SESSION_COOKIE" at the bottom of /etc/X11/xinit/xinitrc-common fails and thus CK_XINIT_SESSION is empty. By removing the test for XDG_SESSION_COOKIE sound would work also without ~/.xinitrc. Thanks.
Moving this to xorg-x11-xinit. I guess the solution here may well be to unset XDG_SESSION_COOKIE before running startx, since you want to start a new session.
*** Bug 493961 has been marked as a duplicate of this bug. ***
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
(In reply to comment #42) > I guess the solution here may well be to unset XDG_SESSION_COOKIE before > running startx, since you want to start a new session. This doesn't appear to resolve the problem, neither does the unset patch in xorg-x11-xini{t,t-session} (1.0.9-7.fc11.x86_64).
(In reply to comment #41) > [[ -x /usr/bin/ck-xinit-session ]] && > CK_XINIT_SESSION="/usr/bin/ck-xinit-session" > > # Add your favorite window manager / desktop environment > for wm in gnome-session startkde fvwm > do > which $wm > /dev/null 2>&1 && exec $CK_XINIT_SESSION $wm > done This works for GNOME not fvwm. This for wm in fvwm gnome-session startkde loads fvwm but does not fix the problem. GNOME is doing the work for you. So far, /etc/security/console.perms... (comment 16 if memory serves) remains the only usable fix so far.
(In reply to comment #46) (comment 16 if memory serves) 17.
The /etc/security/console.perms thingy does not work for me in rawhide. And base on comment #37, its not supposed to. :(.
I solved what I was experiencing by erasing my ~/.xinitrc file, which had "awesome" on it and I adding the ~/.Xclients file with "awesome" on it. I'm guessing that ~/.Xclients is run after xinitrc and actually gets the console kit session parameters set correctly.
Since this bugzilla report was filed, there have been several major updates in various components of the Xorg system, which may have resolved this issue. Users who have experienced this problem are encouraged to upgrade their system to the latest version of their packages. For packages from updates-testing repository you can use command yum upgrade --enablerepo='*-updates-testing' Alternatively, you can also try to test whether this bug is reproducible with the upcoming Fedora 12 distribution by downloading LiveMedia of F12 Beta available at http://alt.fedoraproject.org/pub/alt/nightly-composes/ . By using that you get all the latest packages without need to install anything on your computer. For more information on using LiveMedia take a look at https://fedoraproject.org/wiki/FedoraLiveCD . Please, if you experience this problem on the up-to-date system, let us now in the comment for this bug, or whether the upgraded system works for you. If you won't be able to reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you. [This is a bulk message for all open Fedora Rawhide Xorg-related bugs. I'm adding myself to the CC list for each bug, so I'll see any comments you make after this and do my best to make sure every issue gets proper attention.]
This bug is still at large in Fedora 12, except that the fix in step 17 no longer resolves the issue (that file doesn't exist, so creating it was required).
Could you please reply to the previous question? If you won't reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you. [Note please, that this is machine generated comment for large amount of bugs; due to some technical issues, it is possible we've missed some of the responses -- it is happens, please, just a make a comment about that; that we will see. Thank you]
(In reply to comment #52) > [Note please, that this is machine generated comment for large amount of bugs; > due to some technical issues, it is possible we've missed some of the responses > -- it is happens, please, just a make a comment about that; that we will see. This is still the case in FC12, but the console.perms solution of step 17 no longer works. There is a difference in behaviour. The permission denied error of earlier is gone. alsamixer opens fine. However, playing an ogg or FLAC file, say with ogg123, acts like it is beginning to play the file, but doesn't (This works fine when exiting from X and returning to the text console.) A similar behaviour is got from GUI apps, (i.e. Totem tries to read a file, acts like it is playing it, but the second counter does not increment).
Good news, this works for me now on F13ß with GNOME both with and without ~/.xinitrc. I'm not sure what's the status wrt comment 46 - is it ok or not or should a new bug opened for it. From my perspective this one is fixed, thanks a lot!
Thank you for letting us know.