Houston I have a problem: Failed to open ALSA device “hw:5,0

I am working with Volumio Version 2.586 and an external USB DAC.

After reboot and starting to play i.e. internet radio or tidal songs I am sometimes receive the following error message: Error failed to open “alsa”[alsa]; Failed to open ALSA device “hw:5,0”: snd_pcm_hw_params() failed:Input/output error

No sound on my DAC.

After 2-5 more reboots the systems suddenly is working again. This happens quite often and it looks that the system is not stable enough to use it as my primary device (I really would like to do so… but therefore it must play music after I switch it on…)

I recognized, that there are a lot of people in this forum and on the internet “complaining” about this effect. Is there no other way as to reboot again and again while hoping that the system will work?

I would like to ask if it would be possible to implement a “reset” script or command at the proper place in the volumio code so that the USB DAC will be placed in a defined status everytime the Raspberry is booting to make sure, that the system will recognize it at the time it has to.
Maybe this script will help:
“There is a way to force Linux’s USB stack to perform a port reset and re-enumerate a device. It can be done using usbfs; I have attached a C program to carry it out. Note however, that reset followed by re-enumeration is not the same thing as power-cycle followed by reconnect and re-enumeration”.

Maby this could be a good starting point to overcome the issue?

Many thanks for your support and I hope you will come up with a better solution than: Switch this on and off and save and reboot…


screenshot which shows the error message.
Best regards,

Give us a bit more info please. Which SBC (RPi 3?) with which USB DAC are you using? What about settings, did you enable software volume control, upsampling etc. in Volumio?
Also post your log files, most likely that will give insights into why the connection to the DAC fails. Only then its possible to solve the root cause, most probably without resorting to crude solutions like reset scripts.

Dear Paul,
many thanks for your answer.
Below you´ll find more information about my setup:
Volumio VERSION: 2.587
USB DAC: space-audio.com/space_web_eng/space_key.html - (Kickstarter Campaign).
The Space Key is supported both by Android devices (USB OTG support required), iOS devices by Apple (iPhone, iPad, iPod), but desktop operating systems, such as Microsoft Windows, Apple OS X (macOS) and other Linux distributions are also supported.
kickstarter.com/projects/ma … =user_menu

I am not using upsampling and no local file streaming. No DSD.

Only Internet Radio, TIDAL and spotify connect.

Installed Plugins: Volumio spotify connect & Backup and Restore data - both active

type of Mixer: undefined (no Hardware and no Software)

Please specify which logfiles you need and where i can find (download) them.

I booted this morning and the systems is running fine - but this is very sporadic… often it fails and I have to reboot and reboot and…

Best regards,

That already helps quite a bit. How does your DAC show up in the list of playback devices? It is working now and then, so at least the chip is supported.
Usually these intermittent issues are caused by an unstable power supply. The Pi Zero W has the advantage that power to the usb port is not routed via regulators, meaning there is no current limit that sometimes causes problems. Nevertheless, if the supplied voltage dips due to fluctuating load, things might not work properly. The Pi’s are particularly sensitive to this. So, which power supply are you using?

Go to volumio.local/dev, there is an option to submit the log files. If it happens again that the DAC fails, please submit the log. It will return a link; post the link here and we’ll be able to view your logs.

Hi Paul, many thanks for your reply.
The USB DAC is working fine with Volumino on the Rasberry PI ZeroW.
The Failed to open ALSA device “hw:5,0… Problem occurs from time to time - not predictable.
I will have a look at the power supply which is a pretty cheap one from CHINA.
Is there a power supply you can recomend?
With best regards,

99 out of a 100 times the bad power supply is the culprit. Theoretically these cheap power supplies are able to power the Pi + DAC. In practice however, they cannot keep a stable voltage if the power drawn by the Pi or DAC fluctuates. The Pi is particularly sensitive to small voltage drops, which causes all kinds of seemingly random errors.

You can’t go wrong with the official Raspberry Pi 5.1V/2.5A power supply: thepihut.com/collections/raspbe … wer-supply

I am having the same issue with Emotiva PT-100 together with original Rasberry power supply.Emotiva is discovered correctly but I was never able to play anything. Always the same error: “Failed to open “alsa” [alsa]; Error opening ALSA device “hw:5,0”; snd_pcm_hw_params() failed: Input/output error”. Anything I could do to fix that?