Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How To Fix Your Buggy DSDT

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default How To Fix Your Buggy DSDT

    Introduction

    With SuSE 9.3, I bought a new Sager NP4750 64-bit laptop and found that my DSDT was broken. The results of my getting that fixed are presented in: Howto Fix Your Buggy DSDT @ Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums.
    Although there is presented dsdt fixes through 10.3, that howto is terribly outdated. However, that howto still contains valuable DSDT code fixes buried throughout the thread.
    HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.) @ Gentoo Forums :: View topic - HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.) is an excellent reference with links to more references. Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected) provides updated information now relevant to openSUSE 11.0.

    What follows is the process to update that howto to openSUSE 11.0 RC1. Where the theory changes, I will point that out.

    I will get this up so the members can use it, and, I will come back and put it into a Wiki format when it is fleshed out. Consider this a work-in-progress for now.

    See any acpi errors or warnings in dmesg? Does your system hang when shutting down? Can't suspend to RAM or disk? Computer won't wakeup? Battery functions not working? Losing an IRQ? Can't get wireless to work even though you are following exact directions? You probably have a buggy DSDT. Let's fix it!

    What is a DSDT?

    “DSDT stands for Differentiated System Description Table. It is a part of the ACPI specification and it supplies configuration information about a base system.
    The DSDT comprises a system description table header, followed by a definition block. The definition block is encoded using ACPI Machine Language (AML), and unlike other definition blocks on the system, the DSDT definition block can not be unloaded, as it provides the basic ACPI namespace scope that all other dynamic definition blocks can later add onto.” REF: Advanced Configuration and Power Interface - Wikipedia, the free encyclopedia

    and

    “6. DSDT: Differentiated System Description Table
    Thanks to Erich writing this section.
    You might need to override the DSDT when certain features like battery status are incorrectly reported (usually causing error messages to syslog). DELL laptops usually need this kind of override. Fixed DSDT for many systems are available on the DSDT page, along with a patch that tells the kernel to ignore the BIOS-supplied table but use the compiled-in fixed DSDT.
    Basically you need to copy the fixed table into your kernel source with a special filename (or modifying the filename in the patch supplied at the DSDT page) This override is quite easy: instead of loading the DSDT table from bios, the kernel uses the compiled-in DSDT table. That's all.” Ref: http://tldp.org/HOWTO/ACPI-HOWTO/dsdt.html

    Note: While “ This override is quite easy” may be true, it is not intuitive and the some of the process and code has changed with openSUSE 11.0 RC1 – especially the last part, reading it into the kernel.
    Note: Please review post #1 of the old howto @ Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums to get an overview. Also, please scan through the code fixes for something that may apply to your DSDT should you have a DSDT problem.

    Laptops
    “Errors are often caused by vendors
    +testing their hardware only with Windows or because there is code which is
    +executed only on a specific OS with a specific version and Linux hasn't been
    +considered during the development.” Ref: Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected)
    Note: The above is especially true of laptops, See: Search results - openSUSE and note that all the indicated DSDT problems are with laptops.

    Section 1: Fixing the DSDT

    Is your DSDT broken?
    1st, and most important, is go to your OEM; get the latest BIOS; and install it. It may contain a fixed DSDT for you or at least turn on some missing functions. Also:
    “+Before you run away from customising your DSDT, you should note that already
    +corrected tables are available for a fair amount of computers on this web-page:
    +Linux/ACPI - DSDT: Overview . Be careful though, to work correctly a DSDT has to
    +match closely the hardware, including the amount of RAM, the frequency of the
    +processor and the PCI cards present! “ from Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected)

    Having done that, now, take a look at "dmesg" & see if you have any acpi errors, warnings, dropped IRQs, or just things that acpi didn't accomplish.
    "dmesg | grep -2i acpi" will simplify looking @ acpi lines, but I recommend looking at the full dmesg output.
    In a terminal, type “dmesg” or "dmesg | grep -2i acpi" and see if you have any errors, warnings or other problems as above.

    (Note: I am building this howto using my desktop. I only had one insignificant warning; we will fix that then proceed to my laptop in the next section to follow.)

    How to fix Your buggy DSDT.

    Get the DSDT.

    Get the DSDT (written for openSUSE 11.0 RC1 file structure). Note: openSUSE 11.0 provides all the tools that we will need -- no need to go looking for intel/ibm files named in the readings.
    The DSDT resides in /proc/acpi/dsdt and the file will be locked.
    So, as root,:
    "cat /proc/acpi/dsdt > /home/yourname/dsdt.dat"

    My code looks like:
    Code:
    jim@linux-3obf:~> su
    Password:
    linux-3obf:/home/jim # cat /proc/acpi/dsdt > /home/jim/dsdt.dat
    inux-3obf:
    Disassemble the DSDT
    The “iasl” tools reside in /usr/sbin.
    So, cd /usr/sbin
    "./iasl -d /home/yourname/dsdt.dat"
    This will create a file called dsdt.dsl, which contains the disassembled DSDT.

    My code looks like:
    Code:
    jim@linux-3obf:~> su
    Password:
    linux-3obf:/home/jim # cd /usr/bin
    linux-3obf:/usr/bin # ./iasl -d /home/jim/dsdt.dat
    
    Intel ACPI Component Architecture
    AML Disassembler version 20080213 [May 30 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    Loading Acpi table from file /home/jim/dsdt.dat
    Acpi table [DSDT] successfully installed and loaded
    Pass 1 parse of [DSDT]
    Pass 2 parse of [DSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
    .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
    Parsing completed
    Disassembly completed, written to "/home/jim/dsdt.dsl"
    And I now have dsdt.dsl in /home/myname.

    Open Kwrite; open /home/yourname/dsdt.dsl; click on view and select line numbers.
    The acpi numbered errors and warning from dmesg should show up with the same number line here -- but it won't show the errors.

    Find your errors & warnings.
    Recompile the DSDT.
    Note, Here we have the 1st deviation from the old howto.
    Code:
    linux-3obf:/usr/bin # ./iasl -tc /home/jim/dsdt.dsl
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler version 20080213 [May 30 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    Error    4067 - Could not open file "/home/jim//home/jim/dsdt.aml" (No such file or directory)
    linux-3obf:/usr/bin # cd /home/jim
    No way could I get around “Error 4067 - Could not open file "/home/jim//home/jim/dsdt.aml" (No such file or directory)” using iasl from that folder/directory; I had to copy it to /home to get it to work.
    If you do the above, delete dsdt.src & dsdt.hex > to trash
    So, let's do it the way it worked for me.
    Start over:

    Find your errors & warnings.
    Recompiling the DSDT finds our errors & warnings

    In Filemanager Superuser Mode, copy ./iasl from /usr/bin to /home/yourname.
    Code:
    jim@linux-3obf:~> cd /home/jim
    jim@linux-3obf:~> ./iasl -tc dsdt.dsl
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler version 20080213 [May 30 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    dsdt.dsl   349:     Method (\_WAK, 1, NotSerialized)
    Warning  1079 -                 ^ Reserved method must return a value (_WAK)
    
    ASL Input:  dsdt.dsl - 7014 lines, 220284 bytes, 2648 keywords
    AML Output: /home/jim/dsdt.aml - 23785 bytes 938 named objects 1710 executable opcodes
    
    Compilation complete. 0 Errors, 1 Warnings, 0 Remarks, 779 Optimizations
    jim@linux-3obf:~>
    If you have a buggy DSDT; you will get errors & warnings as I did above. If you don't have a buggy DSDT it will compile and create 2 files: dsdt.hex and DSDT.aml.
    The DSDT.aml is our goal for this section.

    Continued in the next post.
    Last edited by snakedriver; 16-Jun-2008 at 13:56.
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  2. #2
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Let's fix that warning.

    Let's right click on dsdt.dsl and open with Kwrite; also select show line numbers.
    From the error listed above we see the line is 349; scroll down to that remembering that the error was “Reserved method must return a value (_WAK)”.
    Here is mine (yours may well be different):
    Code:
    From dsdt.dsl line #349
        Method (\_WAK, 1, NotSerialized)
        {
            SALD (0x00)
            Store (0xFF, DBG1)
            Store (0x00, SFLG)
            If (LEqual (RTCW, 0x00))
            {
                Notify (\_SB.PWRB, 0x02)
            }
    
            Notify (\_SB.PCI0.USB0, 0x00)
            If (LGreaterEqual (OSFL, 0x01))
            {
                Store (0x00, \_SB.PCI0.SMB0.SMPM)
            }  <--does not return a value after this bracket
        }
    So what do I do? I go to Google/Linux and search for “\_WAK, 1, NotSerialized” and find a solution.

    This one is right out of the spec:
    Code:
    ****Method (_WAK, 1, NotSerialized)
    ****{
    ********Store (\_SB.PCI0.LPCB.H_EC.ACEX, \ACPS)
    ********If (\ACPS)
    ********{
    ************\_SB.PHS (0x95)
    ********}
    ********Else
    ********{
    ************\_SB.PHS (0x94)
    ********}
    
    ********If (LEqual (Arg0, 0x03))
    ********{
    ************\_SB.PHS (0x8A)
    ************If (LEqual (OSYS, 0x07CE))
    ************{
    ****************Notify (\_SB.PWRB, 0x02)
    ************}
    ********}
    ****Return(Package(0x02){0x00, 0x00})  ← Ah Ha, looks like I need this added to mine.
    ****}
    My fixed code:
    Code:
    From dsdt.dsl line #349
        Method (\_WAK, 1, NotSerialized)
        {
            SALD (0x00)
            Store (0xFF, DBG1)
            Store (0x00, SFLG)
            If (LEqual (RTCW, 0x00))
            {
                Notify (\_SB.PWRB, 0x02)
            }
    
            Notify (\_SB.PCI0.USB0, 0x00)
            If (LGreaterEqual (OSFL, 0x01))
            {
                Store (0x00, \_SB.PCI0.SMB0.SMPM)
            }
         Return(Package(0x02){0x00, 0x00})  ←I added this line and it needs to be aligned with the brackets
        }
    Of course we “Save” the fixed file.

    Now let's try compiling dsdt.dsl again with our fixes:
    Code:
    jim@linux-3obf:~> ./iasl -tc dsdt.dsl
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler version 20080213 [May 30 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    ASL Input:  dsdt.dsl - 7015 lines, 220322 bytes, 2649 keywords
    AML Output: /home/jim/dsdt.aml - 23791 bytes 938 named objects 1711 executable opcodes
    
    Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 781 Optimizations
    jim@linux-3obf:~>
    Yea Team! 0 Errors, 0 Warnings and 0 Remarks; plus, 781 Optimizations -- makes it worth the effort.

    Note that the process also wrote dsdt.hex and dsdt.aml to /home/yourname.
    Rename dsdt.aml to DSDT.aml.

    DSDT.aml was our goal in this step; what next?
    Well to use it, we have to add it to an initramfs so that the
    kernel can read the table at the very beginning of the boot.
    That process is a major change with openSUSE 11.0 from what was in the previous howto.

    Section 2: Getting the kernel to use your fixed DSDT.

    Re: [PATCH 1/3] The basics of DSDT from initramfs (format corrected) presents the process and script that we will be using. It is but one of a series of a mailing-list shown at the bottom of the page. Credit goes to those developers shown there. Thank you all Devs.

    Fortunately for us, that script can be found @ /usr/src/linux/Documentation/acpi on our machines.

    So, let's try it:
    Code:
    jim@linux-3obf:~> su
    Password:
    linux-3obf:/usr/src/linux/Documentation/acpi # sh initramfs-add-dsdt.sh
    initramfs-add-dsdt.sh: too few arguments
    Usage: initramfs-add-dsdt.sh initrd-name.img DSDT-to-add.aml
    Adds a DSDT file to an initrd (in initramfs format)
    
      initrd-name.img: filename of the initrd in initramfs format
      DSDT-to-add.aml: filename of the DSDT file to add
    Now using that output:
    Code:
    jim@linux-3obf:~> su
    Password:
    linux-3obf:/usr/src/linux/Documentation/acpi # cd /usr/src/linux/Documentation/acpi
    linux-3obf:/usr/src/linux/Documentation/acpi # sh initramfs-add-dsdt.sh /boot/initrd-2.6.25.5-1.1-default /home/jim/DSDT.aml
    linux-3obf:/usr/src/linux/Documentation/acpi #
    where
    initrd-name.img: filename of the initrd in initramfs format = /boot/initrd-2.6.25.5-1.1-default
    DSDT-to-add.aml: filename of the DSDT file to add = /home/jim/DSDT.aml

    Because we just modified the initrd, I will not do another “mkinitrd” as that will overwrite the workaround I just did.

    Now let's reboot and hope we guessed right.

    Reboot


    How will we know we have success?

    The dmesg message "Looking for DSDT in initramfs..." will tell you if the DSDT was found or not.
    and,
    "When an ACPI table is overridden (for now this can happen only for DSDT)
    display a big warning and taint the kernel with flag A....
    + if (*new_table != NULL) {
    + printk(KERN_WARNING PREFIX "Override [&#37;4.4s-%8.8s], "
    + "this is unsafe: tainting kernel\n",
    + existing_table->signature,
    + existing_table->oem_table_id);
    + add_taint(TAINT_OVERRIDDEN_ACPI_TABLE);
    + }
    Ref: [PATCH 2/3] Taint kernel on ACPI table override of the same mailing-list link above.

    So, I look at my “dmesg”

    I got:
    ACPI: Checking initramfs for custom DSDT
    ACPI: Found DSDT in DSDT.aml.
    ACPI: Override [DSDT-AWRDACPI], this is unsafe: tainting kernel
    ACPI: Table DSDT replaced by host OS
    ACPI: DSDT 00000000, 5CEF (r1 NVIDIA AWRDACPI 1000 INTL 20080213)
    ACPI: DSDT override uses original SSDTs unless "acpi_no_auto_ssdt"Parsing all Control Methods:
    Table [DSDT](id 0001) - 1114 Objects with 104 Devices 325 Methods 43 Regions
    Parsing all Control Methods:
    Table [SSDT](id 0002) - 8 Objects with 0 Devices 0 Methods 0 Regions
    tbxface-0598 [00] tb_load_namespace : ACPI Tables successfully acquired
    evxfevnt-0091 [00] enable : Transition to ACPI mode successful
    Conclusion

    Yea, the process worked!

    Notes:
    This process was done on my desktop; my laptop will prove more interesting which is up next.
    Last edited by snakedriver; 21-Jun-2008 at 06:06.
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  3. #3
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 3. Fixing the DSDT on a HP DV9700z x86-64 laptop

    Before we begin, here is the initial DSDT part of "dmesg" out of the box so we can have something to compare to when we are done
    Code:
    ACPI: Checking initramfs for custom DSDT
    Parsing all Control Methods:
    Table [DSDT](id 0001) - 459 Objects with 44 Devices 135 Methods 12 Regions
    Parsing all Control Methods:
    Table [SSDT](id 0002) - 2 Objects with 0 Devices 0 Methods 0 Regions
     tbxface-0598 [00] tb_load_namespace     : ACPI Tables successfully acquired
    evxfevnt-0091 [00] enable                : Transition to ACPI mode successful
    Using local APIC timer interrupts.
    What follows is starting out right out of Section 1 above.

    Get the DSDT.
    Code:
    jim@linux-bp92:~> su
    Password:
    linux-bp92:/home/jim # cat /proc/acpi/dsdt > /home/jim/dsdt.dat
    Disassemble the DSDT
    Code:
    linux-bp92:/home/jim # cd /usr/sbin
    linux-bp92:/usr/sbin # ./iasl -d /home/jim/dsdt.dat
    bash: ./iasl: No such file or directory
    linux-bp92:/usr/sbin # cd /usr/bin
    linux-bp92:/usr/bin # ./iasl -d /home/jim/dsdt.dat
    
    Intel ACPI Component Architecture
    AML Disassembler version 20080213 [Jun  6 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    Loading Acpi table from file /home/jim/dsdt.dat
    Acpi table [DSDT] successfully installed and loaded
    Pass 1 parse of [DSDT]
    Pass 2 parse of [DSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
    ......................................................................................................................................................................................................................................................................
    Parsing completed
    Disassembly completed, written to "/home/jim/dsdt.dsl"
    Find your errors & warnings.
    Code:
    linux-bp92:/usr/bin # cd /home/jim
    linux-bp92:/home/jim # ./iasl -tc dsdt.dsl
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler version 20080213 [Jun  6 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    dsdt.dsl   238:     Method (\_WAK, 1, NotSerialized)
    Warning  1079 -                 ^ Reserved method must return a value (_WAK)
    
    dsdt.dsl  3001:                     Field (RAM, AnyAcc, Lock, Preserve)
    Error    4074 -                              ^ Host Operation Region requires ByteAcc access
    
    dsdt.dsl  3896:             Method (_PSR, 0, NotSerialized)
    Warning  1086 -                        ^ Not all control paths return a value (_PSR)
    
    dsdt.dsl  3896:             Method (_PSR, 0, NotSerialized)
    Warning  1079 -                        ^ Reserved method must return a value (_PSR)
    
    ASL Input:  dsdt.dsl - 4011 lines, 143918 bytes, 1481 keywords
    Compilation complete. 1 Errors, 3 Warnings, 0 Remarks, 553 Optimizations
    linux-bp92:/home/jim #
    Let's fix that error and those warnings.

    1st. Method (\_WAK, 1, NotSerialized)

    That was presented above and I won't repeat it here; same fix.

    2nd dsdt.dsl 3001: Field (RAM, AnyAcc, Lock, Preserve)
    Error 4074 - ^ Host Operation Region requires ByteAcc access


    Change:
    Code:
                        })
                        OperationRegion (RAM, EmbeddedControl, 0x00, 0xFF)
                        Field (RAM, AnyAcc, Lock, Preserve)
                        {
    to
    Code:
                       })
                        OperationRegion (RAM, EmbeddedControl, 0x00, 0xFF)
                        Field (RAM, ByteAcc, Lock, Preserve)
                        {
    3rd and most difficult as I coulf not find a "fixed" set of code:
    dsdt.dsl 3896: Method (_PSR, 0, NotSerialized)
    Warning 1079 - ^ Reserved method must return a value (_PSR)


    Code:
                })
                Method (_PSR, 0, NotSerialized)
                {
                    If (\_SB.PCI0.PIB.EC.ECOK)
                    {
                        Return (\_SB.PCI0.PIB.EC.ADP)
                    }
                }
    One must search. I started with the ACPI Spec.

    From: ACPIspec20.pdf
    11.3.1 PSR (Power Source)
    Returns the current power source devices. Used for the AC adapter and is located under the AC adapter
    object in name space. Used to determine if system is running off the AC adapter.
    Arguments:
    None
    Result Code:
    0x00000000 – Off-line
    0x00000001 – On-line
    That's all the info available, but, we see that there are two values zero and one.

    I then went to Google Linux and searched for: "_PSR, 0, NotSerialized"
    _PSR, 0, NotSerialized - Google Search
    paying attention only to "AML Disassembler version" and machines close to my model.
    I finally gained enough confidence to try the following solution:

    Code:
                Method (_PSR, 0, NotSerialized)
                {
                    If (\_SB.PCI0.PIB.EC.ECOK)
                    {
                        Return (0x01)
                    }
                    Else
                    {
                        Return (0x00)
                    }
                }
    which seems to make sense, if on = "1"; if off = "0" being it's for the AC Adapter.

    Re-Compile the DSDT

    Code:
    linux-bp92:/home/jim # ./iasl -tc dsdt.dsl
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler version 20080213 [Jun  6 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    ASL Input:  dsdt.dsl - 4013 lines, 143942 bytes, 1482 keywords
    AML Output: /home/jim/dsdt.aml - 13963 bytes 489 named objects 993 executable opcodes
    
    Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 554 Optimizations
    linux-bp92:/home/jim #
    Important Step
    Rename dsdt.aml to DSDT.aml for the next step.

    Getting the kernel to use your fixed DSDT
    Code:
    jim@linux-bp92:~> su
    Password:
    linux-bp92:/home/jim # cd /usr/src/linux/Documentation/acpi
    linux-bp92:/usr/src/linux/Documentation/acpi # sh initramfs-add-dsdt.sh /boot/initrd-2.6.25.5-1.1-default /home/jim/DSDT.aml
    Success?
    Code:
    ACPI: Checking initramfs for custom DSDT
    ACPI: Found DSDT in DSDT.aml.
    ACPI: Override [DSDT-PTL_ACPI], this is unsafe: tainting kernel
    ACPI: Table DSDT replaced by host OS
    ACPI: DSDT 00000000, 368B (r1  VIA   PTL_ACPI  6040000 INTL 20080213)
    ACPI: DSDT override uses original SSDTs unless "acpi_no_auto_ssdt"Parsing all Control Methods:
    Table [DSDT](id 0001) - 458 Objects with 44 Devices 134 Methods 12 Regions
    Parsing all Control Methods:
    Table [SSDT](id 0002) - 2 Objects with 0 Devices 0 Methods 0 Regions
     tbxface-0598 [00] tb_load_namespace     : ACPI Tables successfully acquired
    evxfevnt-0091 [00] enable                : Transition to ACPI mode successful
    Using local APIC timer interrupts.
    Conclusion

    Yea, the process worked!

    0 Errors, 0 Warnings, 0 Remarks, 554 Optimizations = worth the effort.

    And, the laptop boots well and when AC is plugged in, it so reports it in powernow & battery icons,

    Have fun

    Note This is still a work-in-progress as I'm still editing it for correctness.
    Last edited by snakedriver; 07-Dec-2008 at 04:51.
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  4. #4
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 4. Fixing the DSDT on a new HP dv9700z
    Part 1.

    I have a new HP dv9700z + 2.6 GhZ AMD "Puma" laptop running both Vista 64-bit and openSUSE 11.0 x86-64.

    With both OSes everything seems to work out of the box, do I need to fix my DSDT?

    A look @ dmesg shows:
    ACPI: DSDT BFFE42C4, 9504 (r1 NVIDIA MCP65 6040000 MSFT 3000000)
    "MSFT 3000000" says it is compiled using the MS compiler -- which is reason enough.

    But: "dmesg | grep -2i acpi" and "find" "error" shows:
    ACPI Error (dsopcode-0550): Field [I9MN] at 544 exceeds Buffer [IORT] size 464 (bits) [20070126]
    ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPC0.PMIO._CRS] (Node ffff810135a8bad0), AE_AML_BUFFER_LIMIT
    ACPI Error (uteval-0233): Method execution failed [\_SB_.PCI0.LPC0.PMIO._CRS] (Node ffff810135a8bad0), AE_AML_BUFFER_LIMIT
    Getting rid of those errors is all the more reason to fix the DSDT.

    and
    "dmesg" has"
    444 ACPI Exception (thermal-0366): AE_BAD_DATA, No critical threshold [20070126]

    ***and***
    Read this: ACPI OSI disaster on latest HP laptops - critical temperature shutdowns
    at ACPI OSI disaster on latest HP laptops - critical temperature shutdowns | Linux | Kernel (The full thread is @ http://lkml.org/lkml/2008/7/24/286-- I recommend reading that through to the end to arrive at the same conclusion I will make later.)
    The problem:

    HP extensively makes use of ACPI thermal zones.
    It seems they hit a bug in Vista which probably caused their
    machines to be shut down through a critical temperature event.
    They now workaround that Vista bug by returning zero for _CRT
    (which is the critical temperature in Kelvin * 10).
    So they return -273 degree Celsius which leads to a critical
    temperature shutdown as soon as the ACPI thermal driver is loaded.
    In this part, I will address the above issue, make a recommendation and come back in the next part and finish the "Fixed DSDT" correcting as many errors and warning as possible.

    Back to the Vista bug:

    In Howto Fix Your Buggy DSDT. - Page 14 - openSUSE Forums, I recommended trying various kernel boot parameters:
    acpi_os_name="Microsoft Windows XP"
    acpi_os_name="Microsoft Windows 2000"
    acpi_os_name="Microsoft Windows 2000.1"
    acpi_os_name="Microsoft Windows ME: Millennium Edition"
    acpi_os_name="Linux"
    The explanation why is here: Gentoo Forums :: View topic - HOWTO: Fix Common ACPI Problems (DSDT, ECDT, etc.) PPG 10.a.

    However, while that kernel parameter appears valid according to: http://redsymbol.net/linux_boot_parameters/:
    acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
    Format: To spoof as Windows 98: ="Microsoft Windows"

    acpi_osi= [HW,ACPI] Modify list of supported OS interface strings
    acpi_osi="string1" # add string1 -- only one string
    acpi_osi="!string2" # remove built-in string2
    acpi_osi= # disable all strings
    the latter is used in my BIOS/DSDT version, as in:
    acpi_osi="Windows 2001 SP3"
    acpi_osi="Windows 2006"
    acpi_osi=Windows 2006 SP1"
    acpi_osi="Microsoft Windows NT"
    acpi_osi="Linux"
    etc.
    I have tried various kernel parameters listed and will discuss a few:

    Out of the box, with the stock BIOS/DSDT where it's set up for VistaSP1, my /proc/acpi/thermal_zone is not populated and neither is "fan" -- although my fan is running thank the good Lord.

    With both acpi_osi="Microsoft Windows NT" and acpi_osi="Linux", I get:
    Code:
    jim@linux-wwgh:~> cat /proc/acpi/thermal_zone/THRM/trip_points
    critical (S5):           95 C
    passive:                 88 C: tc1=2 tc2=3 tsp=100 devices=CPU0
    jim@linux-wwgh:~> cat /proc/acpi/thermal_zone/THRM/temperature
    temperature:             40 C
    although I seem to be missing "Active[0]"
    "fan" is again not populated

    I also get this difference in "dmesg(s)":
    line comment/action

    148 ACPI Added _OSI(Linux)

    232(flag) _OSI(Linux) query honored via DMI
    vs
    _OSI(Linux) query ignored via DMI

    445 ACPI: LNXTHERM:01 is registered as thermal_zone0
    446 ACPI: Thermal Zone [THRM] (30 C)
    vs
    444 ACPI Exception (thermal-0366): AE_BAD_DATA, No critical threshold [20070126]
    Conclusion

    I have added the kernel parameter acpi_osi="Microsoft Windows NT" to the kernel line in my Grub menu.lst.
    Why acpi_osi="Microsoft Windows NT" and not acpi_osi="Linux"?

    Answers:

    1, The reference the shown above, LKML: Thomas Renninger: ACPI OSI disaster on latest HP laptops - critical temperature shutdowns, indicates that current running kernel has been patched to account for this kernel parameter.

    2. My dv9700z laptop seems to run cooler over a longer period of time with acpi_osi="Microsoft Windows NT" than with acpi_osi="Linux.


    Note: In the next part, I will discuss the code fixes to date to my DSDT.

    Addendum:
    Code:
    echo -n "95:90:88:80:65" > /proc/acpi/thermal_zone/THRM/trip_points
    (to try to set Active [0]
    does not work; producing:
    bash: echo: write error: Input/output error
    which means to me that while my thermal system is working, the trip_points are set to read only and the fan is being controlled by the motherboard/BIOS setup (and as the BIOS controls are very user limited, I can't reset them).
    It's good enough though; I'll leave it alone for now
    Last edited by snakedriver; 10-Aug-2008 at 08:49.
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  5. #5
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 4. Fixing the DSDT on a new HP dv9700z
    Part 2.

    Still talking about my new HP dv9700z + 2.6 GhZ AMD "Puma" laptop running both Vista 64-bit and openSUSE 11.0 x86-64.

    In this part, I will be addressing this set of errors:

    "dmesg | grep -2i acpi" and "find" "error" shows:
    ACPI Error (dsopcode-0550): Field [I9MN] at 544 exceeds Buffer [IORT] size 464 (bits) [20070126]
    ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPC0.PMIO._CRS] (Node ffff810135a8bad0), AE_AML_BUFFER_LIMIT
    ACPI Error (uteval-0233): Method execution failed [\_SB_.PCI0.LPC0.PMIO._CRS] (Node ffff810135a8bad0), AE_AML_BUFFER_LIMIT
    Note: for this fix to work, one has to fix all the DSDT errors; this part will only address those above & I'll come back and address the rest.

    I had a reference, but can't seem to find it just now. It was surely a google/linux search for " Method execution failed [\_SB_.PCI0.LPC0.PMIO._CRS]"; anyway, I resolved it to searching for "PMI0" and then looking in my dsdt.dsl for the same (using the search feature). Edit: Try Ref: Gmane -- Mail To News And Back Again

    BTW, I got my dsdt.dsl as presented before.

    Original:
    Code:
                    Device (PMIO)
                    {
                        Name (_HID, EisaId ("PNP0C02"))
                        Name (_UID, 0x03)
                        Method (_CRS, 0, NotSerialized)
                        {
                            Name (IODM, ResourceTemplate ()
                            {
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x00,               // Alignment
                                    0x00,               // Length
                                    )
                            })
                            Name (IORT, ResourceTemplate ()
                            {
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y02)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y03)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y04)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y05)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y06)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y07)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x40,               // Length
                                    )
                            })
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y02._MIN, I1MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y02._MAX, I1MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y03._MIN, I2MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y03._MAX, I2MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y04._MIN, I3MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y04._MAX, I3MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y05._MIN, I4MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y05._MAX, I4MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y06._MIN, I5MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y06._MAX, I5MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y07._MIN, I6MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y07._MAX, I6MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y09._MIN, I9MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y09._MAX, I9MX)
                            And (\_SB.PCI0.SMB0.PMBR, 0xFFFC, I1MN)
                            Store (I1MN, I1MX)
                            Add (I1MN, 0x80, Local0)
                            Store (Local0, I2MN)
                            Store (Local0, I2MX)
                            And (\_SB.PCI0.SMB0.NVSB, 0xFFFC, I3MN)
                            Store (I3MN, I3MX)
                            Add (I3MN, 0x80, Local0)
                            Store (Local0, I4MN)
                            Store (Local0, I4MX)
                            And (\_SB.PCI0.SMB0.ANLG, 0xFFFC, I5MN)
                            Store (I5MN, I5MX)
                            Add (I5MN, 0x80, Local0)
                            Store (Local0, I6MN)
                            Store (Local0, I6MX)
                            And (\_SB.PCI0.SMB0.SB7C, 0xFFFC, I9MN)
                            Store (I9MN, I9MX)
                            If (I1MN)
                            {
                                Store (IORT, Local0)
                            }
                            Else
                            {
                                Store (IODM, Local0)
                            }
    
                            Return (Local0)
                        }
                    }
                }
    Note: too long to post; I will finish in the next post.
    Last edited by snakedriver; 11-Aug-2008 at 05:31.
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  6. #6
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 4. Fixing the DSDT on a new HP dv9700z
    Part 2. Continued

    Fixed:
    Code:
                    Device (PMIO)
                    {
                        Name (_HID, EisaId ("PNP0C02"))
                        Name (_UID, 0x03)
                        Method (_CRS, 0, NotSerialized)
                        {
                            Name (IODM, ResourceTemplate ()
                            {
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x00,               // Alignment
                                    0x00,               // Length
                                    )
                            })
                            Name (IORT, ResourceTemplate ()
                            {
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y02)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y03)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y04)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y05)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y06)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x80,               // Length
                                    _Y07)
                                IO (Decode16,
                                    0x0000,             // Range Minimum
                                    0x0000,             // Range Maximum
                                    0x01,               // Alignment
                                    0x40,               // Length
             deleted -->            )
               added -->            _Y09)
                            })
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y02._MIN, I1MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y02._MAX, I1MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y03._MIN, I2MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y03._MAX, I2MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y04._MIN, I3MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y04._MAX, I3MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y05._MIN, I4MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y05._MAX, I4MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y06._MIN, I5MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y06._MAX, I5MX)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y07._MIN, I6MN)
                            CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y07._MAX, I6MX)
    deleted -->         CreateWordField (IORT, 0x42, I9MN)
    deleted -->         CreateWordField (IORT, 0x44, I9MX)
    added -->          CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y09._MIN, I9MN)
    added -->          CreateWordField (IORT, \_SB.PCI0.LPC0.PMIO._CRS._Y09._MAX, I9MX)
                            And (\_SB.PCI0.SMB0.PMBR, 0xFFFC, I1MN)
                            Store (I1MN, I1MX)
                            Add (I1MN, 0x80, Local0)
                            Store (Local0, I2MN)
                            Store (Local0, I2MX)
                            And (\_SB.PCI0.SMB0.NVSB, 0xFFFC, I3MN)
                            Store (I3MN, I3MX)
                            Add (I3MN, 0x80, Local0)
                            Store (Local0, I4MN)
                            Store (Local0, I4MX)
                            And (\_SB.PCI0.SMB0.ANLG, 0xFFFC, I5MN)
                            Store (I5MN, I5MX)
                            Add (I5MN, 0x80, Local0)
                            Store (Local0, I6MN)
                            Store (Local0, I6MX)
                            And (\_SB.PCI0.SMB0.SB7C, 0xFFFC, I9MN)
                            Store (I9MN, I9MX)
                            If (I1MN)
                            {
                                Store (IORT, Local0)
                            }
                            Else
                            {
                                Store (IODM, Local0)
                            }
    
                            Return (Local0)
                        }
                    }
                }
    Compiles w/o error & makes those errors go away

    --end of part 2--
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  7. #7
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 4. Fixing the DSDT on a new HP dv9700z
    Part 3.

    Ok, let's tackle the DSDT's errors and warnings.
    I will state up front that I still have not completely solved 4 warnings associated with _HOT & _CRT which is part of that HP Vista mess discussed in part 1.

    As I have done this explanation twice already, I pickup at "Find your errors & warnings" found in the 1st post of this thread.

    Code:
    jim@linux-wwgh:~> cd /home/jim
    jim@linux-wwgh:~> ./iasl -tc dsdt.dsl
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler version 20080213 [Jun  6 2008]
    Copyright (C) 2000 - 2008 Intel Corporation
    Supports ACPI Specification Revision 3.0a
    
    dsdt.dsl    99:     Method (\_WAK, 1, NotSerialized)
    Warning  1079 -                 ^ Reserved method must return a value (_WAK)
    
    dsdt.dsl  3676:                 Method (_Q16, 0, NotSerialized)
    Warning  1086 -                            ^ Not all control paths return a valu
    e (_Q16)
    
    dsdt.dsl  6750:                     Method (_EJ0, 0, NotSerialized)
    Warning  1076 -                                ^ Reserved method has too few arg
    uments (_EJ0 requires 1)
    
    dsdt.dsl  8056:                 Method (_HOT, 0, Serialized)
    Warning  1086 -                            ^ Not all control paths return a valu
    e (_HOT)
    
    
    dsdt.dsl  8056:                 Method (_HOT, 0, Serialized)
    Warning  1079 -                            ^ Reserved method must return a value                    (_HOT)
    
    
    dsdt.dsl  8058:                     Zero
    Error    4094 -                        ^ syntax error, unexpected PARSEOP_ZERO
    
    dsdt.dsl  8065:                 Method (_CRT, 0, Serialized)
    Warning  1086 -                            ^ Not all control paths return a valu                   e (_CRT)
    
    dsdt.dsl  8065:                 Method (_CRT, 0, Serialized)
    Warning  1079 -                            ^ Reserved method must return a value                    (_CRT)
    
    dsdt.dsl  8067:                     Zero
    Error    4094 -                        ^ syntax error, unexpected PARSEOP_ZERO
    
    ASL Input:  dsdt.dsl - 8479 lines, 298450 bytes, 4483 keywords
    Compilation complete. 2 Errors, 7 Warnings, 0 Remarks, 1227 Optimizations
    jim@linux-wwgh:~>
    Let's fix them one at a time:

    1. dsdt.dsl 99: Method (\_WAK, 1, NotSerialized)
    Warning 1079 - ^ Reserved method must return a value (_WAK)

    Original:
    Code:
        Method (\_WAK, 1, NotSerialized)
        {
            Or (Arg0, 0x50, DBUG)
            If (LEqual (Arg0, 0x03))
            {
                Acquire (\_SB.PCI0.PSMX, 0xFFFF)
                Store (0x84, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, Local0)
                Release (\_SB.PCI0.PSMX)
                Notify (\_SB.PWRB, 0x02)
                Z000 ()
                Notify (\_SB.PCI0.XVR1, 0x00)
            }
    
            If (LEqual (Arg0, 0x04))
            {
                Acquire (\_SB.PCI0.PSMX, 0xFFFF)
                Store (0x85, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, Local0)
                Release (\_SB.PCI0.PSMX)
                Store (Zero, S4FL)
                Store (Zero, S4RT)
                Notify (\_SB.PWRB, 0x02)
                Z000 ()
                Acquire (\_SB.PCI0.PSMX, 0xFFFF)
                Store (0x0A, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK0)
                Store (0x0B, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK1)
                Store (0x0C, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK2)
                Store (0x0D, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK3)
                Release (\_SB.PCI0.PSMX)
            }
        }
    Fixed:
    Code:
        Method (\_WAK, 1, NotSerialized)
        {
            Or (Arg0, 0x50, DBUG)
            If (LEqual (Arg0, 0x03))
            {
                Acquire (\_SB.PCI0.PSMX, 0xFFFF)
                Store (0x84, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, Local0)
                Release (\_SB.PCI0.PSMX)
                Notify (\_SB.PWRB, 0x02)
                Z000 ()
                Notify (\_SB.PCI0.XVR1, 0x00)
            }
    
            If (LEqual (Arg0, 0x04))
            {
                Acquire (\_SB.PCI0.PSMX, 0xFFFF)
                Store (0x85, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, Local0)
                Release (\_SB.PCI0.PSMX)
                Store (Zero, S4FL)
                Store (Zero, S4RT)
                Notify (\_SB.PWRB, 0x02)
                Z000 ()
                Acquire (\_SB.PCI0.PSMX, 0xFFFF)
                Store (0x0A, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK0)
                Store (0x0B, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK1)
                Store (0x0C, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK2)
                Store (0x0D, \_SB.PCI0.SMIS)
                Store (0x86, \_SB.PCI0.SMIC)
                Store (\_SB.PCI0.SMIS, CTK3)
                Release (\_SB.PCI0.PSMX)
            }
            Return(Package(0x02){0x00, 0x00})    <-- added that line
        }
    Continued in the next part...
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  8. #8
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 4. Fixing the DSDT on a new HP dv9700z
    Part 3 continued 1

    2. dsdt.dsl 3676: Method (_Q16, 0, NotSerialized)
    Warning 1086 - ^ Not all control paths return a valu
    e (_Q16)

    Original:
    Code:
                    Method (_Q16, 0, NotSerialized)
                    {
                        Store (QBBB, Local0)
                        If (LEqual (Local0, 0x03))
                        {
                            Notify (\_SB.MUBN, 0x02)
                            Return (0x00)
                        }
    
                        If (LEqual (Local0, 0x06))
                        {
                            Notify (\_SB.PIBN, 0x02)
                            Return (0x00)
                        }
    
                        If (LEqual (Local0, 0x12))
                        {
                            Notify (\_SB.VOBN, 0x02)
                            Return (0x00)
                        }
    
                        If (LEqual (Local0, 0x11))
                        {
                            Notify (\_SB.LVBN, 0x02)
                            Return (0x00)
                        }
    
                        Store (0x04, \_SB.WMID.Z013)
                        Store (0x00, \_SB.WMID.Z014)
                        Notify (\_SB.WMID, 0x80)
                    }
    Fixed:

    Code:
                    Method (_Q16, 0, NotSerialized)
                    {
                        Store (QBBB, Local0)
                        If (LEqual (Local0, 0x03))
                        {
                            Notify (\_SB.MUBN, 0x02)
                            Return (0x00)
                        }
    
                        If (LEqual (Local0, 0x06))
                        {
                            Notify (\_SB.PIBN, 0x02)
                            Return (0x00)
                        }
    
                        If (LEqual (Local0, 0x12))
                        {
                            Notify (\_SB.VOBN, 0x02)
                            Return (0x00)
                        }
    
                        If (LEqual (Local0, 0x11))
                        {
                            Notify (\_SB.LVBN, 0x02)
                            Return (0x00)            
                        }
    
                        Store (0x04, \_SB.WMID.Z013)
                        Store (0x00, \_SB.WMID.Z014)
                        Notify (\_SB.WMID, 0x80)
                        Return (0x00)                <--- added that line
                    }
    Continued in the next part...
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  9. #9
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 4. Fixing the DSDT on a new HP dv9700z
    Part 3 continued 2

    3. dsdt.dsl 6750: Method (_EJ0, 0, NotSerialized)
    Warning 1076 - ^ Reserved method has too few arg
    uments (_EJ0 requires 1)

    Original.

    Code:
                        Method (_EJ0, 0, NotSerialized)
                        {
                            Return (0x00)
                        }
    Fixed:

    Code:
                       Method (_EJ0, 1, NotSerialized)   <-- changed the "0" to a "1"
                        {
                            Return (0x00)
                        }
    Not sure of this; compiles w/o error and nothing strange happens

    Continued in the next part...
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

  10. #10
    Join Date
    Mar 2008
    Location
    NE Arkansas
    Posts
    1,126

    Default Re: How To Fix Your Buggy DSDT

    Section 4. Fixing the DSDT on a new HP dv9700z
    Part 3 continued 3

    4.dsdt.dsl 8056: Method (_HOT, 0, Serialized)
    Warning 1086 - ^ Not all control paths return a valu
    e (_HOT)


    dsdt.dsl 8056: Method (_HOT, 0, Serialized)
    Warning 1079 - ^ Reserved method must return a value (_HOT)


    dsdt.dsl 8058: Zero
    Error 4094 - ^ syntax error, unexpected PARSEOP_ZERO

    AND

    5.dsdt.dsl 8065: Method (_CRT, 0, Serialized)
    Warning 1086 - ^ Not all control paths return a value (_CRT)

    dsdt.dsl 8065: Method (_CRT, 0, Serialized)
    Warning 1079 - ^ Reserved method must return a value (_CRT)

    dsdt.dsl 8067: Zero
    Error 4094 - ^ syntax error, unexpected PARSEOP_ZERO

    These are directly related to the HP Vista bug presented in part1 and specifically the reference ACPI OSI disaster on latest HP laptops - critical temperature shutdowns | Linux | Kernel
    Code:
    # BIOS checks which OS is running (most parts cut off)
    # Linux is returning true for all but not for "Windows 2006 SP1"
    # (Vista SP1) and not for "Linux" 
    ...
    # Valid critical/hot temperature: 105 (0x69)
    Name (TPC, 0x69)
    ...
    Method (_HOT, 0, Serialized)
    {
    # Match for Vista only, not for Vista SP1 !
    !!! If (LEqual (TPOS, 0x40))
    {
    Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
    Else
    {
    Return (Zero)
    }
    }
    Method (_CRT, 0, Serialized)
    {
    # Returns valid values for all Windows version before Vista
    !!! If (LLess (TPOS, 0x40))
    {
    # This is the valid one: 105 C -> (105 * 10) + 2732 (Kelvin * 10)
    Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
    Else
    {
    # This is returned on Windows Vista
    Return (Zero)
    }
    }
    So, let's fix what we can of mine:

    Original:

    Code:
                    Method (_HOT, 0, Serialized)
                    {
                        Zero
                        If (LEqual (OSYS, 0x07D6))
                        {
                            Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
                        }
                    }
    
                    Method (_CRT, 0, Serialized)
                    {
                        Zero
                        If (LLess (OSYS, 0x07D6))
                        {
                            Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
                        }
                    }
    I tried:

    Code:
                    Method (_HOT, 0, Serialized)
                    {
                        If (LEqual (OSYS, 0x07D6))
                        {
                            Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
                        }
                        Else
                        {
                        Return (Zero)
                        }
                    }
    
                    Method (_CRT, 0, Serialized)
                    {
                        If (LLess (OSYS, 0x07D6))
                        {
                            Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
                        }
                        Else
                        {
                        Return (Zero)
                        }
                    }
    that compiled w/o error, but, it made the laptop "shutdown" at near end of boot.

    Fixed:

    Code:
                    Method (_HOT, 0, Serialized)
                    {
                        If (LEqual (OSYS, 0x07D6))
                        {
                            Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
                        }
                    }
    
                    Method (_CRT, 0, Serialized)
                    {
                        If (LLess (OSYS, 0x07D6))
                        {
                            Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
                        }
                    }
    where I deleted the two instances of "Zero"

    That compiles w/o error, but, leaves me with 4 warnings:
    dsdt.dsl 8056: Method (_HOT, 0, Serialized)
    Warning 1086 - ^ Not all control paths return a valu
    e (_HOT)


    dsdt.dsl 8056: Method (_HOT, 0, Serialized)
    Warning 1079 - ^ Reserved method must return a value (_HOT)

    AND

    dsdt.dsl 8065: Method (_CRT, 0, Serialized)
    Warning 1086 - ^ Not all control paths return a value (_CRT)

    dsdt.dsl 8065: Method (_CRT, 0, Serialized)
    Warning 1079 - ^ Reserved method must return a value (_CRT)
    So finally, "./iasl -tc dsdt.dsl" results in:
    Compilation complete. 0 Errors, 4 Warnings, 0 Remarks, 1230 Optimizations

    I'd say: "0 Errors, 4 Warnings, 0 Remarks, 1230 Optimizations" makes all the above (and a little searching) worthwhile

    Now if we read completely through the thread @ http://lkml.org/lkml/2008/7/24/286; we can determine that we can probably safely delete the _HOT and _CRT dsdt.dsl sections above.

    However, I am presently running with the 4 warnings.

    I'll periodically revisit this particular issue and any kernel updates that may totally correct the HP Vista bug.

    ---end of Section 4---

    Have fun
    Last edited by snakedriver; 10-Aug-2008 at 11:00.
    Desktop Asus X-99 Viper. uefi & secure Boot, Win10, Leap 15.1 B & Leap 43.2; and, Laptop: ASUS GL752VW Optimus, uefi+Secure Boot, Win10, Leap 15 & T-weed

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •