Categories
Uncategorized

Screen brightness control on i3wm for Lenovo X240 (Ubuntu)

First ensure that you have the right permissions to write to the device by adding a new rule for udev (create a new file like /etc/udev/rules.d/99-backlight) with these lines:

ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="leds", RUN+="/bin/chgrp video /sys/class/leds/%k/brightness"
ACTION=="add", SUBSYSTEM=="leds", RUN+="/bin/chmod g+w /sys/class/leds/%k/brightness"

You’ll have reboot your system for the changes to take effect.

Now you need to add you user to the video group.

You’ve to install the tool light :

sudo apt install light

And finally you have to add this to your i3wm config

bindsym XF86MonBrightnessUp exec light -A 10
bindsym XF86MonBrightnessDown exec light -U 10
Categories
Uncategorized

How to set the brightness of your monitor in Ubuntu 20.04

xrandr --output <output> --brightness 0.5

Use xrandr --listmonitors to get the name of your monitor

From: https://www.reddit.com/r/i3wm/comments/cd69ew/i3_and_brightness_on_ubuntu_1904/ets6ee2/