Wrong AC state
Dear ACPI-Folks,
I am trying to debug the code for reading the ac_adapter state.
On my laptop (Fujitsu-Siemens Amilo D 8830) this seems to be partially broken.
The /proc/ac_adapter/AC0/state has a value on-line or off-line from boot-time and doesn't change later on. I already switched on debugging in the ac-module and theacpi_ac_get_state function gets called every time I cat the state-file.
But it obviously reads the same value again and again.
Anyways: plugging the AC in and out get's recognized by the hardware:
The display dims up and down, using Windows the correct state is shown and in Linux ACPI is getting 2 IRQs (according to /proc/interrupts).
Does anyone have suggestions where to start debugging?
Best regards
Martin
Signature · 11 lines
+-[Martin Ginkel]-------------[mailto:mginkel(at)mpi-magdeburg.mpg.de]-+ | MPI Magdeburg, Zi S2.09 Sandtorstr. 1, D-39106 Magdeburg, Germany | | | | | +-[tel/fax: +49 391 6110 482/529]----[http://www.mpi-magdeburg.mpg.de]-+ ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Quoted 11 lines · Martin Ginkel
Dear ACPI-Folks,
I am trying to debug the code for reading the
ac_adapterstate. On my laptop (Fujitsu-Siemens Amilo D 8830) this seems to be partially broken.
The/proc/ac_adapter/AC0/statehas a value on-line or off-line from boot-time and doesn't change later on.
I already switched on debugging in the ac-module and theacpi_ac_get_statefunction gets called every time I cat the state-file. But it obviously reads the same value again and again.
Quoted 4 lines
Anyways: plugging the AC in and out get's recognized by the hardware:
The display dims up and down, using Windows the correct state is shown and in Linux ACPI is getting 2 IRQs (according to/proc/interrupts).
Try also checking the battery module. There is (or was) a bug that after suspend the machine would exhibit the same behavior you are describing and a workaround was to unload the battery module before suspend and reload it after.
Quoted 31 lines
Does anyone have suggestions where to start debugging?
Best regards
MartinSignature · 20 lines
+-[Martin Ginkel]-------------[mailto:mginkel(at)mpi-magdeburg.mpg.de]-+ | MPI Magdeburg, Zi S2.09 Sandtorstr. 1, D-39106 Magdeburg, Germany | | | | | +-[tel/fax: +49 391 6110 482/529]----[http://www.mpi-magdeburg.mpg.de]-+ ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Acpi-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/acpi-devel +++++++++++++++++++++++++++++++++++++++++++ This Mail Was Scanned By Mail-seCure System at the Tel-Aviv University CC.
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Quoted 2 lines · Martin Ginkel
On my laptop (Fujitsu-Siemens Amilo D 8830) this seems to be partially broken.
The/proc/ac_adapter/AC0/statehas a value on-line or off-line from boot-time and doesn't change later on.
OK found a solution while reading the disassembled DSDT:
The Code ist checking the OS-Version:
Method (_PSR, 0, NotSerialized)
{
If (LNot (LEqual (FAKE, 0x00)))
{
Return (0x00)
}
Else
{
If (LOr (LEqual (OSFL (), 0x00), LEqual (OSFL (), 0x04)))
{
Store (\_SB.PCI0.SBRG.EC0.XCIN, Local0)
}
Else
{
Store (ACIN, Local0)
}
Return (Local0)
}
}OSFL is returning 0x00 for win2000 and 0x04 for windows nt. I defined as a dirty fix:./include/acpi/platform/aclinux.h:50:
#define ACPI_OS_NAME "Microsoft Windows NT"
Now the Power Monitor reacts instantly.
Well: the Bios seems to be designed for Microsoft Windows ;-P
CU
Martin
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Quoted 36 lines · Martin Ginkel
Quoted 4 lines · Martin Ginkel
On my laptop (Fujitsu-Siemens Amilo D 8830) this seems to be partially broken.
The/proc/ac_adapter/AC0/statehas a value on-line or off-line from boot-time and doesn't change later on.OK found a solution while reading the disassembled DSDT:
The Code ist checking the OS-Version:Method (_PSR, 0, NotSerialized) { If (LNot (LEqual (FAKE, 0x00))) { Return (0x00) } Else { If (LOr (LEqual (OSFL (), 0x00), LEqual (OSFL (), 0x04))) { Store (\_SB.PCI0.SBRG.EC0.XCIN, Local0) } Else { Store (ACIN, Local0) } Return (Local0) } }OSFL is returning
0x00for win2000 and0x04for windows nt. I defined as a dirty fix:./include/acpi/platform/aclinux.h:50:
#defineACPI_OS_NAME"Microsoft Windows NT"
Quoted 7 lines
Now the Power Monitor reacts instantly.
Well: the Bios seems to be designed for Microsoft Windows ;-P
CU
Martin
This did the trick with my Fujitsu-Siemens Amilo D 7830 too.
Thanks!
Signature · 11 lines
Øystein Gisnås <[email protected]> NTNU, Department of Telematics Mob: (+47) 98861515 - MSN: [email protected] ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id�66&op=click
Quoted 8 lines · Martin Ginkel
OSFL is returning
0x00for win2000 and0x04for windows nt. I defined as a dirty fix:./include/acpi/platform/aclinux.h:50:
#defineACPI_OS_NAME"Microsoft Windows NT"Now the Power Monitor reacts instantly.
Well: the Bios seems to be designed for Microsoft Windows ;-P
FWIW: there is a boot parameter acpi_os_name=, at least at the kernel 2.6.4/5 delivered with suse 9.1. Don't know if this is some suse specific patch but it's pretty neat :-)
Signature · 9 lines
Stefan Seyfried ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click