Friday, January 11, 2008

HOWTO: Figure out what's using your soundcard in Linux

It's 2008, and while Linux audio is getting better for desktop users, I still occasionally find myself running into a situation where one application is tying up my soundcard. Sometimes I'll try to run jackd through qjackctl and it'll fail because Firefox has a flash video loaded in it or something like that.

Anyways, to figure out what's using your soundcard on Linux, you can run:

sudo fuser -v /dev/dsp*
sudo fuser -v /dev/snd/*

The first command above will list all the OSS applications using your sound hardware, and the latter will tackle ALSA applications.

For example, if I run those commands with nothing running:

gamegod@home:~/$ sudo fuser -v /dev/dsp*
gamegod@home:~/$ sudo fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/controlC0: gamegod 6236 F.... mixer_applet2

The output above is showing me that GNOME's mixer applet is using the "control" interface on my soundcard. This won't interfere with any applications, so you can always safely keep this running.

As another example, if I run Mixxx (software for DJs) before running those commands, I'll see:

gamegod@home:~/$ sudo fuser -v /dev/dsp*
gamegod@home:~/$ sudo fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/controlC0: gamegod 6236 F.... mixer_applet2
/dev/snd/pcmC0D0p: gamegod 12936 F...m mixxx
/dev/snd/seq: gamegod 12936 F.... mixxx

This time the output above is showing me that Mixxx is using my soundcard's audio first ouput interface (pcmC0D0p corresponds to ALSA's hw:0,0), as well as ALSA's MIDI interface.

KDE 4.0 Released!

After having sworn off KDE many years ago, I might just have to give it a second shot - KDE 4.0 was just released, and brings a massive overhaul to the desktop environment. Congratulations to the entire KDE team on making this release happen. A lot of very talented people put a lot of hard work into this.




If you're looking for eye-candy, check out the KDE 4 screenshots on their site. Kickoff and KRunner look well thought-out, and I'm itching to give them a try. They also look like they're better integrated into the desktop environment than their GNOME equivalents (Deskbar and any of those XP/Vista-style system panel clones).

If you want to give it a spin, the source and binary packages for several distros are available on the KDE 4.0.0 info page. Packages for (K)Ubuntu 7.10 are available along with a LiveCD here.

Good stuff.