Fix For "[ao_alsa] Playback Open Error: Device Or Resource Busy. No coding!!
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Fix For "[ao_alsa] Playback Open Error: Device Or Resource Busy. No coding!!
Hey guys,
Have you ever had that error when trying to play sound from terminal
Code:
[AO_ALSA] Playback open error: Device or resource busy
Or oustide terminal while loading software such as Amarok you get something like
Code:
xine engine unable to load sound drivers
Well there is a super simple fix for that. It might not work, cuz there could be 100s of causes, but check on this one in case.
First, just to make sure the fix will do what it's meant for (fixing!), type the following in terminal
Code:
lsof /dev/snd/{whatever your device name is, similar to "pcmC0D1p"}
You can get the device name in terminal when you type the following and get the sound error which is the subject of this post
Code:
mplayer filename.movie
It will show something like
Code:
[AO_ALSA] alsa-lib: pcm_hw.c:1099:(snd_pcm_hw_open) open /dev/snd/pcmC0D1p failed: Device or resource busy
Then go back to the step about the lsof command. Check if you have anything showing. If the lsof command lists nothing, then your problem is something else and look elsewhere. But if lsof lists something, it means those things are using the sound device, and most probably in an exclusive manner which means nothing else can start the device.
The culprit? The stupid "Sound File preview" function in KDE!!
You can uncheck that option from 2 places:
Code:
-right-click desktop
-choose behavior
-file icon tab
-uncheck "sound files"
The other way is through kcontrol, this first one is a lot easier though.
Then reboot (restarting X is enough, I think).
And then do another lsof typing. And nothing will show!! Now start Amarok or anything else.
That problem happened to me when I tried to force all sounds through SPDIF. Analog I had no problem, but through SPDIF it was always busy until I found that workaround.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.