Bug 14710 - ACPI Parse/Setup failure on HP Core I7 Laptop (Pavilion dv7-3085dx)
Summary: ACPI Parse/Setup failure on HP Core I7 Laptop (Pavilion dv7-3085dx)
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Tables (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Lin Ming
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-01 03:47 UTC by Brendan W. McAdams
Modified: 2011-06-12 18:28 UTC (History)
8 users (show)

See Also:
Kernel Version: 2.6.31 & 2.6.31 RC7 & 8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output from boot. (66.92 KB, text/plain)
2009-12-01 03:47 UTC, Brendan W. McAdams
Details
Allow early EC init (647 bytes, patch)
2009-12-01 09:07 UTC, Alexey Starikovskiy
Details | Diff
acpidump output. (252.07 KB, application/octet-stream)
2009-12-02 04:22 UTC, Brendan W. McAdams
Details
Output of lspci -vxxx (53.14 KB, text/plain)
2009-12-02 04:22 UTC, Brendan W. McAdams
Details
dmidecode output (serials & asset tags stripped) (10.21 KB, application/octet-stream)
2009-12-02 04:53 UTC, Brendan W. McAdams
Details
debug patch #2 (340 bytes, patch)
2009-12-02 08:07 UTC, Alexey Starikovskiy
Details | Diff
Make DSDT conforming (1.27 KB, patch)
2009-12-07 09:00 UTC, Alexey Starikovskiy
Details | Diff
patch to execute module-level code under Device correctly (6.20 KB, patch)
2009-12-08 07:15 UTC, Lin Ming
Details | Diff
evaluate _PDC much earlier (9.45 KB, patch)
2009-12-20 19:39 UTC, Alex Chiang
Details | Diff

Description Brendan W. McAdams 2009-12-01 03:47:45 UTC
Created attachment 23978 [details]
dmesg output from boot.

I've been having issues with a new HP laptop, a DV7-3085dx and getting ACPI properly functioning.  Passing acpi_osi=Linux as a kernel param makes a HUGE difference in exposing c-states, etc; however, I still get AE_NOT_FOUND and AE_NOT_EXIST errors.  It seems as a result the fans don't get run all the way, and I see some high CPU temps with load; as a result, on reboot I get a "helpful" HP BIOS warning that my machine hasn't been properly managing the fan.  (it actually tells me it was forced to hibernate due to temp issues).

The overall specs are Core I7 Q 720 & 1.60 GHz (4 hyperthreaded cores [4 physical 8 logical]), 6 gigs DDR3, 500 gig SATA and a nvidia 230m with 1 gig of discreet ram.  Overall a heat generator.

I would love to make this machine work - in fact, with some guidance I am more than happy to put in the work to write code to either debug, dump or fix the issues.  My C is up and down but I've done some Kernel work before.  I  love this laptop, but Windows 7 is tolerable at best.  When it works Linux runs like a dream on it - I am just risking overheating the machine and HP has demonstrated a lack of interest in fixing it (identical issues on the Envy series core i7s - apparently they outsource their bios development to Insyde).

I have compiled a few kernels, running Ubuntu 9.10's stock 2.6.31 kernel, as well as custom compiled 2.6.32-rc7 and 2.6.37-rc8.  With acpi_osi=Linux I get fairly far but eventually after bootign the thermal zones, etc on the processor it fails.

I've attached the the dmesg output.  I'm desperate for a fix, or a pointer as to how to fix it myself since I suspect if any kernel developers had the machine they'd have fixed it themselves already ;)  I can provide the DSDT if necessary, although it fails to compile with IASL ( I believe it is compiled by nvidia using the msft compiler from the reading I've done ). 

On the dmesg, failure section begins at line 398.  Any tips on working around it / hacking it?
Comment 1 ykzhao 2009-12-01 07:23:07 UTC
Will you please attach the output of acpidump, lspci -vxxx on your box?

Thanks.
Comment 2 Alexey Starikovskiy 2009-12-01 09:07:26 UTC
Created attachment 23982 [details]
Allow early EC init

Please check if this patch helps. Please post output from dmidecode if it does.
Comment 3 Brendan W. McAdams 2009-12-02 04:21:16 UTC
No luck on the patch; same results.  I do note video (specifically X starting) is acting a bit strange with the patch.  

Still the same parse failures occurring however:

[    1.385102] bio: create slab <bio-0> at 0
[    1.386652] ACPI: EC: Look up EC in DSDT
[    1.390638] ACPI Error (psargs-0359): [\_PR_.CPU0._PPC] Namespace lookup failure, AE_NOT_FOUND
[    1.390649] ACPI Error (psparse-0537): Method parse/execution failed [\CPUT] (Node ffff8801b905a120), AE_NOT_FOUND
[    1.390700] ACPI Error (psparse-0537): Method parse/execution failed [\PSSC] (Node ffff8801b905a140), AE_NOT_FOUND
[    1.390749] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._REG] (Node ffff8801b903c720), AE_NOT_FOUND
[    1.390817] Fail in evaluating the _REG object of EC device. Broken bios is suspected.
[    1.392109] ACPI: Executed 2 blocks of module-level executable AML code
[    1.395660] ACPI: BIOS _OSI(Linux) query honored via cmdline
[    1.406957] ACPI: Interpreter enabled
[    1.406963] ACPI: (supports S0 S3 S4 S5)
[    1.407009] ACPI: Using IOAPIC for interrupt routing
[    1.421477] ACPI Error: No handler for Region [PCFG] (ffff8801b92511b0) [PCI_Config] (20090903/evregion-319)
[    1.421483] ACPI Error: Region PCI_Config(2) has no handler (20090903/exfldio-295)
[    1.421489] ACPI Error (psparse-0537): Method parse/execution failed [\J380._STA] (Node ffff8801b9254120), AE_NOT_EXIST
[    1.421750] ACPI: EC: GPE = 0x16, I/O: command/status = 0x66, data = 0x62

I will attach lspci and acpidump.
Comment 4 Brendan W. McAdams 2009-12-02 04:22:09 UTC
Created attachment 23990 [details]
acpidump output.

attaching the acpidump output, as requested.
Comment 5 Brendan W. McAdams 2009-12-02 04:22:43 UTC
Created attachment 23991 [details]
Output of lspci -vxxx

As requested, lspci output.
Comment 6 Brendan W. McAdams 2009-12-02 04:53:38 UTC
Created attachment 23993 [details]
dmidecode output (serials & asset tags stripped)

For good measure, because nothing makes things better like WAY too much information... This is my dmidecode output.
Comment 7 Alexey Starikovskiy 2009-12-02 08:07:12 UTC
Created attachment 23994 [details]
debug patch #2

Lets try other way around. Please check if this patch changes anything?
Comment 8 Brendan W. McAdams 2009-12-06 18:58:25 UTC
I see no change with the second patch (FYI, I ran through the first patch again and it makes things worse definitively - the C-States for CPU thermal zone disappear).
Comment 9 Alexey Starikovskiy 2009-12-07 08:56:55 UTC
This is good. It means that changes to EC driver are not related.
Comment 10 Alexey Starikovskiy 2009-12-07 09:00:56 UTC
Created attachment 24070 [details]
Make DSDT conforming

Now the bad news: DSDT of your machine uses unsupported 'if' statements outside of the methods. I fear you may need to use customized DSDT in order to use your machine with Linux.
Instructions how to do that are here:
http://www.lesswatts.org/projects/acpi/overridingDSDT.php
Comment 11 Alexey Starikovskiy 2009-12-07 09:03:53 UTC
I've added CC: Bob Moore -- he may be more precise on "if statement outside of method" issue.
Comment 12 Lin Ming 2009-12-08 07:15:00 UTC
Created attachment 24088 [details]
patch to execute module-level code under Device correctly

The module-level code ("if statement outside of method") has been supported since 2.6.31-rc7 (commit 7f0c826).

> ACPI Error: No handler for Region [ERAM] (ffff8801b904c3f0) [EmbeddedControl]
> ACPI Error: Region EmbeddedControl(3) has no handler (20090903/exfldio-295)
> ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0._INI]
> (Node ffff8801b9058ba0), AE_NOT_EXIST

This error is caused by accessing EC fields without check ECON.
    Scope (_SB.PCI0)
    {
        Method (_INI, 0, NotSerialized)
        {
            Store (0x07D0, OSYS)
            If (CondRefOf (_OSI, Local0))
            {
                If (_OSI ("Linux"))
                {
                    Store (0x03E8, OSYS)
                    Store (One, ^LPCB.EC0.ECOS)
                }
      .....

Store (One, ^LPCB.EC0.ECOS) should be changed to,
If (ECON)
{
   Store (One, ^LPCB.EC0.ECOS)
}
Remove acpi_osi=Linux param can also fix this error.

> ACPI Error (psargs-0359): [\_PR_.CPU0._PPC] Namespace lookup failure,
> AE_NOT_FOUND
> ACPI Error (psparse-0537): Method parse/execution failed [\CPUT] (Node
> ffff8801b905a120), AE_NOT_FOUND
> ACPI Error (psparse-0537): Method parse/execution failed [\PSSC] (Node
> ffff8801b905a140), AE_NOT_FOUND
> ACPI Error (psparse-0537): Method parse/execution failed
> [\_SB_.PCI0.LPCB.EC0_._REG] (Node ffff8801b903c720), AE_NOT_FOUND

This error makes sense since _PPC does not exist at all.

> ACPI Error: No handler for Region [PCFG] (ffff8801b9077f78) [PCI_Config]
> (20090903/evregion-319)
> ACPI Error: Region PCI_Config(2) has no handler (20090903/exfldio-295)
> ACPI Error (psparse-0537): Method parse/execution failed [\J380._STA] (Node
> ffff8801b90feac0), AE_NOT_EXIST

The attached patch should fix this error.

Please apply this patch and remove the "acpi_osi=Linux" param.
Attach dmesg, let's see what happens.
Comment 13 Robert Moore 2009-12-08 18:21:35 UTC
>Passing acpi_osi=Linux as a kernel param makes a HUGE
>difference in exposing c-states, etc

We should try to figure this out also. You should not need to use OSI=Linux. Basically, as has been discovered, the AML code executes down a non-tested path.
Comment 14 Brendan W. McAdams 2009-12-08 18:47:02 UTC
Alright, I'm confused as to which of the last 2 patches I should apply, or if I should do both the DSDT and the nseval.c patches?

With regards to the DSDT, If I recall correctly I now have to hard compile the DSDT into the kernel correct?  I believe I read somewhere that as of 2.6.3x you can no longer have a custom DSDT load at boot time?

I'll try to give this a shot tonight and see what happens.

The other issue I've forgotten to mention is the hanging during suspend, but I suspect resolving the ACPI boot will solve this.
Comment 15 Brendan W. McAdams 2009-12-08 18:48:52 UTC
With regards to the comments regarding the acpi_osi parameter, the behavior I've noted is specifically that the thermal zones for the CPU only appear when I pass acpi_osi.  If I boot without it, or with any of the Windows options I get no thermal zone.
Comment 16 Alexey Starikovskiy 2009-12-08 18:59:25 UTC
Try the nseval patch first. If it does not help, you could start changing DSDT.
Comment 17 Robert Moore 2009-12-08 20:05:49 UTC
> ACPI Error: No handler for Region [ERAM] (ffff8801b904c3f0) [EmbeddedControl]

Fix for this is to either patch the DSDT or do not use acpi_osi=Linux.

> ACPI Error: No handler for Region [PCFG] (ffff8801b9077f78) [PCI_Config]
> (20090903/evregion-319)

Fix for this is the nseval patch.

> ACPI Error (psargs-0359): [\_PR_.CPU0._PPC] Namespace lookup failure,
> AE_NOT_FOUND

This appears to be a BIOS bug that cannot be worked around in the OS.
Comment 18 Lin Ming 2009-12-09 02:29:30 UTC
(In reply to comment #15)
> With regards to the comments regarding the acpi_osi parameter, the behavior
> I've noted is specifically that the thermal zones for the CPU only appear
> when
> I pass acpi_osi.  If I boot without it, or with any of the Windows options I
> get no thermal zone.

This is because _CRT returns different value depend on OSYS.

               If (_OSI ("Linux"))
                {
                    Store (0x03E8, OSYS)
                    Store (One, ^LPCB.EC0.ECOS)
                }

                If (_OSI ("Windows 2001"))
                {
                    Store (0x07D1, OSYS)
                }

                If (_OSI ("Windows 2001 SP1"))
                {
                    Store (0x07D1, OSYS)
                }

                If (_OSI ("Windows 2001 SP2"))
                {
                    Store (0x07D2, OSYS)
                }

                If (_OSI ("Windows 2006"))
                {
                    Store (0x07D6, OSYS)
                }

                If (_OSI ("Windows 2009"))
                {
                    Store (0x07D9, OSYS)
                }

        ThermalZone (TZ01)
        {
            Method (_CRT, 0, Serialized)
            {
                If (LLess (OSYS, 0x07D6))
                {
                    Store (0x69, S4TP)
                    Return (0x0EC6)
                }
            }
         }

With acpi_osi=Linux,
OSYS=0x03E8, because method fails on Store (One, ^LPCB.EC0.ECOS)
_CRT=0x0EC6

Without acpi_osi=Linux, or with any Windows option
OSYS=0x07D9
_CRT=0

If _CRT=0, thermal zone disappear.
So thermal zone only appear if acpi_osi=Linux
Comment 19 Robert Moore 2009-12-09 18:52:06 UTC
So, a possible fix to the DSDT might be to modify _CRT for each thermal zone:

ThermalZone (TZ01)
{
    Method (_CRT, 0, Serialized)
    {
        Store (0x69, S4TP)
        Return (0x0EC6)
    }
}
Comment 20 Alex Chiang 2009-12-20 19:39:13 UTC
Created attachment 24237 [details]
evaluate _PDC much earlier

Brendan,

Would you mind testing this patch? It applies on top of the latest git kernel.

Using it on my HP Envy 15 resolves the namespace errors.

You may also want to check for an updated BIOS for your machine. They have definitely updated the Envy BIOS recently, and I have heard rumours that they also updated the dv6/dv7 as well.

Thanks,
/ac
Comment 21 Alex Chiang 2010-01-16 15:44:21 UTC
Brendan,

If you're still out there, any chance you could attach the output of 'sudo dmidecode' ?

Thanks,
/ac
Comment 22 Alex Chiang 2010-01-16 15:44:54 UTC
Brendan, scratch that, I'm an idiot. Sorry for the noise.
Comment 23 Brendan W. McAdams 2010-02-04 00:18:02 UTC
I am in fact still out here... Just been incredibly busy lately.

HP pushed out a BIOS update in late december intended apparently to make the USB subsystem start working correctly with iPhones and iPods (the only noted change in the changelogs).

Following this update, booting into Linux no longer causes the system to scream about overheating on next reboot.  I haven't looked too deeply at the dmesg output, but I suspect things are still fairly wonky. It does help to not have the machine trying to convince me it's melting all the time.

Let me know what other data I can provide.  I'm seeing some other issues that appear related to the NVidia card (Switching out of X to a text console starts... wavy fuzziness on the screen which doesn't go away once you switch back to X, and the machine won't sleep / hibernate at all - attempting to do so drops it to a blinking white cursor on black.) but I'm not sure how to approach those next.
Comment 24 Lin Ming 2010-02-04 06:34:16 UTC
This bug report is a bit confused now. It's better to focus on one problem at each bug report.
Let's do a cleanup, the issues listed as below,

1. ACPI Error: No handler for Region [ERAM] (ffff8801b904c3f0) [EmbeddedControl]

Fix for this is do not use acpi_osi=Linux.

2. ACPI Error: No handler for Region [PCFG] (ffff8801b9077f78) [PCI_Config] (20090903/evregion-319)

Please try 2.6.33-rc1 or later, it should has been fixed by
commit 9a884ab(ACPICA: Add additional module-level code support)

3. ACPI Error (psargs-0359): [\_PR_.CPU0._PPC] Namespace lookup failure, AE_NOT_FOUND

This appears to be a BIOS bug that cannot be worked around in the OS.

4. High CPUS temps with load.

Brendan,
Could you try 2.6.33-rc1 or later(do not use acpi_osi=Linux) and tell us the status of above 4 issues?

Thanks.
Comment 25 Zhang Rui 2010-02-04 07:19:16 UTC
(In reply to comment #24)
> This bug report is a bit confused now. It's better to focus on one problem at
> each bug report.

right.

> 
> Brendan,
> Could you try 2.6.33-rc1 or later(do not use acpi_osi=Linux) and tell us the
> status of above 4 issues?
> 
if there are any other issues, please list them one by one and let's see which of them need new bug reports filed.
Comment 26 Lin Ming 2010-02-21 07:14:12 UTC
Brendan,

any update of my questions at comment #24?
Comment 27 Zhang Rui 2010-03-09 08:45:01 UTC
ping...
Comment 28 Zhang Rui 2010-03-26 03:03:56 UTC
close this bug as there is no response from the bug reporter for more than a month,
Brendan, please re-open it if you can provide the info requested.

Note You need to log in before you can comment on or make changes to this bug.