ACPI HOWTO

ACPI HOWTO

 

This post was last updated on May 26th, 2020 at 02:25 pm

Jump to:
News
Downloads
Readings
Basic steps to add ACPI and DSDT
2.4.19-acpi-dsdt
Hang Recovery
Definitions
mscompiler
battstat_applet
fix_broken_dsdt
broken_dsdt_sample
my_broken_dsdt_sample
my_dsdt_fixes
My dsdt files
Pres2701US_status
IRQ9 Hack
cpu_speedstep
acpi_temperature
ProLiant Servers


News

Check out this new “beta” page for DSDT tables: http://acpi.sf.net/dsdt/index.php

OK, fixed my Pres2701US BIOS table and booted (2.4.18 / acpi / dsdt)
I found that the battstat_applet doesn’t line up with what is in /proc.
I edited the source code and now I see BAT1 through the applet.

Now if I can convince battstat_applet to see my 2nd battery…

Played with speedstep stuff (CPU performance) – I get 733MHz or 1000MHz

I’m still missing my Easy Access Keys (even after trying lineakd). I believe I need to play with grabbing the correct IRQ so I can get access to these extra keys (including the fn+F# keys).

Temperature anyone…


Downloads

acpidump – http://people.freebsd.org/~takawata/pacpidump.tar.gz
iasl – http://www.intel.com/technology/iapc/acpi/downloads/iasl-linux-20020725.tar.gz
dsdt patch – http://dude.noc.clara.net/~faye/compaq2701ea/linux-2.4.18-acpi-20020709-dsdt.patch.bz2
ACPI download page – http://sourceforge.net/project/showfiles.php?group_id=36832
battstat_applet download – http://sourceforge.net/projects/battstat/
speedstep 0.1 – http://dude.noc.clara.net/~faye/compaq2701ea/speedstep-0.1.tar.gz
The following download is not needed but I list it here for completeness as ad.zip doesn’t seem to be avaialble from phoenix anymore: http://www.manlug.mcc.ac.uk/ad.zip (254k)
Kernel – http://www.kernel.org


Readings

This page – Hey, you’re already here (http://www.cpqlinux.com/acpi-howto.html)
ACPI site at sourceforge – http://sourceforge.net/projects/acpi
acpi specification – http://www.acpi.info/index.html
faye’s page – http://dude.noc.clara.net/~faye/compaq2701ea/index.html

CPU performance and CPU throttling –
http://www.brodo.de/english/pub/acpi/proc/processor.html


Basic Steps to add ACPI and DSDT to your kernel

As a user do this:

  1. mkdir /tmp/acpi && cd /tmp/acpi
  2. cat /proc/acpi/dsdt > dsdt.dat (root power needed here)
  3. build pacpidump.tar.gz (modify the Makefile to build on linux — it has good comments and it is very short)
  4. ./pacpidump/acpidump > dsdt.asl (need root power here)
  5. Note: It _may_ be possible to use iasl with the -d option
    to dump your table to .asl as well; however, one guy at the
    acpica ML who showed me this had the following to say:

    “I have not checked actually if iasl is ‘good’ in order
    to disable the AML. It is a new feature, so that it
    has perhaps some bugs. I can not be sure.

    Using pacpidump should be OK, but the version you point
    was updated, debugged, etc. under FreeBSD, and those
    changes are present only under FBSD, not the one you
    pointed.”

    Unfortunately there is nothing better to point to.

  6. fix dsdt.asl (this is specific to your individual problem – see below for tips)
  7. unpack iasl-linux-20020725.tar.gz
  8. ./iasl-linux-20020725/iasl -tc dsdt.asl (Compilation complete. 0 errors 0 warnings)
  9. cat linux-2.4.18.tar.bz2 | bunzip2 | tar -xvf –
  10. cd linux
  11. zcat ../acpi-20020726-2.4.18.diff.gz | patch -p1 (looks clean) (from www.sf.net)
  12. cat ../linux-2.4.18-acpi-20020709-dsdt.patch.bz2 | bunzip2 | patch -p1 (looks clean)
  13. cp -a ../dsdt.hex drivers/acpi/tables/acpi_dsdt.c
  14. follow standard kernel building procedures (http://www.cpqlinux.com/kernel.html)


Adding ACPI and DSDT to your 2.4.19 kernel

Perform the following as a user:

  1. Unpack the 2.4.19 kernel source and name the 2.4.19 directory
    1. mkdir /usr/src/unpack
    2. cd /usr/src/unpack
    3. cat /tmp/linux-2.4.19.tar.bz2 | bunzip2 | tar -xvf –
    4. (http://www.kernel.org/pub/linux/kernel/v2.4/)

    5. mv linux-2.4.19 ../linux-2.4.19-acpi-dsdt
    6. cd ../linux-2.4.19-acpi-dsdt
    7. rmdir ../unpack

  2. Apply the ACPI patch (acpi-20020821-2.4.19.diff.gz)
    1. zcat /tmp/acpi-20020832-2.4.19.diff.gz | patch -p1
    2. (http://sourceforge.net/project/showfiles.php?group_id=36832)
      The results from patching should look very clean.

  3. If including your own DSDT table, then patch osl.c (so it will include your dsdt table)
    1. zcat /tmp/linux-2.4.18-acpi-20020709-dsdt.patch.bz2 | bunzip2 | patch -p1
    2. (http://dude.noc.clara.net/~faye/compaq2701ea/linux-2.4.18-acpi-20020709-dsdt.patch.bz2)
      This too should patch cleanly.

  4. If including your own DSDT table, then insert your fixed one now
    1. cp -a /tmp/dsdt.hex drivers/acpi/tables/acpi_dsdt.c

  5. Now build your kernel as normal (http://www.cpqlinux.com/kernel.html)
    1. edit the Makefile
    2. Change “EXTRAVERSION = ” (located at the top) to something like “EXTRAVERSION = -acpi-dsdt-20020905-1”
      Increment this “EXTRAVERSION =” value each time you build a new kernel.

    3. grab a default Red Hat kernel “config” file
    4. cp ../linux-2.4/configs/kernel-2.4.7-10 arch/i386/defconfig

    5. set up your new .config file
    6. make mrproper
      yes “” | make oldconfig

    7. make sure acpi is turned on as static and not built as a module. Might be a good idea to turn off APM unless you know what you’re doing.
    8. make xconfig
      Also, if you ran make mrproper, then it is a good idea to save and exit “make xconfig”, even if you are not making any changes in “make xconfig” — “make mrproper” removes some links that “make xconfig” needs to put back for you.

    9. Now build your kernel and modules
    10. make clean dep bzImage modules

    11. Now install your kernel and modules
    12. As root user do the following in this same directory (/usr/src/linux-2.4.19-acpi-dsdt)
      make modules_install
      Look at the value you put in your Makefile and use that value for the following entries: “cat Makefile | grep ^EXTRAVERSION”
      cp -a arch/i386/boot/bzImage /boot/vmlinuz-2.4.19-acpi-dsdt-20020905-1
      cp -a System.map /boot/System.map-2.4.19-acpi-dsdt-20020905-1
      mkinitrd /boot/initrd-2.4.19-acpi-dsdt-20020905-1.img 2.4.19-acpi-dsdt-20020905-1

    13. Be sure to edit /boot/grub/grub.conf or /etc/lilo.conf; if using LILO, then you must run /sbin/lilo after modifying /etc/lilo.conf
    14. See http://www.cpqlinux.com/kernel.html for more details.
      Also, once you boot on your new kernel, if you use VMWARE or a LinModem or any other similar add on that depends on the kernel you are running, then go ahead and set them up right after you boot while you still have your kernel source directory (usually this requires root power as well):
      yes “” | /usr/bin/vmware-config.pl
      yes “” | /usr/sbin/hsfconfig

      I would recommend doing a dmesg right after boot to get the fewest messages possible:
      cd /tmp
      dmesg > dmesg.txt

      Then start looking for errors, failures, unknowns, warnings, etc. Also check in /proc/acpi for the various components of interest to you.

      Oh, and battstat probably needs patching, search this current web page for the battstat patch.


    battstat_applet

    2.0.13 – http://sourceforge.net/projects/battstat/
    08/16/2002 – battstat_applet-2.0.13.patch – patch to adjust to new /proc structure in current ACPI (08/2002) This applet doesn’t show bat2 though, maybe I’ll work on that next…
    09/05/2002 – battstat_applet-2.0.13-patch.diff – adjusts to new /proc structure and displays “battery time remaining”

    If running Red Hat you may also want to change the “prefix” entry in “Makefile” from /usr/local to /usr as suggested by the warning message that ./configure displays. This allowed battstat_applet to install directly into my gnome desktop without me having to move anything around.


    Hang Recovery

    Recovering from a GUI hard lock up:
    If you get no feedback either from the keyboard or monitor, then to recover you should:
    1. if your network is up, then ssh/rsh/telnet into your box and tell it to reboot
    2. if network is not up, then try this key sequence: CTRL+ALT+F1 CTRL+ALT+DEL. You will not get any video or keyboard feedback but this _MAY_ blindly switch to tty1 (CTRL+ALT+F1) and press ing CTRL+ALT+DEL _MAY_ cause your system to do a polite reboot rather than a hard shutdown, then wait an appropriate amount of time that it usually takes to reboot your machine.


    Definitions

    .ASL – assembly source language (source code)
    .AML – assembly machine language (binary code)
    dsdt.dat – binary version of the dsdt table



    iASL vs. MS Compiler

    The iASL compiler will catch this problem (Access width of Field Unit extends beyond region limit) at compile time, as well as many, many others that the MS compiler does not.

    Further, the iASL compiler will optimize the AML, shrinking the output anywhere from 5% to 20%.


    Fixing your broken DSDT Table

    Based on the error you get when trying to recompile your dsdt table (./iasl-linux-20020725/iasl -tc dsdt.asl), one of the following fixes should help you:

  • Warning 2026 – Reserved method must return a value
  • >> dsdt.asl 134: Method(_WAK, 1) {
    >> Warning 2026 – ^ Reserved method must return a value (_WAK)

    You should probably add a “Return(Package(0x02){0x00, 0x00})” on a new
    line just before the closing curly brace like so:

    Method(_WAK, 1) {
    … … …
    Return(Package(0x02){0x00, 0x00})
    }

    More notes on this _WAK method suggest a different return line:

    Currently, the acpi-ca under linux didn't check the return value of the _WAK
    method, so that it is safe to ignore this warning.  Anynow, if you want
    to get ride of this warning, you should add:
    
            Return(Package(0x02){0x00, 0x00})
    
    at the end of the function.  Not sure for the 0x00, 0x00, though.
    

  • Error 1022 – Object does not exist
  • >> dsdt.asl 281: If(\_OSI) {
    >> Error 1022 – Object does not exist ^ (\_OSI)

    You should probably look for any “Scope” lines and add the leading “\” there that is missing:

    Change from:
    Scope(_SB_) {
    to:
    Scope(\_SB_) {

    Also ignore any “name” lines that do not have the leading slash. I do not believe that the name lines would have to be modified in this manner. I believe that it is written in such a way that the “\” among other stuff is prepended to the beginning of these “name” lines.

  • Error 1051 – Access width of Field Unit extends beyond region limit
  • >> dsdt.asl 848: SRST, 1,
    >> Error 1051 – ^ Access width of Field Unit extends beyond region limit

    You should increase the length of the parent operation region

    Here’s the problem

    1) The length of the Op region is xA7 (0 – A6)

    2) The access width of the field is DwordAcc (4 bytes per read or write)

    3) Field PWST is at byte offset xA4. An aligned Dword read from that field reads bytes A4, A5, A6, and A7. Offset A7 is beyond the end of the region.

    4) Similarly, Field PMST is at byte offset A5. An aligned Dword read from that field reads bytes A4, A5, A6, and A7 also.

    Since the hardware probably only supports DWORD access, the probable bug in the code is that the op region is too short and should be declared with a length of 0xA8.

    NOTE: — the AML interpreter cannot guess at this, it could be very serious to access beyond the end of the region. This is a severe error that is not caught by the MS compiler, but is caught by the iASL compiler.

    More info on this error as well:

    This is a 'common' error in the AML of a lot of laptop, since the implementation
    under windows 98/2000 didn't check actually the lenght of the operation region.
    
    Note that under windows XP, this behaviour is now corrected (I guess) so that
    it can also be a trouble with this OS as well...
    
    It is sufficiant increase a little the lenght of the OP (only add 1), and all
    should be OK.  For example, under a toshiba satellite 3000-514, we have that:
    
                    OperationRegion(GPIO,SystemIo,0x1180,0x3B)
                    Field(GPIO /* \_SB.PCI0.LPCB.GPIO */,WordAcc,Lock,Preserve)
                    {
                        AccessAs(DWordAcc,0x00),
                        Offset(0x0F),
                        ,4,
                        LV28,1,
                        Offset(0x2D),
                        ,5,
                        LPOL,1,
                        Offset(0x38),
                        ,1,
                        SRST,1,
                        Offset(0x39),
                        ,2,
                        ACPW,1
                    }
    
    so that the ACPW, which is located at bit 3 at 0x39 as a word is not acceded.
    The correct line for the OP should be:
    	OperationRegion(GPIO,SystemIo,0x1180,0x3C)
    
    or another fix could be:
    
                        Offset(0x38),
                        ,1,
                        SRST,1,
                        ,9,
                        ACPW,1
    
    and let the lenght could be 0x3B (but, anynow, a length '0x3B', that is
    59, for an OP acceded by words, is a non-sense.
    
    
    This simple bug prevented the read of the batteries, and the ac adapter will
    not be read as expected.  Note that under Windows 98/2000, it work well, but
    the same trouble appar under XP...
    
    http://www.mobilix.org/toshiba_s3000_601.html
    for a model really similar of the one I describe have the same trouble, and
    it was stated:
    
    <quote>
    
    APM / ACPI
    
    well, apm does not work properly. no reliable info is available, although powering the machine off and power saving seems to work. did not try very much here, since acpi _should_ be superior.
    acpi does not work properly either. does it anywhere? the info given for instance in /proc/acpi/battery/1/status seems to be static and seems to break when switching between power supply by battery and line. this could also be a problem with the hardware. the acpi software for winXP crashes, too, when fiddling around with the power cord to switch between ac/dc and battery.
    
    </quote>
    
    Reporting this bug, and the correction, to Toshiba did absolutely _nothing_, 
    even not a reply.
    

  • Error 1022 – Object does not exist
  • >> dsdt.asl 281: If(\_OSI) {
    >> Error 1022 – Object does not exist ^ (\_OSI)

    Add “External (\_OSI)”. The next version of the compiler understands that
    _OSI is a reserved method name and the External won’t be required.

  • Error 1048 – Host Operating Region requires ByteAcc access
  • dsdt.asl 2256: Field(ERAM, AnyAcc, Lock, Preserve) {
    Error 1048 – ^ Host Operation Region requires
    ByteAcc access

    Any operation region in EC space must use ByteAcc, change the region
    declaration

  • Error 1013 – Method local variable is not initialized (Local0)
  • Intel ACPI Component Architecture
    ASL Compiler / AML Disassembler version 20020725 [Jul 25 2002]
    Copyright (C) 2000 - 2002 Intel Corporation
    Supports ACPI Specification Revision 2.0a
    
    /tmp/acpi/dsdt.asl   257:                 Store(Local0, Debug)
    Error   1013 -                                       ^ Method local 
    variable is not initialized (Local0)
    
    /tmp/acpi/dsdt.asl   258:                 If(LGreater(Local0, 0x56)) {
    Error   1013 -    Method local variable is not initialized ^  (Local0)
    
    ASL Input: /tmp/acpi/dsdt.asl - 2357 lines, 84721 bytes, 1702 keywords
    Compilation complete. 2 Errors 0 Warnings
    

    The offending section is here:

            Method(_TMP) {
                If(\_SB_.OKEC) {
                    If(LEqual(INBT, 0x0)) {
                        Store(0x1, INBT)
                        \_SB_.BAT1.SEBI()
                        Notify(\_SB_.ACAD, 0x0)
                        Notify(\_SB_.BAT1, 0x81)
                        Notify(\_SB_.BAT1, 0x80)
                    }
                    Return(TPTM)
                    Store("Current Temperature C is ----------- ", Debug)
                    Store(Local0, Debug)
                    If(LGreater(Local0, 0x56)) {
                        Store(0x56, Local0)
                    }
                    Store(Local0, Local2)
                    Multiply(Local0, 0xa, Local1)
                    Add(Local1, TBSE, Local0)
                    Store("Current Temperature K is ----------- ", Debug)
                    Store(Local0, Debug)
                    CHTR(Local2)
                    Return(Local0)
                }
                Else {
                    Return(TPTM)
                }
            }
    

    Values are taken from the left and then stored in the right on “Store” operations. So the value of Local0 should be placed into the variable “Debug”. The problem is that Local0 is never initialized. However, looking again at this code we see a “Return(TPTM)” just before this offending section. This offending section never even has a chance to run so we should comment out this section so that the errors will go away. So the above should be written as follows

            Method(_TMP) {
                If(\_SB_.OKEC) {
                    If(LEqual(INBT, 0x0)) {
                        Store(0x1, INBT)
                        \_SB_.BAT1.SEBI()
                        Notify(\_SB_.ACAD, 0x0)
                        Notify(\_SB_.BAT1, 0x81)
                        Notify(\_SB_.BAT1, 0x80)
                    }
                    Return(TPTM)
    /*
                    Store("Current Temperature C is ----------- ", Debug)
                    Store(Local0, Debug)
                    If(LGreater(Local0, 0x56)) {
                        Store(0x56, Local0)
                    }
                    Store(Local0, Local2)
                    Multiply(Local0, 0xa, Local1)
                    Add(Local1, TBSE, Local0)
                    Store("Current Temperature K is ----------- ", Debug)
                    Store(Local0, Debug)
                    CHTR(Local2)
                    Return(Local0)
    */
                }
                Else {
                    Return(TPTM)
                }
            }
    

    The errors from this unused section will then go away.


Broken DSDT Sample

Here’s sample output from a broken dsdt table

Intel ACPI Component Architecture
ASL Compiler / AML Disassembler version 20020725 [Jul 25 2002]
Copyright (C) 2000 - 2002 Intel Corporation
Supports ACPI Specification Revision 2.0a

dsdt.asl   134: Method(_WAK, 1) {
Warning 2026 -            ^ Reserved method must return a value (_WAK)

dsdt.asl   280:             If(CondRefOf(_OSI, Local0)) {
Error   1022 -        Object does not exist ^  (_OSI)

dsdt.asl   281:                 If(\_OSI) {
Error   1022 -   Object does not exist ^  (\_OSI)

dsdt.asl   282:                     "Windows 2001"
Error   1037 -                       parse error ^

dsdt.asl   566:             Method(_DOD) {
Warning 2019 -                        ^ Mixed return types in method (_DOD)

dsdt.asl   566:             Method(_DOD) {
Warning 2026 -                        ^ Reserved method must return a value (_DOD)

dsdt.asl   848:                 SRST,   1,
Error   1051 -                     ^ Access width of Field Unit extends beyond region limit

dsdt.asl   851:                 ACPW,   1
Error   1051 -                     ^ Access width of Field Unit extends beyond region limit

dsdt.asl  2256:                 Field(ERAM, AnyAcc, Lock, Preserve) {
Error   1048 -                           ^ Host Operation Region requires ByteAcc access

ASL Input: dsdt.asl - 3250 lines, 135282 bytes, 2300 keywords
Compilation complete. 6 Errors 3 Warnings


My Broken DSDT Sample

Intel ACPI Component Architecture
ASL Compiler / AML Disassembler version 20020725 [Jul 25 2002]
Copyright (C) 2000 - 2002 Intel Corporation
Supports ACPI Specification Revision 2.0a

dsdt.asl   147:         Store(0x0, \_SB_.OKEC)
Error   1022 -        Object does not exist ^  (\_SB_.OKEC)

dsdt.asl   156: Method(_WAK, 1) {
Warning 2019 -            ^ Mixed return types in method (_WAK)

dsdt.asl   156: Method(_WAK, 1) {
Warning 2026 -            ^ Reserved method must return a value (_WAK)

dsdt.asl   179:     Store(0x1, \_SB_.OKEC)
Error   1022 -    Object does not exist ^  (\_SB_.OKEC)

dsdt.asl   182:     Store(Zero, \_SB_.ACOK)
Error   1022 -     Object does not exist ^  (\_SB_.ACOK)

dsdt.asl  1548:                         Store(Arg1, \_SB_.OKEC)
Error   1022 -                         Object does not exist ^  (\_SB_.OKEC)

dsdt.asl  1730:                     Store(0x1, \_SB_.ACOK)
Error   1022 -                    Object does not exist ^  (\_SB_.ACOK)

dsdt.asl  1754:                             Store(One, \_SB_.ACOK)
Error   1022 -                            Object does not exist ^  (\_SB_.ACOK)

dsdt.asl  2039:                     Store(One, \_SB_.ACOK)
Error   1022 -                    Object does not exist ^  (\_SB_.ACOK)

dsdt.asl  2136:                     PWST,   2,
Error   1051 -                         ^ Access width of Field Unit extends beyond region limit

dsdt.asl  2139:                     PMST,   1
Error   1051 -                         ^ Access width of Field Unit extends beyond region limit

dsdt.asl  2726:             If(\_SB_.OKEC) {
Error   1022 -    Object does not exist ^  (\_SB_.OKEC)

dsdt.asl  2755:             If(LEqual(\_SB_.ACOK, 0x0)) {
Error   1022 -           Object does not exist ^  (\_SB_.ACOK)

dsdt.asl  2759:             If(\_SB_.OKEC) {
Error   1022 -    Object does not exist ^  (\_SB_.OKEC)

dsdt.asl  2892:             If(\_SB_.OKEC) {
Error   1022 -    Object does not exist ^  (\_SB_.OKEC)

dsdt.asl  2924:             If(\_SB_.OKEC) {
Error   1022 -    Object does not exist ^  (\_SB_.OKEC)

dsdt.asl  3181:             If(\_SB_.OKEC) {
Error   1022 -    Object does not exist ^  (\_SB_.OKEC)

dsdt.asl  3213:             If(\_SB_.OKEC) {
Error   1022 -    Object does not exist ^  (\_SB_.OKEC)

dsdt.asl  3458:                 If(\_SB_.OKEC) {
Error   1022 -        Object does not exist ^  (\_SB_.OKEC)

ASL Input: dsdt.asl - 3554 lines, 137316 bytes, 2699 keywords
Compilation complete. 17 Errors 2 Warnings


My DSDT Fixes

I did the following to fix my DSDT table:
I had two different lines that said “Scope(_SB_) {“. Fixing the first one made no difference in the erorrs so I left that one alone. I changed the 2nd one and lots of my errors went away (Went from 17 errors 2 warnings down to 2 errors 2 warnings).
I then added the “Return(0x0)” just before the ending curly brace of my _WAK method. This now left me with 2 errors and 0 warnings.
I then changed my 0xa7 to 0xa8:

from:
OperationRegion(CCRD, PCI_Config, 0x0 0xa7)
to:
OperationRegion(CCRD, PCI_Config, 0x0 0xa8)

This now left me with 0 errors and 0 warnings.

Where to go from here

I built 2.4.18-acpi-dsdt-20020816-1 but I’m still getting some errors:

Unknown bridge resource 2: assuming transparent 
pci_bind-0191 [12] acpi_pci_bind : Device 00:00:1d.07 not present in PCI namespace 
pci_bind-0191 [14] acpi_pci_bind : Device 00:00:1f.06 not present in PCI namespace 
ACPI: Battery Slot [BAT1] (battery absent)     (uhhh, it's really in there and I'm using AC line)
dsmthdat-0432 [30] Ds_method_data_get_val: Uninitialized Local[3] at node dfe72d4c 
dsmthdat-0432 [30] Ds_method_data_get_val: Uninitialized Local[3] at node dfe72d4c 
dsmthdat-0432 [30] Ds_method_data_get_val: Uninitialized Local[3] at node dff2954c 
dsmthdat-0432 [85] Ds_method_data_get_val: Uninitialized Local[3] at node dfe5094c 
dsmthdat-0432 [85] Ds_method_data_get_val: Uninitialized Local[3] at node dfe5094c 

I tried the “eisa_set_level_irq(9);” thing and now I’m down to these errors:

Unknown bridge resource 2: assuming transparent 
pci_bind-0191 [12] acpi_pci_bind : Device 00:00:1d.07 not present in PCI namespace 
pci_bind-0191 [14] acpi_pci_bind : Device 00:00:1f.06 not present in PCI namespace 
ACPI: Battery Slot [BAT1] (battery absent) 
dsmthdat-0432 [30] Ds_method_data_get_val: Uninitialized Local[3] at node dfe72d4c 
dsmthdat-0432 [30] Ds_method_data_get_val: Uninitialized Local[3] at node dfe72d4c 


My dsdt Files

dsdt.asl-orig – My original dsdt table
dsdt.asl-fixed – My fixed dsdt table
dsdt.asl-diff – The differences between orig and fixed dsdt tables


Status of my Presario 2701US

Here’s my current dmesg output from 2.4.18-acpi-dsdt-20020816-1: linux-2.4.18-acpi-dsdt-20020816-1.dmesg.txt
Here’s my current dmesg output from 2.4.18-acpi-dsdt-20020816-2: linux-2.4.18-acpi-dsdt-20020816-2.dmesg.txt
Here’s the diff of 1 and 2: linux-2.4.18-acpi-dsdt-20020816-1_2.dmesg.diff.txt

All the hardware works great: (DVD, CDRW, BAT1 & BAT2 functionality, sound, mousepad and 2 buttons, keyboard (minux the easy access keys, and the 4-way internet scroll buttons), NIC, Conextant MODEM, brightnes control. Keys that generate scancodes with this regular – non ACPI kernel (2.4.18-5) are fn+F4 (Sleep Key). No scancodes generated (using showkey -s) for any other Fn+F# keys (including nothing from brightness control fn+F7 and fn+F8).

Adding basic ACPI patch 20020725 on 2.4.18 helped immediately with the lid button and the power off on shutdown command. Also fn+F4 still works and now I get “[ACPI Debug] String: Hot-Keys: —– _Q0c” when I press fn+F3. No other fn+F# keys provide feedback through showkeys -s.

I now get updates from /proc/acpi/ac_adapter and /proc/acpi/BAT*/*. I modified the battstat_applet and all is well for seeing ac_adapter and BAT1 status. I still need to access the rest of the fn+F# keys, Easy Access Buttons, 4-way internet scroll buttons.

Adding eisa_set_level_irq(9); didn’t help me access my EAK (Easy Access Keys). I heard of a project called lineak: http://sourceforge.net/projects/lineak/ and I will try that next to see my EAK. I just checked out the lineak project. It works pretty good; however, if your keys do not create scancodes, then lineak won’t do any magic for you. Looks like I have to find where the interrupt for these keys are at so I can start receiving scancodes from them. Not sure if I should start guessing at some of the irq’s or if it is told to me somewhere. I only get scancodes on fn+F4. I get something on fn+F3, but not a scancode, probably I have to “map” that key to a scancode?? None of the other fn+F1 thru fn+F12 nor the Easy Access Keys currently generate anything for me (2.4.19 + acpi + fixed dsdt table + irq9 testing).

Todo:

  1. See if all my other “Easy Access Buttons” and such will start working at some point:


IRQ9 Hack

add the following line:
"eisa_set_level_irq(9);"
in drivers/acpi/pci_irq.c at around line 365 which is just before the return in the function acpi_pci_irq_enable().

Now, remember this is only a temporary “hack” and not a real solution. kernel version 2.4.19 (or 2.4.18) and acpi 20020821.


CPU Speedstep / CPU Performance

I have linux 2.4.18-acpi-dsdt-20020816-2 which has the irq9 thing which I don’t think is doing anything.

Speedstepping seems to work. I inspect /proc/acpi/processor/CPU0/performance and notice that I am at the 733MHz position. I then give it a job such as “while :; do cat performance; done” and then notice that it moves into the 1000MHz position. I then CTRL+C and do a cat performance about once every 1 or 2 seconds and I notice that it falls back into the 733MHz position. Looks good enough to me!

I downloaded the speedstep program faye points to which is version 0.1: http://dude.noc.clara.net/~faye/compaq2701ea/speedstep-0.1.tar.gz.
Note that I’ve seen that there is a 0.4 version out there (http://www.goof.com/pcg/marc/speedstep.html),
but then I’ve also noticed that it looks to be in the linux-2.4.19-pre9-ac3 (http://www.pm.waw.pl/~jslupski/vaio/#cpu) kernel as well.

So I will try 2.4.19 with the new 2.4.19 patch http://sourceforge.net/project/showfiles.php?group_id=36832 and then grab this 0.4 speedstep and see what happens. (I’ll drop the irq9 thing in this 2.4.19 since it doesn’t seem to do anything for me). I didn’t have much luck with the 0.4 speedstep, so I went back to using the 0.1 speedstep. I did get an error message though from 0.4:

[[email protected] CPU0]# /opt/speedstep/sbin/speedstep 
EDI == 0202fe05 != 02020005|02020004,
please report this to , together with /proc/cpuinfo
(suppress this notice with -q)
current state: battery optimized
[[email protected] CPU0]# cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 11
model name	: Intel(R) Pentium(R) III Mobile CPU      1000MHz
stepping	: 1
cpu MHz		: 996.693
cache size	: 512 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips	: 1985.74

[[email protected] CPU0]# 

So what’s this Linux CPUFreq thing I just found? http://www.brodo.de/cpufreq/

Silly me, ask a question and you sometimes get an answer. I don’t have time to merge it really well with the rest of this section, so I’ll just cut and paste part of the email here for you now.

I just got back to work — we just had a baby girl, Sarah Rose Black, and everything is really hectic still — trying to catch up on emails and sleep!


Hi,

Thanks for this great site. It'll offer a good source of information for all
ACPI users. And thanks for linking my website twice (http://www.brodo.de/)

A few comments on the CPU Speedstep / CPU Performance chapter in your
acpi-howto:

Currently, there are three options available to access "SpeedStep". 

1.) ACPI "P-States"  - /proc/acpi/processor/.../performance
    This uses the ACPI-provided means (DSDT, some BIOS interfaces) to switch
the CPU frequency.

2.) CPUfreq - legacy speedstep driver
    This uses direct access to a mainboard/southbridge register to switch
the CPU frequency. It only works on ICH2-M and ICH3-M southbriges. 
    For other frequency changing methods, other "legacy" drivers exist. All
can be changed using /proc/cpu/0/... (2.4. interface) or /proc/cpufreq (2.6.
interface). CPUfreq was merged into 2.5.40, I sent a patch which integrates 
ACPI "P-States" as just another CPUfreq "hardware" driver to the ACPI
development list just moments ago.

[Note: This patch is included in kernel 2.5.45]

    The linux-2.4.19-pre9-ac3 patch you mention actually includes this
CPUfreq speedstep driver. 

3.) Marc's speedstep driver
    This uses an undocumented, uncertain, in my opinion highly dangerous
interface with the BIOS. It seems to work on a few notebooks; but it's
highly suspicious. And Intel-SpeedStep on Pentium III - Tualatin - specific.
Neither Marc nor me intend to integrate this user-space tool into the kernel, 
or to integrate it as a cpufreq driver.


If you have any further questions on ACPI P-States, CPUfreq or SpeedStep,
please feel free to ask me.

	Dominik



ACPI Temperature

Hey, lets check out that ACPI temperature:
heatload 0.2 – CPU Load and ACPI Temperature Monitor
http://www.stud.uni-hamburg.de/users/lennart/projects/heatload/

No success yet because it relies heavily on gnome — I have some gnome installed, but looks like I don’t have enough development environment installed for gnome… 🙁 I tried to grab gconfmm-1.3.7.tar.gz, gnomemm-1.2.3.tar.gz, and gtkmm-1.2.10.tar.gz from:http://sourceforge.net/project/showfiles.php?group_id=1161. I was able to get gtkmm installed; however both gconfmm and gnomemm didn’t install. Maybe I need other projects from that page…


ProLiant Servers

I’ve had success with the BL10e, I’ll update here later.

Here’s the only info I have on Other ProLiant Servers:

Most ML, DL, CL, and BL ProLiant servers are ACPI Specification 1.0b compliant. Specifically, given Intel’s guidance for supporting new Pentium4 features such as temperature throttling and HyperThreading, all Pentium4- and Xeon-based ProLiant servers are ACPI Specification 1.0b compliant. At this time, ProLiant servers only support sleep state S0 (power-on) and sleep state S5 (power-off). Hardware/ROM-level support for the other sleep states, such as S1, is being investigated.

When enabled (default), Windows 2000 (and .NET when released) supports graceful OS shutdown/system power-off through ACPI (sleep state S5). These settings can be configured via the Control Panel-> Power Options icon and selecting the Advanced tab.

When the ProLiant ACPI drivers for NetWare (CPQACPI.PSM, etc, version 1.04 or later) are loaded and enabled (default), NetWare v 6.0 supports graceful OS shutdown/system power-off through ACPI (sleep state S5). These settings can be configured via NetWare Console SET parameters as described in the new ACPI SET-category.




I’ve tested 2 configurations to see what compoenents work/don’t work. Here’s the results. Items in black are tested. Red items are untested.




Red Hat 7.3 2.4.18-5 (no ACPI)

What works (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode

What doesn’t work (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode

Red Hat 7.3 2.4.18-acpi

What works (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode

What doesn’t work (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode

Red Hat 7.3 2.4.18-acpi-dsdt

What works (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC – eepro100
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode

What doesn’t work (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • 1394 Firewire
  • S-video out (tv-out)
  • modem
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • PCMCIA slot
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)

Red Hat 7.3 2.4.18-acpi-dsdt-irq9test

What works (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC –pro100
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode

What doesn’t work (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • S-video out (tv-out)
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • PCMCIA slot
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)

Red Hat 7.3 2.4.19-acpi-dsdt

What works (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode

What doesn’t work (Red = To Be Tested):

  • lpt port
  • PS/2 port
  • USB
  • 1394 Firewire
  • VGA out
  • S-video out (tv-out)
  • NIC
  • modem
  • cdrw burner (future bay II) – read test
  • floppy drive (future bay II)
  • 2nd battery (future bay II)
  • microphone jack
  • headphones jack
  • speakers
  • dvd player
  • PCMCIA slot
  • LCD Panel
  • Lid button
  • poweroff on shutdown
  • touchpad (mouse)
  • 2 mouse buttons 1 & 2
  • 4-way internet scroll buttons
  • Easy Access Keys (internet, mail, search, sound, vol up, vol down)
  • fn+F1 (Q – Compaq)
  • fn+F2 (? – Help)
  • fn+F3 (screen)
  • fn+F4 (sleep)
  • fn+F5 (blank)
  • fn+F6 (blank)
  • fn+F7 (brightness down)
  • fn+F8 (brightness up)
  • fn+F9 (play/pause)
  • fn+F10 (stop)
  • fn+F11 (rewind)
  • fn+F12 (forward)
  • Windows Key Left – generates scancode
  • Windows Key Right – generates scancode
  • Copy/Past Key – generates scancode


Notes on Evo n600c

Darren Benham wrote:

I have an Evo n600c and I had to make three types of changes…

  1. I had to remove * from all the name statements.
  2. I had to rewrite two _OFF statements (basicly turned the “if { return }
    more code” into a “if { noop } else {the rest of the code}” so that functions that were returning a value stop returning a value and yet the execution of the _OFF code is still conditional.
  3. I had to add two “external” statments for \_PR.C000 and C001. I could
    have forced the assemble but, as a long time programmer, I prefer to work
    code until there are no errors or warnings as opposed to forcing it to
    compile anyway. (I agree with Darren on getting a “clean” build rather than using a sledgehammer — I’m usually more pleased with the results.)

Darren


I have come to the conclusion that my ACPI information successfully shows up if I power on the laptop (Pres 2701 US) without external power. Then I can plug in the power (I haven’t nailed down exactly when I can plug it in) and run on wall power, but still see all my ACPI battery info. Often (if not always) if I power on with external power attached, I do not get any ACPI information.


Previous cdre sh
Next Converting / from EXT2 to EXT3 while booted on / (root partition)
 

About author

Sibananda Sahu
Sibananda Sahu 186 posts

A Linux Kernel Developer and a Firmware Developer by profession. Have worked with few big companies: BROADCOM Corporation, Cypress Semiconductor, LSI Corporation, TOSHIBA Corporation, Western Digital; on various cutting edge technologies and product lines, such as: RAID storage Driver, SSD Firmware, WLAN Firmware etc. Having more than 9 years of experience in Software Engineering domain. Now, took a pledge to educate all aspirant students to teach about Linux Kernel Development.

View all posts by this author →

You might also like

Security 0 Comments

How To Disable Secure Boot In A System?

This post was last updated on August 1st, 2020 at 12:47 pmSecure boot is a feature of UEFI which ensures that your PC boots only through the firmware that is

How To 0 Comments

Expect Scripts

This post was last updated on July 9th, 2020 at 04:55 pmHow to send escape characters through Expect http://mini.net/tcl/3038 How to send escape characters through Expect http://mini.net/tcl/201 Expect Send Function

Linux Topics 0 Comments

How To Display Date And Time In The Output Of History Command In Linux?

This post was last updated on August 1st, 2020 at 12:23 pmHistory command displays the list of commands that have been executed from a terminal. By default, it shows the

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply