AMD brightness control with Catalyst driver

User avatar
Titan
なまいき
Posts: 407
Joined: Sat Oct 20, 2012 7:12 pm
Location: UK
Contact:

AMD brightness control with Catalyst driver

Unread post by Titan » Fri Feb 28, 2014 10:03 pm

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.
* Be fat, be as fat as you fucking please, just don't sit next to me on an aeroplane.
* "The sun never sets on the British Empire...." "Yeah, well, the sun never sets on my asshole!!"
* I am an "old skool" administrator who has been managing UNIX and Linux systems since the early 80s <-- big fkin lol

User avatar
elixir
Weight Watcher
Posts: 357
Joined: Fri Feb 21, 2014 8:25 am

Re: AMD brightness control with Catalyst driver

Unread post by elixir » Sat Mar 01, 2014 8:32 am

Good find and helpful post my friend!
Out of the corner of your eye you spot him... Shia LaBeouf.

https://www.youtube.com/watch?v=o0u4M6vppCI

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: AMD brightness control with Catalyst driver

Unread post by machinebacon » Sun Mar 02, 2014 8:28 am

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.
..gnutella..

User avatar
Titan
なまいき
Posts: 407
Joined: Sat Oct 20, 2012 7:12 pm
Location: UK
Contact:

Re: AMD brightness control with Catalyst driver

Unread post by Titan » Mon Mar 03, 2014 5:13 pm

@ 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.
* Be fat, be as fat as you fucking please, just don't sit next to me on an aeroplane.
* "The sun never sets on the British Empire...." "Yeah, well, the sun never sets on my asshole!!"
* I am an "old skool" administrator who has been managing UNIX and Linux systems since the early 80s <-- big fkin lol

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: AMD brightness control with Catalyst driver

Unread post by machinebacon » Mon Mar 03, 2014 5:38 pm

Not sure about that. If you want a CLI frontend to this, check http://www.linuxbbq.org/bbs/viewtopic.php?f=15&t=1103 ;)
..gnutella..

Post Reply