Every time I install a new version of Slackware Linux I get hit with the same problem: sound works for root, but not for other users. Google for “ALSA sound” and you’ll see I’m not alone. Its not just a Slackware problem, its a KDE problem, and more specifically it has to do with ALSA – the Advanced Linux Sound Architecture – which is used by KDE.
There can actually be a couple of problems at work here.
The first place to look is user permissions. By default, the root user has all the permissions needed to do anything on the system, but new users need to have permissions individually granted.
After creating a new user. edit (as root) the /etc/groups file. Update the user’s permissions to belong to the audio group. While you’re at it you might as well add other groups such as video, floppy, cdrom, plugdev, etc.. to the users that you want to have access to those resources.
If you still have no sound, then ALSA may be confused as to which device it should use as the default sound device. You can fix that by setting up a resource file for ALSA to use when it starts up.
So, cat the /proc/asound/cards file. You’ll get something that looks like this:
1 2 3 4 |
|
In the user’s home directory, create a .asoundrc file like this:
1 2 3 4 5 6 7 8 9 |
|
Note that you can also do it this way specifying the name of the device instead of the number:
1 2 3 4 5 6 7 8 9 |
|
Thats it. Restart the sound system & you should have sound.