Asus UL30VT LCD Brightness

Well I’m still using my Asus UL30VT laptop. I should really get a new one, but for now this is ok.

Since I’ve upgraded to Ubuntu 14.04 I had to rewrite my LCD brightness scripts. Here is a copy of them.

New file /etc/acpi/events/asus-backlight-down

event=video/brightnessdown BRTDN 00000087 00000000
action=/home/YOURUSERNAME/Scripts/asus-backlight-down

New file /etc/acpi/events/asus-backlight-up

event=video/brightnessup BRTUP 00000086 00000000
action=/home/YOURUSERNAME/Scripts/asus-backlight-up

New file /home/YOURUSERNAME/Scripts/asus-backlight-down

#!/bin/sh
#sudo setpci -s 00:02.0 F4.B=1
brightness=$(setpci -s 00:02.0 F4.B | tr ‘a-z’ ‘A-Z’);
echo “original brightness: ” $brightness
decbrightness=$(echo “ibase=16; $brightness” | bc)
echo “original brightness in dec: ” $decbrightness
newbrightness=$(expr $decbrightness – 30)
if [ $newbrightness -lt 30 ]
then
newbrightness=1
fi
echo “new brightness: ” $newbrightness
hexbrightness=$(echo “obase=16; $newbrightness” | bc)
echo “new brightness in hex: ” $hexbrightness
setpci -s 00:02.0 F4.B=`printf $hexbrightness`;

New file /home/YOURUSERNAME/Scripts/asus-backlight-up

#!/bin/sh
#sudo setpci -s 00:02.0 F4.B=99
brightness=$(setpci -s 00:02.0 F4.B | tr ‘a-z’ ‘A-Z’);
echo “original brightness: ” $brightness
decbrightness=$(echo “ibase=16; $brightness” | bc)
echo “original brightness in dec: ” $decbrightness
newbrightness=$(expr $decbrightness + 30)
if [ $newbrightness -gt 225 ]
then
newbrightness=255
fi
echo “new brightness: ” $newbrightness
hexbrightness=$(echo “obase=16; $newbrightness” | bc)
echo “new brightness in hex: ” $hexbrightness
setpci -s 00:02.0 F4.B=`printf $hexbrightness`;

Dunno if I really needed these, but I also chmod +x those scripts in the home directory and modified /etc/default/grub line to:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_backlight=vendor”

ecks90

Leave a Reply

Your email address will not be published. Required fields are marked *