You are not logged in.

#1 2009-02-09 10:27:37

Akii
Member
Registered: 2009-02-05
Posts: 9

ACPI on Toshiba L300 | No change of AC power state

Hello,

I have a problem with ACPI on my Toshiba Satellite L300 Notebook. ACPI does not change the status AC online/offline when the computer runs on battery power. I tracked it down and came to the conclusion that a kernel module, ac, is causing the problem. Every ACPI related program I use checks the file /sys/class/power_supply/ADP0/online, which is always 1. The problem is rather difficult to explain: When I unplugg the powersource without reloading ac the above mentioned file does not change to 0. I also cannot echo 1 or 0 into the file (I/O Error).

This also could be a problem with HAL

[ich@Archbook ~]$ acpi -V
     Battery 0: Discharging, 89%, 01:46:56 remaining
     Battery 0: design capacity 4000 mAh, last full capacity 4000 mAh = 100%
  AC Adapter 0: off-line
     Thermal 0: ok, 56.0 degrees C
     Cooling 0: LCD 0 of 7
     Cooling 1: Processor 0 of 10
     Cooling 2: Fan 1 of 1
[ich@Archbook ~]$

In the example above it shows, that the AC Adapter is off-line but (and there is my problem) when I plug in the cable this status does not change to online.

Akii

sorry about my englisch

Last edited by Akii (2009-02-09 13:11:43)

Offline

#2 2009-02-10 14:13:24

jakobm
Member
Registered: 2008-03-24
Posts: 132

Re: ACPI on Toshiba L300 | No change of AC power state

I've got a Toshiba Satellite L350 and confirm this behaviour with kernel26 2.6.28.4-1.
HAL does not report a change, nor does the sysfs (/sys/class/power_supply).

Offline

#3 2009-02-10 15:07:39

mits
Member
From: Bucharest/Romania
Registered: 2008-01-10
Posts: 129

Re: ACPI on Toshiba L300 | No change of AC power state

I have same problem with Toshiba Satelite L300 1AM (x86_64 arch), power mangers - gnome, kde, xfce- don't change power profile when I plug/unplug cable, xfce4-power-manager-svn and gnome-powermanager is detecting when I plug/unplug cable but don't change profile (dimm screen and change cpufreq profile).
I made two scripts "powersave" and "performance", I made it executable with #chmod +x, and I run it manualy with (sudo) and two keyboard shortcut when I plug/unplug AC cable.
powersave

 #! /bin/bash
# Turn on power savings
  echo 5 > /proc/sys/vm/laptop_mode &
  echo 0 > /proc/sys/kernel/nmi_watchdog &
  echo 1 > /sys/devices/system/cpu/sched_mc_power_savings &
  echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor &
  echo 1500 > /proc/sys/vm/dirty_writeback_centisecs &
  #for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done &
  echo min_power > /sys/class/scsi_host/host0/link_power_management_policy &
  echo min_power > /sys/class/scsi_host/host1/link_power_management_policy &
  hal-disable-polling --device /dev/scd0 &
  xbacklight -set 20 &
  xrandr --output TMDS-1 --off &
  xrandr --output VGA --off &
  rmmod uhci_hcd &
  ethtool -s eth0 wol d &
  #echo 5 > /sys/bus/pci/drivers/iwl3945/0000:03:00.0/power_level &
  #echo '28 25 21 15 2' > /sys/devices/system/cpu/cpu0/cpufreq/phc_vids &

With that my power consumption is about 17-18 wats with xfce4-svn and wireless network.
and performance (with AC cable plugged in)

#!/bin/bash
#if on_ac_power; then
# Reset to normal settings
  hal-disable-polling --enable-polling --device /dev/scd0 & # or whatever your CD drive is
  xbacklight -set 100 &
  xrandr --output TMDS-1 --auto &
  xrandr --output VGA --auto &
  modprobe uhci_hcd &
  ethtool -s eth0 wol g &
#  echo 0 > /sys/bus/pci/drivers/iwl3945/0000:03:00.0/power_level &
 # echo '28 25 21 15 2' > /sys/devices/system/cpu/cpu0/cpufreq/phc_vids
  echo 0 > /proc/sys/vm/laptop_mode &
  echo 10 > /proc/sys/vm/dirty_ratio &
  echo 5 > /proc/sys/vm/dirty_background_ratio &
  echo 500 > /proc/sys/vm/dirty_writeback_centisecs &
  echo max_performance > /sys/class/scsi_host/host0/link_power_management_policy &
  #echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor &

I ask for help here:
http://bbs.archlinux.org/viewtopic.php?id=64157
but nothing.
I have problem too with "fn+f1; fn+2 fn+f4......fn+fn9" special keyboard.
Any one does know the problem and solution?

Last edited by mits (2009-02-10 15:08:16)

Offline

#4 2009-02-10 21:13:41

Wintervenom
Member
From: /home/wintervenom
Registered: 2008-08-20
Posts: 1,011
Website

Re: ACPI on Toshiba L300 | No change of AC power state

Perhaps you guys should make sure you don't have buggy DSDTs?

Last edited by Wintervenom (2009-02-10 21:17:57)


My [GitHub] and my [artwork].
Data is guaranteed to stay crunchy in milk.
Keep your _✍ hand strong.

Offline

#5 2009-02-11 18:18:02

mits
Member
From: Bucharest/Romania
Registered: 2008-01-10
Posts: 129

Re: ACPI on Toshiba L300 | No change of AC power state

When I plug/unpug cable

acpi -V

is reporting real status "charging/discharging" but power-managers (xfce4, gnome, kde) don't change power profile and screen brightness.
When I boot without AC cable pluged in power-managers detect that and change power profiles and is dimming screen brightness, but if I plug AC cable, no change.
I have acpid, pm-utils, hal (added as daemon) and dbus installed - Arch x86_64,  2.6.28-ARCH, intel Dual CPU T3200 @ 2.00GHz .
Someone know problem/solution?
Does any one how keyboard model I must set to be able to use Fn+f2...f4-f9?

Last edited by mits (2009-02-11 19:31:26)

Offline

#6 2009-02-12 15:07:24

Akii
Member
Registered: 2009-02-05
Posts: 9

Re: ACPI on Toshiba L300 | No change of AC power state

Indeed Wintervenom:
I have a buggy DSDT and I guess any toshiba L series has at least a similar bios. I looked into the matter a little but I came to the simplest sollution which works without compiling an custom dsdt-kernel:

Simply modify the "Powerbutton" to reload the module "ac" and here you go. (you could also write a script... well or get the dsdt fixed and compiled into the kernel...)

Perhaps I'll digg deeper into the dsdt matter once I'm enough bored or something like that wink

For people who want to build their custom DSDT and fix it: Search in the Gentoo wiki.

But personally I could kill M$ and Toshiba for producing this...

Mits: your problem is that all programs look at whether the ac cable is plugged in or not and not whether the battery is discharging. Just write a little script wink


Ah yes, before I forget that: The _OS string (or what ever) for "Linux" is ignored in DSDT so ACPI uses an interpreter:

(dmesg | grep ACPI)
...
ACPI: EC: Look up EC in DSDT
ACPI: BIOS _OSI(Linux) query ignored   # <-- GRRRR !!! I could kill them, AGAIN!! damn you Bill! #
ACPI: EC: non-query interrupt received, switching to interrupt mode
ACPI: EC: GPE storm detected, transactions will use polling mode
ACPI: Interpreter enabled         ### <-- there ^^ ###
ACPI: (supports S0 S1 S3 S4 S5)
...

So I guess fixing the DSDT should solve the problem. I thought about changing the dsdt that

Last edited by Akii (2009-02-12 15:15:14)

Offline

#7 2009-02-17 14:15:39

mits
Member
From: Bucharest/Romania
Registered: 2008-01-10
Posts: 129

Re: ACPI on Toshiba L300 | No change of AC power state

Why kde-powerdevil detect AC cable state, and change power profile only when i boot with/without AC cable, but don't detect/change when i plug/unplug AC cable with my system started up?
Is any problem with InsydeH2O BIOS on my Satelite L300 1AM?

Last edited by mits (2009-02-17 14:42:04)

Offline

#8 2009-02-25 15:30:49

RMOORE1
Member
Registered: 2009-02-25
Posts: 4

Re: ACPI on Toshiba L300 | No change of AC power state

Akii wrote:

Indeed Wintervenom:

Ah yes, before I forget that: The _OS string (or what ever) for "Linux" is ignored in DSDT so ACPI uses an interpreter:

(dmesg | grep ACPI)
...
ACPI: EC: Look up EC in DSDT
ACPI: BIOS _OSI(Linux) query ignored   # <-- GRRRR !!! I could kill them, AGAIN!! damn you Bill! #
ACPI: EC: non-query interrupt received, switching to interrupt mode
ACPI: EC: GPE storm detected, transactions will use polling mode
ACPI: Interpreter enabled         ### <-- there ^^ ###
ACPI: (supports S0 S1 S3 S4 S5)
...

So I guess fixing the DSDT should solve the problem. I thought about changing the dsdt that

The _OSI(Linux) is being made by the bios to ACPI. This is always ignored, there is nothing to do.

ACPI always "uses an interpreter". That is simply a fundamental part of ACPI.

Nothing to get excited about here.

Offline

#9 2009-02-25 15:36:20

RMOORE1
Member
Registered: 2009-02-25
Posts: 4

Re: ACPI on Toshiba L300 | No change of AC power state

From osl.c:

/*
* The story of _OSI(Linux)
*
* From pre-history through Linux-2.6.22,
* Linux responded TRUE upon a BIOS OSI(Linux) query.
*
* Unfortunately, reference BIOS writers got wind of this
* and put OSI(Linux) in their example code, quickly exposing
* this string as ill-conceived and opening the door to
* an un-bounded number of BIOS incompatibilities.
*
* For example, OSI(Linux) was used on resume to re-POST a
* video card on one system, because Linux at that time
* could not do a speedy restore in its native driver.
* But then upon gaining quick native restore capability,
* Linux has no way to tell the BIOS to skip the time-consuming
* POST -- putting Linux at a permanent performance disadvantage.
* On another system, the BIOS writer used OSI(Linux)
* to infer native OS support for IPMI!  On other systems,
* OSI(Linux) simply got in the way of Linux claiming to
* be compatible with other operating systems, exposing
* BIOS issues such as skipped device initialization.
*
* So "Linux" turned out to be a really poor chose of
* OSI string, and from Linux-2.6.23 onward we respond FALSE.
*
* BIOS writers should NOT query _OSI(Linux) on future systems.
* Linux will complain on the console when it sees it, and return FALSE.
* To get Linux to return TRUE for your system  will require
* a kernel source update to add a DMI entry,
* or boot with "acpi_osi=Linux"
*/

Offline

#10 2009-02-25 18:07:09

Akii
Member
Registered: 2009-02-05
Posts: 9

Re: ACPI on Toshiba L300 | No change of AC power state

Ok, but nevertheless it is not right that microsoft writes itself into the bios to prevent that any 3rd party software run correctly - and THAT is the thing that drives me crazy.

Fact is: I have a buggy DSDT. It is also a fact that Microsoft is responsible for it.

But Archlinux works pretty well even without recognizing my ac adapter properly so: who cares?

Offline

#11 2009-02-25 18:42:06

RMOORE1
Member
Registered: 2009-02-25
Posts: 4

Re: ACPI on Toshiba L300 | No change of AC power state

I'm not sure I fully understand. Isn't blaming the BIOS writer sufficient? Just what is MS responsible for?

Offline

#12 2009-02-25 20:24:37

mits
Member
From: Bucharest/Romania
Registered: 2008-01-10
Posts: 129

Re: ACPI on Toshiba L300 | No change of AC power state

I tested my laptop with gentoo - 2.6.23.gentoo-r8 kernel and dreamlinux with kernel-2.6.23 and no problem with AC adapter status and fn f6-f7 keys, but with that kernel my video card GMA 4500M and ext4 partition don't work.

Offline

#13 2009-02-26 20:01:56

Akii
Member
Registered: 2009-02-05
Posts: 9

Re: ACPI on Toshiba L300 | No change of AC power state

Rmoore: http://www.osnews.com/thread?230516

Just search the net for "DSDT Linux Microsoft"

Another "interesting" link, in german but perhaps you (and/or google xD) can translate it: http://www.golem.de/0704/51686.html

Last edited by Akii (2009-02-26 20:05:42)

Offline

#14 2009-02-27 16:02:52

RMOORE1
Member
Registered: 2009-02-25
Posts: 4

Re: ACPI on Toshiba L300 | No change of AC power state

The current versions of ACPICA (Intel implementation of ACPI in Linux and other operating systems) are very MS-compatible, so this is not much of an issue any more. The overall goal of ACPICA is to be MS compatible, even in the face of buggy DSDTs. For the _OS and _OSI methods, ACPICA advertises itself as Windows compatible.  This is all that really matters, and why the "Linux" queries are ignored.

As far as the ASL compiler, the Intel iASL compiler has much more extensive error checking than the MS compiler. Which is why you can disassemble a DSDT that was compiled by the MS compiler, then recompile with iASL and find lots of issues.

Offline

#15 2009-03-11 20:02:33

mits
Member
From: Bucharest/Romania
Registered: 2008-01-10
Posts: 129

Re: ACPI on Toshiba L300 | No change of AC power state

Thank you very, very much ARCHLINUX, you are the best, with kernel26-firmware, my problem is SOLVED.

Offline

#16 2009-03-12 05:25:07

mits
Member
From: Bucharest/Romania
Registered: 2008-01-10
Posts: 129

Re: ACPI on Toshiba L300 | No change of AC power state

It works for a while, after a few minutes problem is back again,
I think I will reinstall all system to see if work.

..................

After a fresh install, same result.

Last edited by mits (2009-03-13 08:30:35)

Offline

#17 2009-04-18 17:32:22

tuxknight
Member
Registered: 2008-08-02
Posts: 5

Re: ACPI on Toshiba L300 | No change of AC power state

i got some information, after a suspend (even suspend to ram don''t work default) by pm-suspend --quirks-dpms-on (for me) the lappy suspen ds and resumes fine and then Ac power state and all these things work !

Offline

Board footer

Powered by FluxBB