How can I reach over 100% volume with a keyboard shortcut?
Solution 1
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
Solution 2
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).
Solution 3
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%
Solution 4
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.
Solution 5
Warning: I'm using Linux Mint, which is similar to but different from Ubuntu. I believe Ubuntu has an equivalent keyboard shortcuts dialog, but it might look or work slightly differently from how I describe below.
Wow, lots of answers here, but not the simplest one! You can solve everything with just the built-in (GUI) Keyboard Shortcuts dialog.
For the full explanation see https://superuser.com/questions/1277724/how-to-change-the-binding-of-keyboard-volume-dial-linux-mint-mate, but here's the quick version:
- Go to Keyboard Shortcuts through the menu
- Add a new shortcut
- Name it and set the action to
pactl set-sink-volume @DEFAULT_SINK@ +10%
(or-
for the "turn down the volume" action) - Click apply to save it, then click on the "Shortcut Column" for its row. Type whatever key you want to bind the action to (I have a volume knob on my keyboard so I bound the actions to that, but you could use any key combo you want)
- Repeat the above for turning the volume down
Congratulations: with a few seconds at a friendly system dialog you just configured volume "up to 150%" for any key combination you want!
Related videos on Youtube
jsantander
Updated on September 18, 2022Comments
-
jsantander over 1 year
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 ?
-
Knowledge Cube almost 13 yearsFrom this Ubuntu Forums post, you can use
amixer
in a script to control volume. I would try reading through its man page to see exactly what you can do with it. -
jsantander almost 13 yearsthanks for the useful information. this is pretty close actually. i can set the hotkey Fn+ up/down (which is my default volume control) to bring the volume control, and then with left/right arrows to adjust it also beyond 100%. now i get it. it is a 2 step thing, we are getting closer. anyway it could be just one step? say to set a hotkey to a sequence of commands?
-
Knowledge Cube almost 13 yearsActually, after a bit of AskUbuntu browsing, I saw an answer to another question with a link to a PulseAudio volume control script. That might be worth taking a look at.
-
jsantander almost 13 yearsthanks again! but i'm not sure what the script does and how to use it in my advantage... i'm totally not a programmer...
-
jsantander over 12 yearsi 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.
-
Kesavan Muthuvel about 12 years1) goto bash terminal 2) enter the following command
pacmd set-sink-volume 0 102400
3) check that your volume increases or not -
anukul about 8 yearsIs there any limit to how high the volume can be set through
pactl
? -
Michael Mantion over 6 yearsThank 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
-
Aryeh Beitz over 6 yearsthanks, this really helped. I reassigned the volume up and down buttons on the keyboard to this and it works great
-
Mina Michael about 6 years@anukul nope! 400% works, but you start hearing very clear distortion in the sound
-
detly about 6 yearsJoel Ostblom's answer should probably supercede this one.
-
Dmitry Senkovich over 5 years@Wagner Pinheiro works, fantastic! you made by day, thank you very much!
-
Fabian Röling over 4 years"
@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. -
Winampah about 3 yearsThank 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 <Shift>+Keypad8 for volume up, this allows me to press the hotkey with only one hand, very practical. Thanks again!
-
AshotN over 2 yearsThis is great. Thank you