sleep 5 is WAY too short. Try extending it to 30 or even 60 seconds. There may be more elegant ways, but I found the optimal delay this way:
- Put ( sleep 5; mpc consume off ) & in your /etc/rc.local
- Reboot Volumio (I’m on an RPi with I2S DAC)
- SSH into Volumio as soon as possible
- Type this into your terminal: while true; do mpc status; sleep 1; done
- When consume mode changes from OFF to ON, hit Ctrl-C
- Count the number of lines consume mode was OFF, and add at least that amount of time to “sleep 5” in your /etc/rc.local
- Test it!
With my RPi hooked up to an external monitor, I noticed that consume mode would revert to “on” the exact moment I received the following message:
pi@volumio:~$ [ 60.637074] bcm2835-cpufreq: switching to governor performance
That gave me an upper bound (60 seconds) for how long to set the sleep delay. I was able to reduce the delay to 28 seconds for my particular setup. YMMV. This is a known problem that will hopefully be fixed in future updates.
HTH - Adrian