ALSA only, no pulseaudio: There is no "system sound volume", all you can do is set the hardware volume that applies to all sounds. First, find the correct card with aplay -l
. Say you are using card 2. Then,
amixer -c2 set Master 100%
will set the master hardware volume to 100%. You can also increase or decrease it:
amixer -c2 set Master 2%+
amixer -c2 set Master 2%+
If you are running Pulseaudio (very likely if you have "system sounds"): You can set the volume both for "sinks" (something that corresponds to some set of speakers, roughly the same as the ALSA Master volume), or for applications (confusingly, those are described as "sink-inputs" for volume control).
However, system sounds are very short, so the default volume for those comes from a database entry called sink-input-by-media-role:event
in the stream database, which is in ~/.pulse/*-stream.tdb
on my Debian system. This is a "trivial data base" format, and tdbtool
from Samba can be used to manipulate it from the commandline. However, the key content is in binary (18 bytes), so the next step would be to find out the format (guess or read pavucontrol
source), which I didn't do. Then you can use something similar to
tdbtool ~/.pulse/*-stream.tdb store sink-input-by-media-role:event binary_data
to change it.
media.role=even
property, that are supposed to represent sounds emitted by the "system" (desktop) for events (e.g. receiving mail). Not that it gets used much ... – dirkt Oct 14 '20 at 16:52