Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Somtimes some sound/movie/music on my Ubuntu_12.04 system is at a very low volume by itself. Henceforth I increase the volume of the sound output. I can use the following setting (see screenshot) enter image description here

It seems therefore that pulseaudio is able to increase the volume beyond the maximum that appears possible by merely using the "increase-volume" buttons of the machine. My questions is how I can adjust Pulseaudio to allow a greater range or a higher max volume increasing???

Especially with some audio material that is at a very low volume to start with it would be nice to be able to swiftly increase the output volume (powerup) to a higher setting than maybe necessary to other -already quite loud- material.

share|improve this question
add comment

5 Answers 5

up vote 10 down vote accepted

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:

share|improve this answer
    
I have used pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo 150% - since I could not succeed yet with pacmd. Anyhow the idea already helped a lot. In this way it is possible to increase the output level to more than the 100% or 153% which the GUI allows, thank you. –  humanityANDpeace Nov 21 '12 at 6:19
2  
Your great answer allowed to set the volume to greater values (like 781% amplification) which is great. Part of my question is also how to change the scale originally used so that it is not from 0% to 100% (via GUI) but from 0% to 781%. Any additional infor how to achieve this, maybe? it would be additionally great! thank you –  humanityANDpeace Nov 21 '12 at 6:23
    
No idea how to increase this value for the volume slider. It may be hard-coded, hence cant be changed other than patching the source and recompiling. –  Takkat Nov 21 '12 at 7:11
add comment

I inserted the following line into a shell script and set it to run at startup since my fathers laptop (12.04 32 bit) was not saving the max volume setting.

pacmd set-sink-volume 0 99999

if there is only one sound card it is probably index 0 and then you don't need to type out the full name. I see above that the value is based on 65536 being 100%. When I used 99999 i was shooting in the dark. 153% would actually be 100270 achieving the same result as using the gui.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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 $@
    
share|improve this answer
add comment

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 boost it by changing it to 200% for example.

I don't know if my command is any different from those mentioned above. I'd be happy to know the difference

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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