Featured Articles

Detecting (Malicious) Unicode in GitHub PRs
Crowdfunding on Crowd Supply (Review of my experience)
Trusted Boot (Anti-Evil-Maid, Heads, and PureBoot)
Introducing BusKill: A Kill Cord for your Laptop
Nightmare on Lemmy Street (A Fediverse GDPR Horror Story)
WordPress Multisite on the Darknet (Mercator .onion alias)
WordPress Profiling with XHProf (Debugging & Optimizing Speed)
Continuous Documentation: Hosting Read the Docs on GitHub Pages (2/2)
Hardening Guide for phpList
previous arrow
next arrow

Finding and Killing Processes Blocking Alsa Devices

Quite often, and for whatever reason, I go to play a sound in linux and I get a “device or resource busy” error. Restarting alsasound doesn’t work. Here’s what does:

guttersnipe@guttersnipe ~ $ fuser -v /dev/snd/* USER PID ACCESS COMMAND /dev/snd/controlC0: guttersnipe 21993 F…. python2.5 /dev/snd/pcmC0D0p: guttersnipe 21993 F…. python2.5 /dev/snd/timer: guttersnipe 21993 f…. python2.5 guttersnipe@guttersnipe ~ $ lsof -n | grep "/dev/snd" python2.5 21993 guttersnipe 78r CHR 116,2 0t0 10272 /dev/snd/timer python2.5 21993 guttersnipe 79u CHR 116,4 0t0 10476 /dev/snd/pcmC0D0p python2.5 21993 guttersnipe 80u CHR 116,7 0t0 10466 /dev/snd/controlC0 guttersnipe@guttersnipe ~ $ kill 21993

Source: http://alsa.opensrc.org/index.php/FAQ#How_can_I_find_which_processes_are_using_Alsa_devices.3F

Michael Altfield

Hi, I’m Michael Altfield. I write articles about opsec, privacy, and devops ➡

About Michael

tech.michaelaltfield.net/