Page 1 of 1

AMD brightness control with Catalyst driver

Posted: Fri Feb 28, 2014 10:03 pm
by Titan
I have an AMD A8 apu and none of the backlight solutions such as xbacklight seemed to work.

After i tried the options on the backlight wiki page i almost gave up until i found a script by a user called 'MadNoob'
It works with version 13.4 of Catalyst, and im currently using xorg 114 (holding back xorg for compatibility reasons)

link to forum post : https://bbs.archlinux.org/viewtopic.php ... 5#p1272685

Heres the script

Code: Select all

#!/bin/bash
screen="acpi_video0"
tries=20
brightnessMaxLevel=$(cat /sys/class/backlight/$screen/max_brightness);
brightnessActualLevel=$(cat /sys/class/backlight/$screen/actual_brightness);
brightnessFile="/sys/class/backlight/$screen/brightness"
i=0
case "$1" in
	"+")
		if [ "$brightnessActualLevel" -lt "$brightnessMaxLevel" ]; then
			brightnessNewLevel=$(($brightnessActualLevel+1));
			while [ "$i" -ne "$tries" ]; do
				echo $brightnessNewLevel > $brightnessFile;
				i=$(($i+1));
			done
		fi
	;;
	"-")
		if [ "$brightnessActualLevel" -gt "1" ]; then
			brightnessNewLevel=$(($brightnessActualLevel-1));
			while [ "$i" -ne "$tries" ]; do
				echo $brightnessNewLevel > $brightnessFile;
				i=$(($i+1));
			done
		fi
	;;
	"set")
			while [ "$i" -ne "$tries" ]; do
				echo $2 > $brightnessFile;
				i=$(($i+1));
			done
	;;
	"show")
			echo $brightnessActualLevel
	;;
esac
Commands

sh modify-brightness + | Increase brightness level
sh modify-brightness - | Decrease brighness level
sh modify-brightness set 3 | set level (any integer level value supported by your monitor)
sh modify-brightness show | show actual level

Even though this is not my own script Its the only thing that worked for me, and if anyone else has AMD graphics and this problem I hope it works for you.

Re: AMD brightness control with Catalyst driver

Posted: Sat Mar 01, 2014 8:32 am
by elixir
Good find and helpful post my friend!

Re: AMD brightness control with Catalyst driver

Posted: Sun Mar 02, 2014 8:28 am
by machinebacon
For a driver-independent solution try:

Code: Select all

xrandr |grep connected
# check which screen you want to work with, for example LVDS1
xrandr --output LVDS1 --brightness 0.8
# the 0.8 means 80% below the normal value (1.0)
This does only work in X though.

Re: AMD brightness control with Catalyst driver

Posted: Mon Mar 03, 2014 5:13 pm
by Titan
@ machinebacon

Thats brilliant!, i tried different values not expecting anything higher than 1.0 to be accepted but to my surprise setting the value 3.0 makes the screen incredibly bright.

Im going to assume that having xrandr set to anything above 1.0 for long periods of time may damage my screen though.

Re: AMD brightness control with Catalyst driver

Posted: Mon Mar 03, 2014 5:38 pm
by machinebacon
Not sure about that. If you want a CLI frontend to this, check http://www.linuxbbq.org/bbs/viewtopic.php?f=15&t=1103 ;)