Volume change on boot


I have a hifiberry amp, all working fine apart from the hi volume. I have the volume on 1 and it’s still to loud.
I’ve been ssh’ing in everytime and reducing the volume with:

“amixter sset Master 70%” (and closing with sudo reboot rather than just turning power off)

this works fine accept I’d rather the command ran on boot.

What I’ve tried:

“alsactl store 1”


using @reboot in the crontab

Hoping someone can help?
Kind regards,


Can’t you use alsamxier ? If I change the volume in alsamxier it stays as it want it to – even after reboot or poweroff.

Thanks, I had a go with the alsamixer. Lowered the volume and pressed F4 to capture but “alas” it did not save the volume setting after reboot.

the settings.ini file looks like this…

output = hifiberry_amp

hash Set the startup volume of MusicBox
hash Values: from 0 to 100
mixer_volume = 1

output = alsasink
mixer = software

hash Optionally, you can use alsamixer. This enables you to use hardware mixers of$
hash Set the previous setting to:
hash mixer = alsamixer
hash And set the card and contol below. E.g.
hash card = 1

not sure if having two outputs selected helps but I seem to remember that hashing out “output = alsaink” stopped the local host loading up??


Sorry to bump.
Any ideas?

What would be a way to run a script/command on boot?


Hi Rob,
if you remove the value from mixer_volume, mopidy will not overwrite the stored alsamixer volume at startup (tested with pi and hifiberry amp+):

mixer = alsamixer
mixer_volume =
output = alsasink

enabled = true
card = 0
control = Master

Kind regards

The Pi Musicbox uses setsound.sh to set the volume level on every reboot. To ensure that the volume is set to your preference, you would change setsound.sh to include:

VOLUME=<your preference here>

…and then reference this value in:

# Set initial hardware volume
amixer set -c $CARD "$CTL" ${VOLUME}% unmute > /dev/null 2>&1 || true