No sound on my Linux box and alsamixer gives error in function snd_ctl_open failed
On my newly installed Fedora box (I said “newly” but this may be a bit misleading as I installed FC9, which is an old distribution but I have to use it for compatibility reasons with other software…) I had the following problem:
I had no sound (e.g. YouTube plays a clip and there is no sound) and starting alsamixer as a non-root user gives me the following error:
alsamixer: function snd_ctl_open failed for default: No such file or directory
I admit that ALSA and Linux sound configuration is not my forte, so this particular problem was solved with help from one of my colleagues (Emo). I got as far as checking that my audio hardware was detected :
# /sbin/lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller
Here’s what Emo made me do to solve the “function snd_ctl_open failed” problem:
Looking into /dev/snd/ and alsamixer revealed that all devices were owned by root:root so users could not write to the sound card.This apparently is a problem with that distro’s installer as it should have configured udev to make these devices user-writable.
Our quick solution was to transfer group ownership of these devs to group users:
cd /dev/snd/
sudo chown root:users *
cd /dev
sudo chown root:users mixer
After that the sound worked (I tested with a tube clip)!
The problem with this quick fix to the no sound problem in alsamixer is that all these changes will disappear upon reboot so I will have to execute the above chown commands each time I reboot 🙁
Naturally this is not a proper solution, but at least it proves that the problem lies exactly there. At some point later on (today? if time permits..) I will post here the proper solution which is (as done on many other distributions where sound and alsamixer work properly for intended users right from the start):
- create a group audio (or sound, snd, alsa, whatever…);
add all users who are permitted to play sound to that group;
make udev set the group ownership of the above devices to this group.
… cheers, hope this helps at least a little 😉
2 Responses to No sound on my Linux box and alsamixer gives error in function snd_ctl_open failed
Leave a Reply Cancel reply
-
Categories
- Android Development
- Bash
- C programming
- dpkg/apt-get
- drupal
- Emacs
- Git
- Java
- Linux administration
- Linux device drivers
- Linux Gaming
- Linux kernel
- Linux Networking
- Linux on Windows
- Linux printing
- Linux sound and ALSA
- Package Managers
- Programming
- RPM
- Shell and environment
- Tips and tricks
- Uncategorized
- VirtualBox
- Virtualization
- web development
- wine
- WMaker
- Wordpress Tips
- X Window System
- XFCE
-
Articles
- August 2020
- August 2019
- May 2019
- July 2017
- February 2017
- January 2017
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- April 2016
- March 2016
- December 2015
- November 2015
- September 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- October 2014
- February 2014
- January 2014
- November 2013
- October 2013
- June 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- October 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- September 2011
- August 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
-
Meta
Cloud
audio bash boot compile C programming cups drupal emacs etc Fedora git grep how to httpd init kernel libc linux linux partition localtime login make mount mp3 mysql networking oracle package managers password phpMyAdmin programming rpm shell sql vbox version control system virtual box vm web server wordpress www xargs xfce xwin yum
[…] of problem.. Hi Another possibility why this error might happen (as explained here: http://www.linux-pages.com) is that certain installers do not bother to properly setup the audio devices' permissions in […]
Another possibility why there may be no sound in Fedora (I know about FC 13, 14 and 15 that this was the problem) is that you need to remove PulseAudio. Somehow PulseAudio does not work properly in these versions (and possibly earlier and later versions too..).
Do a “sudo yum remove pulseaudio”, reboot and this should fix the problem. Bow typing ‘alsamixer’ should show you all the controls for your audion card (not just one ‘Master’ control for the dummy card…)