LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-12-2010, 12:01 PM   #1
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45
Blog Entries: 1

Rep: Reputation: 16
Can't use certain ACPI functions on TOSHIBA T110-10K. (Attached workaround)


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!

Last edited by kopatops; 05-12-2010 at 12:02 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu Remix Netbook and Toshiba Satelite T110 riganta Linux - Laptop and Netbook 5 12-05-2009 09:47 AM
Some ACPI functions not working in LG E500 ANO1453 Linux - Laptop and Netbook 0 04-21-2009 12:47 PM
ACPI functions for XFce cwwilson721 Slackware 10 05-28-2006 03:59 AM
ACPI functions for users not available... Alf829 Linux - Laptop and Netbook 5 03-14-2004 07:33 AM
RedHat 9: How to use ACPI functions on a Toshiba Laptop? digsy Linux - Newbie 35 05-16-2003 11:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration