7

I did a minimal installation of ubuntu server on my computer cause I wanted to have a clean environment to run a very lightweight window manager (xmonad).

I don't know much about the sound system in ubuntu so I blindly installed alsa and pulseaudio and thought it would work out-of-the-box. It turns out my user can't play sounds, though I can play any sound if I'm logged as root (via sudo su).

How do I add sound playing priviledges to my user?

0

4 Answers 4

7

Use a text editor as root and manually edit the /etc/group file. Look for the line that says audio and add your username to the end.

This is how the line looked before I edited it:

audio:x:29:

This is how the line looked after I edited it:

audio:x:29:username

Save the file and logout, then log back in and test sound. If it doesn't work try rebooting just to make sure changes are applied and test audio again.

Don't forget to celebrate!

If you still can't hear audio, make sure your Master Volume is not muted. Install alsa-utils which will install alsamixer so you can control your soundcard (volume, mute, boost, choose card, etc.) Run alsamixer in a terminal by typing alsamixer and use your arrow keys to raise the volumes.

You can't run alsamixer as a normal user until you add yourself to the audio group. Even if you run alsamixer as root and your system was on mute and you raise the volume to the max, you still will not hear any audio until you've successfully added yourself to the audio group. The key to getting sound in a minimal install is adding yourself to the audio group.

Note: I never installed pulseaudio to my system. Don't know if that changes things. If it does: try purging pulseaudio from your system first, then install alsa-utils and follow the instructions I gave at the top to add yourself to the audio group.

Going off on a tangent: This is the first minimal install I do so I'm learning a hell of a lot about how ubuntu works. I'll tell you this: I have a deeper appreciation for distros with gui's & desktop environments and the people who make them. It's a hell of a lot work to build a friendly system with all the essential tools and programs. Just wrapping your mind around some of these concepts will keep you up for days. That being said I have a sneaking suspicion there's a lot of other groups you may have to add yourself to to get things to work in a minimal install.

For example, I haven't tested out google voice yet but I may have to add myself to the voice group. We'll see. By default a user is not automatically added to a lot of groups in the minimal install. Hey we wanted to start from scratch and make all the decisions right. Well... here we go.

Happy building!

4

Add your user to the audio and pulse-access groups

Command-line

sudo adduser <username> <groupname>

Then log out and back in or reboot.

Source.

1
  • did... still no good. But apparently I don't have those groups: $groups calsaverini adm dialout cdrom plugdev netdev lpadmin sambashare admin Jul 27, 2011 at 20:04
0

Please try the command alsamixer as your designated user and determine that no output-channel is muted.

2
  • 2
    funny... when I do sudo alsamixer I open it as root normally. When I try to open alsamixer without sudo my user I got a cannot open mixer: No such file or directory error. I can open alsamixergui though and nothing is muted. But it don't have as many options as when I open it with root priviledges. Jul 27, 2011 at 22:35
  • 1
    @RafaelS.Calsaverini: Same here. Only as root I get audio. My user is in the audio-group. Arch Linux on GPD Pocket. Jul 21, 2019 at 13:53
0

This solution might work for you guys I remove every package that are associated with pulseaudio or pavucontrol by trying sudo apt remove *pulseaudio* and sudo apt remove *pavucontrol* then I reboot my pc and I install alsa-utils by typing sudo apt install alsa-utils and insted of pulseaudio I install kmix sudo apt install kmix and reboot and I open youtube and Audio is WORKING but kmix is a not good as pulseaudio so I reinstall pulseaudio and it's WORK!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .