2

I've got a Precision 5510 running Ubuntu 16.10 with kernel 4.8.4. In unity, my function keys for brightness work correctly. But xbacklight commands don't do anything. xbacklight -get comes up empty. Is there a way to increase / decrease brightness through the command line? I need this for it to work in i3wm.

ashic
  • 383

2 Answers2

5

You may modify the value in /sys/class/backlight/{may vary}_backlight/brightness

example:

sudo nano /sys/class/backlight/intel_backlight/brightness

This tool does that https://github.com/multiplexd/brightlight then use it like this:

bindsym XF86MonBrightnessUp exec --no-startup-id brightlight -i 20
bindsym XF86MonBrightnessDown exec --no-startup-id brightlight -d 20
unil
  • 96
-1

I am using now i3wm with Ubuntu and i love it. I have a similar problem and i solved this adding this lines in my ~/.config/i3/config file:

# Sreen brightness controls
bindsym XF86MonBrightnessUp exec echo $((`cat /sys/class/backlight/intel_backlight/brightness` + 10)) | sudo tee /sys/class/backlight/intel_backlight/brightness
bindsym XF86MonBrightnessDown exec echo $((`cat /sys/class/backlight/intel_backlight/brightness` - 10)) | sudo tee /sys/class/backlight/intel_backlight/brightnes

and add the /etc/suduers.d/tee file with this:

myuser ALL=(ALL) NOPASSWD: /usr/bin/tee

where myuser is really my user name. My laptop is an HP Spectre x360 with Intel graphics, I know that i need to check the min and max limits but at least in my machine ... no problems ...

Yonsy Solis
  • 882
  • 2
  • 8
  • 20