3

I'm using a Dell XPS13 on Ubuntu 18.04 and I'm able to use the screen brightness keys just fine when I'm using the default desktop environment (Unity? GNOME?). However, when I log in with i3 the keys do not adjust screen brightness anymore.

I've tried following a different guide for adding keybindings through an i3 config but it relies on using xbacklight, which when I install and use directly is unable to adjust my screen brightness.

How do I port this functionality over from the default desktop environment over to i3?

2 Answers2

3

Thanks to @DKBose for pointing me to https://cialu.net/brightness-control-not-work-i3wm/ , I was able to install an application for adjusting screen brightness and mapping the original screen brightness keys to calling it.

Start by cloning the repo locally, building, and installing it:

git clone https://github.com/haikarainen/light.git
cd light
make
sudo make install

Then add keybindings to call light and adjust screen brightness to your i3 config:

# my i3 config is at ~/.config/i3/config
# increase screen brightness with notification
bindsym XF86MonBrightnessUp exec "light -A 5; notify-send 'brightness up'"
# decrease screen brightness with notification
bindsym XF86MonBrightnessDown exec "light -U 5; notify-send 'brightness down'"

Reload your i3 config to have the changes take effect. By default this is $mod+Shift+c but look for the command reload in your config to see what this is mapped to for you.

2

This one helped me on my XPS13: Display brightness cannot be adjusted 18.04

  • changed the content of /etc/default/grub by adding video.only_lcd=0 to GRUB_CMDLINE_LINUX_DEFAULT
  • updated grub with sudo update-grub