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.

In Unity I use my ThinkPad hot keys to change the volume. I need to know the command that these keys run so that I can bind it in my window manager.

I have tried using amixer but could not change the volume through command line

amixer set Master 10%- amixer: Unable to find simple control 'Master',0

amixer scontrols: Simple mixer control 'IEC958',0

amixer set 'IEC958' 50%- amixer: Invalid command!

So obviously this is not what Unity is running. I have tried changing the default sound card as well but that didn't help.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

so basically they're not simple keybinding->command process, MediaKeys give you scancode which is interpreted by X. Some reading for you https://help.ubuntu.com/community/MultimediaKeys

share|improve this answer
    
I guess this must be right because nothing I've tried affects the volume. –  user2787904 Oct 21 '13 at 10:44

The following command:

pactl set-sink-volume 0 50%

will set the volume at 50%. To increase the volume with 10% you can use:

pactl set-sink-volume 0 -- +10%

To decrease the volume with 10% you can use:

pactl set-sink-volume 0 -- -10%
share|improve this answer

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.