1

I am using i3 window manager on ubuntu. My laptop has an AMD CPU and integrated GPU and class is amdgpu_bl0. please help me with the command to change the brightness so that I can bind that in config. xbacklight -inc 20% does not work I am getting the error "No outputs have backlight property"

vicky
  • 11
  • 1
  • 2
  • Try ybacklight: https://askubuntu.com/questions/1034305/brightness-problem-ubuntu-18-04-lts/1041632#1041632 That fixed a similar problem for me. xbacklight has stopped working for me at some point, if I recall correctly because of some changes in the dev file system or the drivers that populate it, under Ubuntu. – mfg Mar 16 '21 at 21:20

2 Answers2

1

You may have better luck with the tool light. It works also where xbacklight doesn't. It is available in the standard ubuntu software repositories of at least version 20.10, so you can install it with

sudo apt install light

If that does not work on your Ubuntu version, you can install it according to the instructions of the application's Github page.

It is a great tool. You can set a minimum brightness so that you will never fully darken the screen. I use it with much satisfaction on the default Ubuntu desktop to increase/decrease the brightness in smaller steps, with the commands

light -U 1
light -A 1
vanadium
  • 88,010
0

I wanted to share my positive experience with "light".

After installing it as written in a previous post with

sudo apt install light

To get the current value run:

light -G

To set the brightness value, use the addition "-v3" to receive verbose messages.

light -S 100.00 -v3

In my case I had 2 errors:

  1. I was missing the folder/subfolder for my video device (I created them using the "mkdir" command)
  2. Every time I rebooted, I lost writing permissions on the file

For point "2", I added user to “video” group to enable writing permissions

sudo usermod -aG video user

Since I had to give this computer to my parents, and that the brightness goes off every time I charge the battery, I created a script to set the brightness to 100% every 3 seconds (script can be enhanced by checking the charging status, etc...). Script is launched at startup using "cron", since init.d and rc.local methods were not working for me

Create script

#! /bin/sh

while true do current_brightness=$(light -G)

if ! [ "$current_brightness" = "100.00" ] then light -S 100.00 fi

sleep 3 done

Launch script at startup

crontab -e
@reboot /home/user/Brightness_100.sh