When I reboot, the volume on the PulseAudio sinks is set to 100%. I know how to change the volume using pactl set-sink-volume, but that is only set temporarily. I could write a script that is run at startup, but it will not be applied if I connect a sink later. (i.e. a Bluetooth speaker)
Is there a config file where I can set the default volume that is given to a device when it is first loaded by PulseAudio? Or even the master volume at startup?
Clarification: The application is for a headless linux box, so the system shouldn't have to be rebooted and should be able to accept new devices without having to connect via ssh to adjust volumes, etc.
With PulseAudio 8.0 on Ubuntu 16.04 and a single sound card, you can set the default master volume to 50% with the following file. By including the system default you don't have to worry about changes in the distribution's defaults.
If you have multiple cards, replace the index number with the name since order is not guaranteed. In addition, if you want to adjust the volume determine the "base volume" which represents the max and calculate the equivalent percentage.
For example, to specify the default volume of 70% for card1 the line would become: