Hi!
I'm posting my TODO entry for a backlight control issue on my Toshiba T110.
--------------------------------------------------
ARCH LINUX on TOSHIBA T110-10K
Things to fix
##################################################
# 1 Cant change brightness through ACPI.
Workaround: setpci
-setpci -s <vga controller ID> F4.B=<hex value> functions in 'blight' script
-actkbd to map 'blight' to keyboard combo.
Fix: None
Maybe altering DSDT helps. Vendor DSDT checks for OS and puts a value
(03E8 '1000' for Linux and 07D1 '2001' through 07D6 '2006' for different Windows OS's) into a field 'OSY'.
In various parts of the table this value is compared to "Windows" values
and seems to disable various low-level functionality;
"IF(LLESSEQUAL(OSY, 07D1))"
(That is, "If Your OS is Less than Windows you're screwed".
)
------------------------------------------------
The script 'blight' (less than elegant )is:
Code:
#! /bin/bash
#
# ~/shcripts/blight:
#
# One script for all backlight needs.
# Assumes the VGA controller ID is 0:02.1 (check with 'lspci | grep VGA')
#
# Usage: blight [TASK]
#
# TASK
# inc - increase backlight by 5
# dec - decrease backlight by 5
# max - set backlight to maximum value 255
# min - set backlight to minimum value 1
#
function setlight () {
sudo setpci -s 00:02.0 F4.B=$1
}
function inttohex() {
echo $(echo "obase=16; $1" | bc)
}
CURRENTLEV=$(cat ~/shcripts/blight.level)
declare -i CURRENTLEV
if [ $# -eq "0" ] # No arguments.
then
echo "Current backlight level is" $CURRENTLEV "/ 255"
exit
fi
TASK=$1
if [ $TASK == "inc" ]
then
declare -i DESIREDLEV
DESIREDLEV=CURRENTLEV+5
if [ $DESIREDLEV -gt 255 ]
then
echo "Illegal value"
exit
fi
HEXVAL=$(inttohex $DESIREDLEV) #$DESIREDLEV
setlight $HEXVAL
echo $DESIREDLEV > ~/shcripts/blight.level
exit
fi
if [ $TASK == "dec" ]
then
declare -i DESIREDLEV
DESIREDLEV=CURRENTLEV-5
if [ $DESIREDLEV -lt 0 ]
then
echo "Illegal value"
exit
fi
HEXVAL=$(inttohex $DESIREDLEV)
setlight $HEXVAL
echo $DESIREDLEV > ~/shcripts/blight.level
exit
fi
if [ $TASK == "max" ]
then
setlight FF
echo "255" > ~/shcripts/blight.level
exit
fi
if [ $TASK == "min" ]
then
setlight 01
echo "1" > ~/shcripts/blight.level
exit
fi
echo "Unrecognized task" "$1"
exit
The workaround is functional but slow when altering backlight quickly. For example, I have mapped 'blight inc' and 'blight dec' to CTRL+UP and CTRL+DOWN respectively. When holding these keys down to dim up/down the backlight it lags behind somewhat.
The real problem, however, is that I can't use the ACPI functions meant to handle this. The keyboard shortcuts that are supposed to dim the screen (and they supposedly do on Windows OS's) actually writes values to the filesystem ACPI interface files, but this has no physical effect.
-Manually echoing values into those files gives no other results.
-The toshiba_acpi module refuses to load (it's a Phoenix BIOS)
-The omnibook module (loaded in a gazillion different ways/modes) adds ACPI interface files that have even less connection to reality. (They can't even report the current state of the AC/Battery.)
_________________________________________
Hope someone can give some input to this!
Thank you!