I was introduced to Linux via RedHat distributions, such Fedora and CentOS. With Fedora you tend to learn a lot because so many things are broken! I also used Novell's openSuSE for a while. I found it to be much more polished than Fedora. SuSE includes Yast configuration utility: a central GUI application where you simply click and things just work, i.e. no need for editing of configuration files. SuSE is however quite chunky, i.e. it is quite hungry for system resources. Very recently, I have installed Ubuntu. I have heard many Ubuntu users praising it, while users of other distros were ridiculing it for the lack of development tools. Well, since installing it… I have been impressed and I started praising it too :). Ubuntu is targeted for the end users as a desktop environment. It is very polished, things just work. It is quick and compact. Installing extra Debian packages is not a problem. Synaptic package manager handles it flawlessly. That said however, there have been a few errors cropping in here and there, especially to do with user management and user permissions. One such error,
No volume control GStreamer plugins and/or devices found, prevents users from accessing the audio device. Note however, that the above error is caused by a Gnome bug and is most likely distribution independent. In this article, I will present a number of approaches to getting around this bug.
After installing Ubuntu both my soundcards worked… initially. Then one day I have rebooted, logged back in and clicked on the Gnome volume control (shell:
gnome-volume-control) icon on the top bar. The icon had a red sign over it, as shown below, indicating that no audio devices were accessible.
After clicking on the mixer icon the following error was produced,
The volume control did not find any elements and/or devices to control. This means either that you don't have the right GStreamer plugins installed, or that you don't have a sound card configured. You can remove the volume control from the panel by right-clicking the speaker icon on the panel and selecting "Remove From Panel" from the menu.
also shown in the screenshot below.
Subsequent attempts to open Gnome volume control resulted in another error.
No volume control GStreamer plugins and/or devices found.
Here is the actual screenshot of this error message.
Fixing the problem
The above errors occur simply because the current user, in this case the user kamil, does not have permissions to access the audio device(s). The reason why a user looses these permissions is unclear to me. Fixing it will be easy however. First, lets have a look at permissions for the ALSA devices. If you are unfamiliar with audio architecture on Linux checkout the basic introduction in the following post
lsof |grep snd — how to free a Linux sound device. Type the command below at the shell.
ls -la /dev/snd # ©2007 dsplabs.com.au
If the above command fails, i.e. it produces the following error
ls: /dev/snd: No such file or directory
then it has been suggested on the Launchpad's Bug forum that the Ubuntu linux modules package:
linux-ubuntu-modules-2.6.22-14-386 may be missing. To check if this package is installed on your system run
dpkg as follows.
dpkg -l linux-ubuntu-modules-2.6.22-14-386
If this specific version is not presnet then you will get the following error message.
No packages found matching linux-ubuntu-modules-2.6.22-14-386.
Have a look if any version is installed by using this command.
dpkg -l linux-ubuntu-modules-*
I got the following output on one of our PCs.
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version +++-=================================-================================= ii linux-ubuntu-modules-2.6.22-14-38 2.6.22-14.37 ii linux-ubuntu-modules-2.6.22-14-ge 2.6.22-14.37 Description -====================================================================== Ubuntu supplied Linux modules for version 2.6.22 on i386 Ubuntu supplied Linux modules for version 2.6.22 on x86/x86_64
If you do not have it installed, simply install it using
apt-get and that may solve your audio problems!
sudo apt-get install linux-ubuntu-modules-2.6.22-14-386
Note that the above modules are precompiled for a specific kernel version and thus will require a reboot after installation. If the above hasn't helped, then read-on. The
ls -la /dev/snd command produced the following output on my computer.
total 0 drwxr-xr-x 2 root root 180 2007-11-18 13:27 . drwxr-xr-x 12 root root 13860 2007-11-19 20:25 .. crw-rw---- 1 root audio 116, 8 2007-11-18 13:27 controlC0 crw-rw---- 1 root audio 116, 7 2007-11-18 13:27 pcmC0D0c crw-rw---- 1 root audio 116, 6 2007-11-18 13:27 pcmC0D0p crw-rw---- 1 root audio 116, 5 2007-11-18 13:27 pcmC0D1c crw-rw---- 1 root audio 116, 4 2007-11-18 13:27 pcmC0D2p crw-rw---- 1 root audio 116, 3 2007-11-18 13:27 seq crw-rw---- 1 root audio 116, 2 2007-11-18 13:27 timer
Which means that my audio device has been detected and ALSA drivers for it have been loaded. As you can see in the above output only the root user and members of the audio group have permissions to access ALSA devices. A bug caused the user kamil to be removed from audio group, and hence kamil has no longer access to the audio devices on his system! A very crude fix to this problem is to allow unrestricted access to these devices to all users and groups using the following command.
sudo chmod -R a+rwx /dev/snd # ©2007 dsplabs.com.au
This is obviously not a very good practice. The only reason you would do this is if you were in a real hurry to get the audio going or to check if the permissions and group memberships are causing your audio headaches. Lets have a look at the permissions now.
ls -la /dev/snd
The output below shows that everyone can access the ALSA devices.
total 0 drwxrwxrwx 2 root root 180 2007-11-18 13:27 . drwxr-xr-x 12 root root 13860 2007-11-19 20:25 .. crwxrwxrwx 1 root audio 116, 8 2007-11-18 13:27 controlC0 crwxrwxrwx 1 root audio 116, 7 2007-11-18 13:27 pcmC0D0c crwxrwxrwx 1 root audio 116, 6 2007-11-18 13:27 pcmC0D0p crwxrwxrwx 1 root audio 116, 5 2007-11-18 13:27 pcmC0D1c crwxrwxrwx 1 root audio 116, 4 2007-11-18 13:27 pcmC0D2p crwxrwxrwx 1 root audio 116, 3 2007-11-18 13:27 seq crwxrwxrwx 1 root audio 116, 2 2007-11-18 13:27 timer
Clicking the mixer applet pops-up the mixer for my ALSA device without any problems.
For non-ALSA devices (i.e. OSS devices) the above fix would look like this:
sudo chmod a+rwx /dev/audio* # ©2007 dsplabs.com.au sudo chmod a+rwx /dev/dsp*
However, a proper fix to the above problem is to (re)add the user in question to the audio group. This can be done from shell as follows.
sudo usermod -g kamil -a -G audio kamil # ©2007 dsplabs.com.au
Important, make sure you do include the -a switch in the command above, otherwise the user kamil will be a member of the kamil and audio groups only!
If this happens, logout and re-login, then check what groups you are still a member of by using the following command.
If the output of the above command contains most of the following groups, in some order, then you are fine.
On the other hand if the list is a lot shorter, like is shown below,
then you will have to restore the original group allocation, as discussed by Chris Collins in the Restore Default Ubuntu Groups post, i.e. by running the following command (remember to change the group kamil and user kamil in the command below to appropriate group and user for you; kamil group entries are in green and kamil user entries are in blue).
sudo usermod -g kamil -G kamil,audio,adm,uucp,dialout,cdrom,floppy,dip,video,\ plugdev,scanner,netdev,lpadmin,powerdev,admin kamil # ©2007 dsplabs.com.au
Another logout and re-login will be required for the permission changes to take effect. Note that if you have installed non-base packages that create new groups then use the Administrator profile list of groups contained in
/etc/gnome-system-tools/users/profiles file in the above command instead, i.e.
Use the list in the last line of the output (notice the non-standard fuse group).
[Unprivileged] name=Unprivileged name[es]=Usuario sin privilegios shell=/bin/bash home-prefix=/home uid-min=1000 uid-max=6000 [Desktop] name=Desktop user name[es]=Usuario del escritorio default=1 shell=/bin/bash home-prefix=/home uid-min=1000 uid-max=6000 groups=cdrom,floppy,dialout,tape,dip,adm,plugdev,fax,audio,scanner,fuse,lpadmin,video [Administrator] name=Administrator name[es]=Administrador shell=/bin/bash home-prefix=/home uid-min=1000 uid-max=6000 groups=cdrom,floppy,dialout,tape,dip,adm,plugdev,fax,audio,scanner,fuse,admin,lpadmin,video
The changed command looks as follows.
sudo usermod -g kamil -G kamil,cdrom,floppy,dialout,tape,dip,adm,plugdev,fax,\ audio,scanner,fuse,admin,lpadmin,video kamil # ©2007 dsplabs.com.au
An alternative to the use of
usermod shell command is the
sudo users-admin Gnome GUI user and group management tool. This tool is located under System » Administration » Users and Groups in your top bar. It can also be started from shell using the following command.
This is what the
users-admin tool looks like.
Select the appropriate user and click the Properties button.
Now, make sure that the Use audio devices option is checked. Beaware the latest Ubuntu release (7.10 gutsy) ships with Gnome
users-admin tool version that has a few bugs and its use may cause you some grief. One last thing, a very good reference to read if you are having audio device issues on Linux is: Comprehensive Sound Problem Solutions Guide.
Did you find the above information useful and interesting? If so, please support this site by using the blog directory links at the bottom of this page. Thanks for your support!
If you have any Linux related problems or questions then please feel free to post them on our Linux Forums: http://linux.dsplabs.com.au/forums.