Meniu

No volume control GStreamer ... found — no sound on Ubuntu

I was introduced to Linux via RedHat distributions, such Fedora or 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, that is 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 bugging 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.

Problem description

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.

as 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 screenshot of this error.

Fixing the problem

The above errors occur simply because the current user, in this case 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

The above 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

As you can see, only the root user and members of audio group have permissions to access ALSA devices. A bug caused 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

All fixed: clicking the mixer applet pops-up the mixer for my ALSA device.

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 audio kamil  # ©2007 dsplabs.com.au

Note, that a reboot may be required for the permission changes to take effect. If not a reboot, then at least a logout and a re-login. Alternatively to the shell command, the following GNOME GUI user and group management tool may be used. The GUI tool is located under System » Administration » Users and Groups in your top bar. The GUI tool can also be started from shell using the following command.

sudo users-admin

This is what the GUI tool looks like.

Select the appropriate user and click the Properties button. Now, make sure that the Use audio devices option is checked.

Good luck!

Mirela

Zona de mobile
  • | 34 articole

Nici un comentariu inca. Fii primul!
  • powered by Verysign