54

sometimes the sound of videos isn't enough for me. so i reach the sound indicator , over sound preferences and change it to a level higher than 100%. the question is how can i do it from the keyboard? now i can control the volume from the keyboard but it's maximum is 100%. is there a way to do that?

EDIT 1: how to use amixer and scripts to do it? (as Lyrositor suggested)

EDIT2: the closest answer , as Jo-erland, suggested is to set a hotkey to bring up the gnome-volume-control, and then to use left and right arrows to change volume also beyond the 100% mark.

any other suggestions, to make this 1 step only? is it possible to set a hotkey to do a sequence of commands ?

suli8
  • 2,975

14 Answers14

49

try running these commands (via alt+f2 or terminal):

volume to 150%:

pactl set-sink-volume 0 150%

to return the volume to 100% simply:

pactl set-sink-volume 0 100%

(video demonstration of those commands here)


Note that the argument after set-sink-volume specifies your sound device. If you have hdmi you will likely have 2 devices and you need to check for your device id using alsamixer or pacmd list-sinks or even pactl list sinks.

If it doesn't work, try this script.

If it works, manually set a keyboard shortcut for these commands through the application 'keyboard shortcuts' (on ubuntu 11.04: key 'super' -> type 'keyboard shortcuts' -> button 'add').

The command pactl belongs to the package "pulseaudio-utils' to install it use the command:

sudo apt-get install pulseaudio-utils
842Mono
  • 9,790
  • 28
  • 90
  • 153
  • Is there any limit to how high the volume can be set through pactl? – anukul Apr 20 '16 at 14:53
  • @anukul nope! 400% works, but you start hearing very clear distortion in the sound – 842Mono Mar 01 '18 at 15:52
  • Joel Ostblom's answer should probably supercede this one. – detly Mar 12 '18 at 05:22
  • @Wagner Pinheiro works, fantastic! you made by day, thank you very much! – Dmitry Senkovich Jan 10 '19 at 17:08
  • "@DEFAULT_SINK@" can be used to select the current default audio output device (so I now bind the volume up key to "pactl set-sink-volume @DEFAULT_SINK@ +20%"). That way you don't need to consider anything like HDMI, headphones, etc. and can always use the same command. That information should probably be integrated into the answer. I don't do it myself, because I don't know if removing the entire paragraph about audio devices is a good idea or if it's maybe still used for something else. – Fabian Röling Jan 02 '20 at 02:43
17

IMO pactl set-sink-volume 0 +10% is a good choice too if you want key that slowly adds volume beyond 100% limit (I use Ctrl + VolumeUp for that).

Pablo Bianchi
  • 15,657
8

I figured that answers (currently all other answers) that suggest pactl set-sink-volume 0 ... don't work (or stop working) on systems with more than one audio devices, e.g. as soon as you connect to a hdmi monitor. we should use @DEFAULT_SINK@ instead of 0 to refer to active audio device.

so here is my setup on ubuntu 14.04 with gnome 3.10 and should work on unity too:

sudo apt-get install pulseaudio-utils

go to keyboard shortcuts which is under System → Preferences → Shortcuts → Custom Shortcuts → +

Name: VolPlus10P Command: pactl set-sink-volume @DEFAULT_SINK@ +10%

Assign Ctrl + Volume Up (if you have dedicated volume key on your keyboard or use your own combination ) this will increase your volume 10% to unlimited

Name: VolSet150P Command: pactl set-sink-volume @DEFAULT_SINK@ 150%

Assign Super + Volume Up (if you have dedicated volume key on your keyboard or use your own combination ) this will set your volume to 150%

thezeroth
  • 141
  • 1
    Thank you, yah my device was 1 but your solution is optimal. I just wish the standard volume keys could be changed to this command. LOL I had a really low youtube video set it to 500% and could actually hear it. Thanks – Michael Mantion Oct 05 '17 at 17:49
  • Thank you! Confirmed to work on MX Linux (Debian) Oct-2020 release with Xfce. The nice thing about your solution is that it allows the volume to keep rising even past the 100% maximum. With Xfce it's possible to assign hotkeys directly pointing to these commands, currently I'm using +Keypad8 for volume up, this allows me to press the hotkey with only one hand, very practical. Thanks again! – Winampah Mar 14 '21 at 18:40
6

I simply add the following piece of code in my start up script & add that script in my start up application by Menu >> Applications >> Other >> Startup Applications.

For this first you need to install pulseaudio-utils by sudo apt-get install pulseaudio-utils

#!/bin/bash
# start.sh - commands to run when OS starts

#Increase Audio 
pacmd set-sink-volume 0 102400

Let me know , if this solves your question.

  • i did create the file, gave it permission, add it to startup applications. but nothing changed. with keyboard i cannot reach above 100%. pulseaudio-utils is installed. – suli8 Jan 08 '12 at 23:29
  • goto bash terminal
  • enter the following command
  • pacmd set-sink-volume 0 102400 3) check that your volume increases or not

    – Kesavan Muthuvel Feb 21 '12 at 16:21