I have ASUS G551JM with the same problem (the Fn+F5 and Fn+F6 keys do not even get registered by the acpi_listen
).
I found the following workaround solution: to map another pair of Fn+ keys into a custom brightness script. I choose to use Fn+C
and Fn+V
.
I also suggest the following script of mine, to do the actual adjustments of the brightness. The script does it in exponential increments rather than linear, so it requires many less key presses to reach the desired luminosity:
#!/bin/bash
USAGE="Usage: `basename $0` +|-|max|<number>"
hwpath="/sys/class/backlight/intel_backlight"
if [ "$1" == "+" ]; then
maxbright=`cat $hwpath/max_brightness`
bright=`cat $hwpath/brightness`
bright=`echo "print(int(min($maxbright,$bright + max($bright * 0.5, 1))))" | python`
else
if [ "$1" == "-" ]; then
bright=`cat $hwpath/brightness`
bright=`echo "print(int(max(0,$bright - max($bright * 0.33, 1))))" | python`
else
if [ "$1" == "max" ]; then
maxbright=`cat $hwpath/max_brightness`
bright=$maxbright
else
if ! [[ "$1" =~ ^[0-9]+$ ]] ; then
echo "`basename $0` version 0.1"
echo $USAGE >&2
echo "+|- brighter/darker"
echo "max maximum luminosity"
echo "<int> set specific light intensity"
exit 1
else
bright=$1
fi
fi
fi
fi
echo $bright | tee $hwpath/brightness"
The Bash script needs a Python. Put it somewhere in the path (I name it bright
), and use it simply by bright -
, bright +
, bright 50
(very dim screen, good for night work) or bright max
.
If you want to use the script as a non-root user, please change the permissions for the /sys/class/backlight/intel_backlight
; the best place to do it is via the upstart job, since upstart jobs are executed by the root.
This script is compatible with at least 3 ASUS models: ASUS N56VZ, ASUS G551JM and ASUS P53E. I guess it should be compatible with most of the other ASSUSes out there, and after a minor modification, with all other notebook brands that expose screen brightness somewhere in the /sys
file system tree.
acpi_backlight=vendor
orpcie_aspm
instead ofacpi_osi
, but neither worked for me. I guess it's just a matter of minor hardware differences?! Anyway, I'm glad it works! – Samy Dindane Apr 02 '15 at 22:56