Bug 19762

Summary: Intel_idle does not Detect C6 - MSI Wind U110
Product: Power Management Reporter: Dennis Jansen (dennis.jansen)
Component: OtherAssignee: Len Brown (lenb)
Severity: normal CC: acpi-bugzilla, florian, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.35 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg (2.6.35-22ck-generic Ubuntu)
enable Atom C6
refreshed patch vs 2.6.36-rc7 enabling ATM-C6
patch: install table handler before any dynamic tables are loaded

Description Dennis Jansen 2010-10-05 05:31:12 UTC
I will attach acpidump and dmesg.
Comment 1 Dennis Jansen 2010-10-05 05:32:26 UTC
Created attachment 32582 [details]
dmesg (2.6.35-22ck-generic Ubuntu)
Comment 2 Dennis Jansen 2010-10-05 05:33:33 UTC
Created attachment 32592 [details]
Comment 3 Len Brown 2010-10-05 17:30:52 UTC
thanks for the acpidump.
please attach a copy of the files found under

> intel_idle: MWAIT substates: 0x3020220
> intel_idle: v0.4 model 0x1C
> intel_idle: lapic_timer_reliable_states 0x6

Yep, this system advertises C6 with 3 sub-states.
Please paste the output from 'cat /proc/cpuinfo' and 'lspci'
Comment 4 Dennis Jansen 2010-10-07 05:52:02 UTC
Created attachment 32642 [details]
Comment 5 Dennis Jansen 2010-10-07 05:52:28 UTC
Created attachment 32652 [details]
Comment 6 Len Brown 2010-10-07 17:26:08 UTC
> There are no files in .../dynamic/

Hmmm, please check again when disabling intel_idle
(via CONFIG_INTEL_IDLE=n or "acpi_idle.max_cstate=0")

or if that doesn't work, you should be able to
get the same data files manually this way:

acpidump -a 0x7FAA0270 -l 0x00000259 > cpu0ist.dat
acpidump -a 0x7FAA01A0 -l 0x000000CC > cpu1ist.dat
acpidump -a 0x7FAA0560 -l 0x0000072D > cpu0cst.dat
acpidump -a 0x7FAA04D0 -l 0x00000085 > cpu1cst.dat
Comment 7 Len Brown 2010-10-07 17:35:11 UTC
Created attachment 32702 [details]
enable Atom C6

Here is the patch I have in mind.
I need to see ACPI's _CST before knowing for sure if it is correct,
but you can go ahead and test it now.
Comment 8 Dennis Jansen 2010-10-07 21:22:56 UTC
Created attachment 32722 [details]
Comment 9 Dennis Jansen 2010-10-07 21:23:45 UTC
Created attachment 32732 [details]
Comment 10 Dennis Jansen 2010-10-07 21:24:40 UTC
Created attachment 32742 [details]
Comment 11 Dennis Jansen 2010-10-07 21:25:28 UTC
Created attachment 32752 [details]
Comment 12 Dennis Jansen 2010-10-07 21:26:56 UTC
There were no files no matter whether I had intel_idle active or not so I have attached the requested acpidumps. I am compiling the kernel right now to check the modifications ("backported" to 2.6.35 - why it didn't apply I don't know)
Comment 13 Len Brown 2010-10-07 21:36:00 UTC
ah, i should have mentioned that the patch in comment #7
is built on the upstream kernel tree, linux-2.6.36-rc7.
It may be easiest to grab the latest intel_idle.c from there
and apply the patch on top of it.

curious on /sys/firmware/acpi/tables/dynamic/ missing.
If you are in ACPI mode, using acpi_idle, and using deep C-states
then you'd need the _CST that is loaded dynamically,
and when a dynamic SSDT is loaded, it should appear in sysfs.
Comment 14 Dennis Jansen 2010-10-07 21:39:40 UTC
The patch works as expected. Now I can use the C6 state no matter if the power adapter is connected or not, thanks! ;)
And the weird hickup that unplugging the power during standby means no C6 after wake should be fixed, too.

btw. I use the psb module from gma500 ppa:
with ubuntu 9.10
Comment 15 Dennis Jansen 2010-10-07 21:42:23 UTC
I tried again. C6 is activated when I unplug the power adapter. But nothing appeared in /sys where you said -- empty dir.
Comment 16 Dennis Jansen 2010-10-07 21:44:52 UTC
when I unplug dmesg says:
[  491.467111] Monitor-Mwait will be used to enter C-3 state
[  491.477106] Monitor-Mwait will be used to enter C-3 state
Comment 17 Dennis Jansen 2010-10-07 21:49:01 UTC
I'm now trying with intel_idle from git + patch as is just to be absolutely sure.
Comment 18 Dennis Jansen 2010-10-07 21:51:41 UTC
Ok, won't compile (error: ‘CPUIDLE_FLAG_TLB_FLUSHED’ undeclared here (not in a function).
But it works fine!

Tested-by: Dennis Jansen <Dennis.Jansen (at) web (...) de
Comment 19 Len Brown 2010-10-09 02:16:17 UTC
Re: comment #8

                           Package (0x04)
                                ResourceTemplate ()
                                    Register (FFixedHW,
                                        0x01,               // Bit Width
                                        0x02,               // Bit Offset
                                        0x0000000000000052, // Address
                                        0x03,               // Access Size


This AML verifies that ATM-C6 should be entered with sub-state 2, ie 0x52,
and the 0x8C is 140usec worst case latency.

re: comment #14
thanks for verifying that the patch gives you c6 on both AC and DC.

> And the weird hickup that unplugging the power during standby
> means no C6 after wake should be fixed, too.

Interesting.  I that is either an ACPI BIOS bug
or a Linux kernel ACPI bug.  Mis-guided ACPI-BIOS feature anyway.

dmesg in comment #1 show that the dynamic SSDT's are loaded.
Very strange that they are not visible in /sys/firmware/acpi/tables/dynamic
If you could, it would be ideal to file a new bug for that issue
in the ACPI category.

Re: comment #18
the patch builds for me on top of the latest git tree.
I'd supply a back-port, but the reality is that all the patches
underneath it are going to .stable anyway; so mixing their
order would just complicate things.
Comment 20 Len Brown 2010-10-09 02:20:47 UTC
Created attachment 32922 [details]
refreshed patch vs 2.6.36-rc7 enabling ATM-C6

Here is the patch as staged to go upstream.
It is functionally the same as the previous patch,
but with tweaked C-state parameters to match
what we observed in the ACPI table.
Comment 21 Zhang Rui 2010-10-09 03:23:18 UTC
Created attachment 32932 [details]
patch: install table handler before any dynamic tables are loaded

I assume you can see SSDT1/SSDT2/SSDT3/SSDT4 in  /sys/firmware/acpi/tables, right?

can you please apply this patch and see if /sys/firmware/acpi/tables/dynamic is still empty?
Comment 22 Dennis Jansen 2010-10-09 20:28:50 UTC
(In reply to comment #21)
> patch: install table handler before any dynamic tables are loaded
> I assume you can see SSDT1/SSDT2/SSDT3/SSDT4 in  /sys/firmware/acpi/tables,
> right?


> can you please apply this patch and see if /sys/firmware/acpi/tables/dynamic
> is
> still empty?

Sorry, it doesn't apply to 2.6.35. I don't have git on my netbook. it's hard enough to get it all together and running well in the first place with the psb module. Maybe when I switch to 2.6.36 eventually I can try this patch.
Comment 23 Dennis Jansen 2010-10-09 20:30:20 UTC
ps. Thanks Len!!!
Comment 24 Len Brown 2010-10-15 00:40:55 UTC
commit 7fcca7d900957b43c84da171b750afcf1682808a
Author: Len Brown <len.brown@intel.com>
Date:   Tue Oct 5 13:43:14 2010 -0400

    intel_idle: enable Atom C6

is shipping in linux-2.6.36-rc8
this bug report is closed.

ideally, a new but report should be created
for the (independent) issue regarding the dynamic tables.
Comment 25 Dennis Jansen 2010-10-15 06:27:42 UTC
It sounded like Zhang Rui has a fix in #21. Did that go into 2.6.36, too? Or can you tell me how to port it to 2.6.35, it seems like a one-liner?
Comment 26 Florian Mickler 2010-10-31 19:24:32 UTC
Zhang tracked it seperately in bug #21142