How to set up sound in Slackware

I was looking around for ideas for something to write up today, so I asked a friend of mine about his most recent Slackware setup experience. He told me, “my sound isn’t working at the moment, but I really haven’t delved into that at all”.

Which got me thinking. This is a common question among people who are using Slackware and aren’t that intimately familiar with it. I know, this has been written up about a billion times, but not here, and it’s a nice basic HOWTO that I think really belongs on Linux Critic.

Step one: Configure ALSA

On a fresh Slackware installation, ALSA — the default sound engine for Slackware — isn’t usually configured.

So our first step is to open up a terminal and type su, enter your root password, and then type the following arcane command:

alsaconf

This will bring up a pretty easy to use, menu-driven configuration program that looks like this:

Follow the bouncing ball in the alsaconf program, let it figure things out, select your sound card, and you should be good. I’ve run this on a wide variety of hardware, and I’ve never had problems with this part, assuming there’s actually a sound device on the actual machine, of course.

Step two: Unmute your sound channels and set volumes

The next step is to undo the defaults of things in the sound world. For some reason, the default position for the master volume and the PCM volume is 0%, and by default both of those channels are muted in my experience.

This has led to numerous people banging their heads on their desks while screaming, “I got everything configured, it sees my sound card BUT I STILL HAVE NO SOUND!”. This is understandable, I was burned by this when I first started using Slackware too.

To remedy this, in that terminal again, type exit so that you’re no longer typing commands as root, and then type the following command (as your regular user):

alsamixer

This should bring up a screen that lets you use the arrow keys to set the volume levels on the various channels your sound device has built into it.

If you hit the “up” arrow, you’ll find that you can raise your master volume channel (which should be the first one) to the desired level, and by hitting the “right” arrow, you can switch to the next channels and do the same for each of them.

Now, one thing you’ll notice is that you may have “MM” at the bottom of some channels, like this:

Any channel that has this “MM” designation is muted. To unmute a channel, arrow over to it and simply hit the “m” key, and the “MM” should go away and you’ll have sound on that channel.

Once you’re done unmuting things and setting volume levels, simply escape out of this screen and you’re back to the command line, ready for the next step.

Step three: Save what you’ve done

In our final step, we need to tell ALSA that you’re not kidding about the volume settings, and that you want it to remember this.

To accomplish this task, still in your terminal, type su and then your root password again. Then type the following command:

alsactrl store

And that’s it. This tells ALSA to save the current state, and the system should remember this state every time you reboot. If you’re running KDE, you can adjust volume levels with Kmix, which is a standard KDE applet that can live in your tray in KDE. I say this just so you don’t think that you have to open a terminal and run alsamixer every time you want to adjust your volume (though you can if you really want to, or if you’re not running X, for some reason).

An additional step is sometimes necessary if you’re running Fluxbox; if you want your settings restored every time you boot, you may have to edit your /~/.fluxbox/startup file and add the following line to it:

alsactl restore

This isn’t always necessary, but I’ve found that sometimes it is, so your mileage may vary as well. As a rule of thumb, if you don’t like what is happening with your sound levels when you get into Fluxbox every time, adding that line to startup at least puts it in a state that you want right off the bat.

Do let me know if you have any questions regarding this simple procedure. As always, there is of course lots of variation from machine to machine out there, but I’ve never had sound problems (on working hardware) that this couldn’t cure on a fresh setup. In some cases, when sound has mysteriously stopped working, going through this three step process can get it working again, so don’t be afraid to run through this on a machine that has already been working for a while.

About these ads

15 thoughts on “How to set up sound in Slackware

  1. Good post, these steps work for other Alsa using distros too. Very similar to how I got my sound running under AntiX Linux.

  2. Pingback: USB Sound Device as Default
  3. Pingback: Slackware Sound
  4. Pingback: Problem with sound in Slackware
  5. Pingback: Routing the speakers output to mic input
  6. now as an addition to this post……’we’ need to know how to configure a mixer e.g. Dmix, to work with ALSA to allow multiple sound stream control e.g. different volume for video player and one for music player

    peace all :-)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s