Brightness on external monitors without OSD.
Posted: Thu Feb 28, 2013 1:57 pm
If your Fn brightness keys work on a Linux laptop, you are a very lucky person. Normally it requires either the 'Brightness' applet to be put into your panel or xbacklight commands to be bound to keyboard shortcuts in order to be able to change brightness on a Linux machine. Even these two solutions don't work if you happen to have an external monitor attached to a laptop, it only affects the brightness on the laptop itself. You can obviously adjust this brightness with the screens OSD, but these are so annoying I hate using them. This behaviour has always bugged me and finally I have found a workround for it.
First of all you need xrandr to be installed. This is part of the package 'x11-server-utils' that is available for install through the package/software manager (if you don't already have it). If you have the package then run the command:
I get these results:
So my monitors are called LDVS1 and HDMI1.
So now in order to adjust the brightness for HDMI1 (the external monitor) I need the following command:
Or
In this command 1.0 is maximum brightness and 0.8 is 80% of maximum brightness - I find this is all I need.
Of course trying to remember those commands is not all that user friendly so I suggest you create keyboard shortcuts with those commands in them.
Select 'Keyboard' from the main menu (there are two entries - choose the first). For the 'Name' use something like 'Monitor Brightness Day'. For the command use the first xrandr command above and choose a keyboard sequence that means something to you. Create another command for 'Monitor Brightness Night' and use the second xrandr command above. Obviously you can choose the percentage brightness that suits your monitor - 80% and 100% work for me.
Now all you need to do to switch between day and night brightness is to invoke one or other of the two keyboard shortcuts you just created.
First of all you need xrandr to be installed. This is part of the package 'x11-server-utils' that is available for install through the package/software manager (if you don't already have it). If you have the package then run the command:
Code: Select all
xrandr -q | grep -w connected
Code: Select all
LVDS1 connected 1366x768+1280+256 (normal left inverted right x axis y axis) 344mm x 194mm
HDMI1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
So now in order to adjust the brightness for HDMI1 (the external monitor) I need the following command:
Code: Select all
xrandr --output HDMI1 --brightness 1.0
Code: Select all
xrandr --output HDMI1 --brightness 0.8
Of course trying to remember those commands is not all that user friendly so I suggest you create keyboard shortcuts with those commands in them.
Select 'Keyboard' from the main menu (there are two entries - choose the first). For the 'Name' use something like 'Monitor Brightness Day'. For the command use the first xrandr command above and choose a keyboard sequence that means something to you. Create another command for 'Monitor Brightness Night' and use the second xrandr command above. Obviously you can choose the percentage brightness that suits your monitor - 80% and 100% work for me.
Now all you need to do to switch between day and night brightness is to invoke one or other of the two keyboard shortcuts you just created.