0

This is similar question as Set volume from terminal but I want to set system sound volume (libcanbera system sounds) that is at 0 when I've first installed Fedora (the same was on Xubuntu).

Is it possible to set it to 100 from command line, the output of amixer scontrols is:

Simple mixer control 'Master',0
Simple mixer control 'Capture',0

no system

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.