This How To is specific to Plasma Desktop and will not work on other desktops. It probably could be adapted by putting the file in the correct directory.
Full credit where it is due: I actually got this from @abucodonosor aka: crazy on #openmandriva-cooker @ Freenode IRC.
Basically a simple script that resets volume setting upon logout, reboot, or shutdown. Thus this will be the volume every time you login. This works in Plasma5 desktop. I have not yet tested in other desktops.
Using any text editor create the file ‘~/.config/plasma-workspace/shutdown/pa.sh’. I’m using the editor ‘nano’ in this example you can use vi or whatever you are familiar with.
$ cd ~/.config/plasma-workspace/shutdown $ nano pa.sh
and in nano insert:
#!/bin/bash pactl set-sink-volume 0 20%
write the file with CTL+o then ENTER and close nano with CTL+x. Then make the file executable:
$ chmod +x pa.sh
Set volume to 100% and logout or reboot to test. Obviously you can use any value you wish in place of 20%.
Next I’ll show how to do this with a cool GUI that lets you select volume when you logout or reboot/shutdown.