adjust max possible volume in pulseaudio

Solution 1:

The maximal possible volume level we can obtain from sliding the volume control to more than 100% is approx. 153% above the normal peak limit. Provided we had set the ALSA volume with alsamixer to 100 these 100% are the level above which audio will be clipped or distorted. This also will happen when amplifying to 153% with the slider.

Nevertheless is is possible to further increase this level by setting the sink level using the follwing command in a terminal:

pacmd set-sink-volume <sink> <value>

Replace <sink> with your sink name or sink index as given from:

pacmd list-sinks

The lower limit for <value> obviously is 0, a linear volume of 100% is a value of 65536, anything higher will be further amplified. A value of 512000 will thus lead to an overamplification of 781%.

This is a very crude method to amplify sound output of varying level as overamplifying will lead not only to clipping and ugly distortion but may also damage your speakers.

Therefore it would be a better way to normalize your audio output. See the following question on how to do this with pulseaudio:

  • Automatically adjust the volume based on content?

Solution 2:

I tried this command:

pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo 150%

and it was very helpful. One can change the 150% to any value.

Solution 3:

Video Demonstration


I use

pactl set-sink-volume 0 100%

Where 0 is the sink number from pacmd list-sinks and 100% is the default unboosted volume. You can enter values above 100% to get audio boost (200% for example).

Solution 4:

Here is a little script to do the calculation and set volume for you (just pass the volume as an argument). For example: vol 105 will set the volume to 105%.

  • Create file

    $> file=/usr/bin/vol;sudo touch $file && \
    sudo chmod u+x $file && sudo chown $USER:$USER $file && \
    gedit $file
    
  • Copy and paste:

    #!/bin/bash
    SetPacmdSinkVol()
    {
        #default index of 0 - can be changed
        local mySinkIndex=0
        #if you want to ignore pacmd output
        local ignoreOutput=true
        local num=$1
        local vol=$((num * 655)); 
        vol=$((num * 36 / 100 + vol));
        echo -e "\033[0;32mVol - ${num}:${vol}\033[0;m"
        if $ignoreOutput; then
            pacmd set-sink-volume $mySinkIndex $vol > /dev/null
        else
            pacmd set-sink-volume $mySinkIndex $vol
        fi
    }
    SetPacmdSinkVol $@