This makes it much easier to set your screen’s brightness to a comfortable level at each time of the day, and to save energy.
(For Windows, see the very bottom of this post.)
On Linux, if you currently have no keyboard shortcuts for that available, a good way to create them is via ddcutil
. Once you have ddcutil
installed, have your displays’ properties printed in the command line by typing ddcutil detect
.
This should show you a list of parameters for each of the displays you have connected. For a display of your choice, try these commands:
ddcutil -n <Serial number> setvcp 10 - 5 # reduces brightness by 5 %
ddcutil -n <Serial number> setvcp 10 + 5 # increases brightness by 5 %
ddcutil -n <Serial number> setvcp 12 - 10 # reduces contrast by 10 %
ddcutil -n <Serial number> setvcp 12 + 10 # increases contrast by 10 %
ddcutil -n <Serial number> setvcp 10 0 # sets brightness to minimum
ddcutil -n <Serial number> setvcp 10 100 # sets brightness to maximum
If these commands all work, you can create in your desktop environment’s settings (e.g. KDE) custom keyboard shortcuts that execute these commands. Personally, with my two displays and with dedicated “Brightness up” and “Brightness down” keys (macros) on my keyboard, I am using combinations with the modifiers Alt
to address the secondary instead of the primary display, Shift
, to adjust contrast instead of brightness, and Control
to set an absolute value (0% or 100%) instead of going by increments.
Further notes:
Instead of addressing your displays via their serial number, you can also address your display via most other parameters shown in ddcutil detect
by using another option than -n
, e.g. via bus number or manufacturer name, but I’ve found that bus number is not persistent over the years, and manufacturer name (“Mfg id”) may contain spaces which may lead to problems.
A full list of all other possible vcp commands (the numbers after setvcp
) can be obtained through ddcutil vcpinfo
.
If you’re using a laptop, brightness adjustments for its internal screen are of course almost always a no-brainer.
On Windows 10 and perhaps 11 as well, you can apparently do the following:
Step 1: Press the Win + A to open the Action Center.
Step 2: Press Shift + Tab to select the brightness slider.
Step 3: Use the left and right arrow keys to adjust the screen brightness.
For windows users, check out Twinkle Tray! Tray icon with sliders for brightness and contrast for all connected monitors, as well as power buttons. May have support for keyboard shortcuts too, not sure.