Smooth backlight control for Intel based laptops on Linux

Hey guys!
This post is meant to get a smoother backlight control for Intel-based laptops on Linux. Some might know the jump to the lowest brightness caused when you try to control the brightness using the hotkeys. This post will help you in getting the desired behaviour (With an added advantage of having a smooth transition between brightness levels, if needed)

The following instructions apply for Arch Linux but can be applied to any distro.

Start by installing xbacklight:
```
# pacman -S xorg-xbacklight
```

Next, tell the ACPI video module to avoid adding its own backlight control by editing /etc/default/grub and making the following edit (Add the below to the end of the string, if other parameters exist):
```
GRUB_CMDLINE_LINUX_DEFAULT="acpi_backlight=native"
```

Reconfigure GRUB by issuing the following:
```
# grub-mkconfig -o /boot/grub/grub.cfg
```
Once that's done, use your Desktop Environment's keyboard settings to add two key shortcuts.

For example, in KDE, open System Settings > Shortcuts > Custom Shortcuts > Edit > New > Global Shortcut > Command/URL:

Key: Monitor Brightness Up. Command: xbacklight -time 0 -inc 1
Key: Monitor Brightness Down. Command: xbacklight -time 0 -dec 1

Tip: When your DE asks for the key to bind the command to, press the brightness control key
Tip: If you like having a transition between brightness levels, remove the "-time 0" argument to the commands

Once done, reboot your laptop. Once you've logged in, try the brightness controls. They should work as intended.

Thanks for reading!
Technohacker

Comments

Popular Posts