When you first install Arch Linux and your preferred desktop environment or window manager, the sound will most likely not be working. The procedure to set it up is very simple. If you want to use OSS, an alternative sound system, see the OSS section at the bottom.
Installation
Simply run pacman -S alsa-lib alsa-utils After you have done this you will need to configure ALSA.
Configuration
The drivers/modules for you sound card will probably have been detected at boot time and automatically started. To see if they have, run the following command:
lsmod|grep '^snd' It should output something like this: snd_seq_oss 33760 0
snd_seq_midi_event 7248 1 snd_seq_oss
snd_seq 57024 4 snd_seq_oss,snd_seq_midi_event
snd_seq_device 7268 2 snd_seq_oss,snd_seq
snd_pcm_oss 42656 0
snd_mixer_oss 16784 1 snd_pcm_oss
snd_hda_codec_si3054 5584 1
snd_hda_codec_realtek 256852 1
snd_hda_intel 29256 3
snd_hda_codec 68112 3 snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 8632 1 snd_hda_codec
snd_pcm 80920 4 snd_pcm_oss,snd_hda_codec_si3054,snd_hda_intel,snd_hda_codec
snd_timer 22816 2 snd_seq,snd_pcm
snd 65928 18 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
snd_page_alloc 9760 2 snd_hda_intel,snd_pcm
If not, you will need to start the module manually. See the page in the wiki for more information.
Now you will need to unmute the speakers, as they are muted by default. Run
alsamixer
You will see something like the following:
alsamixer: it will look like this
On all of the ones that have "MM" under them, use the cursor keys to highlight them, then press "m" on the keyboard. The "MM" should turn into "00". Use up and down on the cursor keys to make it louder and softer. I recommend putting "PCM" to 100 and "Front" to 100. You can put "Headphone" for how loud you want your headphones to be, and "Front" is how loud your speakers are.
To get sound on your user, you must add it to the audio group. Run the following command.
gpassed -a [insert username here] audio
For this to take effect, you must log out and log back in.
Now we need to test the sound. You can either use your favourite music player, or you can run the following command aplay /usr/share/sounds/alsa/Front_Center.wav
If you can't hear anything, unmute everything in alsamixer. If it still fails, see the FAQ in the Arch wiki.
If everything is working ok, run the following command
alsactl store
To get ALSA to start when you boot up, add "alsa" to the DAEMONS part of your /etc/rc.conf. It doesn't really matter where you put it.
OSS
OSS is an alternative sound system. It's advantages include:
- Multiple programs can use the system at the same time
- Better support for certain sound cards
- The "vmix" mixer lets you change the sound of each application
Installing
First of all, you will need to disable ALSA. Go into your /etc/rc.conf as root and add the following into the "MODULES" part:
MODULES=(!soundcore)
You will now be required to reboot the system. After you have rebooted, run
/etc/rc.d/oss start
If you want it to start when you boot, add the following to the "DAEMONS" section of your /etc/rc.conf:
DAEMONS=(oss)
Having any problems with it? Have a look at the Arch Linux wiki page on OSS for more information.