Sound volume 100% on (re)boot

Dell Inspiron 7548 - Ubuntu MATE 16.04, every time I (re)boot my computer the sound volume is set to 100% which is way too much. I tried to fix it by setting the volume and then running:
alsactl store
So far this didn’t work. Any idea’s on how to solve this problem.

Thanks in advance

I can't say what is causing your volume problem. But I can suggest a quick hack to work around the problem until you find a more systemic solution. On the other hand, since it works, you may well be happy to live with this as a permanent fix.

Open Pluma text editor

Paste the following command into it:

amixer -D pulse sset Master 50%

(obviously, if you want the volume to be set at something other than 50%, you would need to change the percentage in the command accordingly)

Save the file as "sound-volume-reset.sh" in your home folder. Then close the file.

Open Caja and navigate to your newly created file

Right-click the file and select "properties"

Open the "permissions" tab and check the "allow executing file as program" checkbox

Close the "properties" dialog box

Now go to your system/preferences/personal menu and select "startup applications"

Click the "add" button

Enter something meaningful to you (or nothing) in the "name" field

For the "command" field, use the "browse" button to navigate to where you saved your file and select it

Enter what you want (or nothing) in the "comment" field

Click the "add" button to save and close the "add startup program" dialog box

Close the "startup applications preferences" dialog box.

Log out and then log back in. You should find the sound has been reset to 50%. This will happen every time you boot up/log in from now on.

Thanks a lot for the effort but I already did exactly as you outlined here but with different commands
pacmd set-sink-volume 0 27500 #This is equal to 45% pacmd set-sink-volume 1 27500 sudo alsactl store

As you say, this solution is not perfect so I’m still open for other suggestions on how to solve this.

Well, I would say, in terms of functional outcome it can be said to be “perfect”. It is only “imperfect” in the sense it has not fixed the problem at whatever systemic level it is first occurring. Which, admittedly, it would be good to sort.

Most importantly, with the additional step of putting it in a bash script as a start-up command, you don’t need to use the store command and so don’t need to be concerned if the store command is not working since the alsa-volume-reset command inside the bash script is re-invoked at every bootup/login of your system. I should say, I have tested the fix I posted and can confirm it automatically resets the volume to, in my case, 50% on every reboot/login. Meaning, of course, that you do not have to manually reset the volume following login.