Created attachment 73523 [details] cpuidle information showing the problem On my Samsung NC20 Netbook the BIOS hides the C3 C-state when the AC power is connected, but it should show up and work as soon as the AC power is disconnected. This expected behavior worked fine as long as I used Ubuntu Oneiric (kernel version 3.0). But now I upgraded to Ubuntu Precise (kernel version 3.2) and now C3 does not work anymore after disconnecting the AC power. I have verified, that the problem exists in the mainline kernel version 3.4. To gather some information, I executed following command with the 3.2 kernel grep -r "" /sys/devices/system/cpu/cpu0/cpuidle/ in different system states: 1. newly booted without having the AC power attached 2. having the AC power attached (without C3, as expected) 3. now after having the AC power disconnected (not functional C3 --> bug) The output is combined in the attached file "cpuidle.txt". I have already tried to bisect the problem. Therefor I used following git bisect command: git bisect start v3.4 v3.0 drivers/cpuidle I'll also attach the git bisect log, which seems to indicate the first bad commit is 46bcfad7a819bd17ac4e831b04405152d59784ab. Kind regards, Thomas Schlichter
Created attachment 73524 [details] git bisect log
looks like a real bug. BTW. just curious, have you tried running w/ CONFIG_INTEL_IDLE=y? (if it recognizes your CPU, it will ignore these transitions altogether and always give you all C-states)
I've been basing my build configs on the Ubuntu ones, and CONFIG_INTEL_IDLE=y is already set there. But it is reasonable that this driver does not recognize the CPU here, as the Samsung NC20 Netbook is equipped with the VIA Nano processor.
Today I tested the mainline kernel v3.5 and the bug is still present there. Seems I am the only one who cares... ;-(
Created attachment 79041 [details] proposed patch to fix DC-AC-DC issue I've been investigating and trying different things, and I finally came up with this small attached patch (based on 3.6-rc4). For me it fixes the DC-AC-DC issue. Unfortunately, it does not completely fix the issue when booted with AC. Disconnecting AC then leads to a state where the C-state information looks correct, but C3 is not used. But still, the patch is a big improvement for me! Kind regards, Thomas
I just found the very similar Bug 42870. We even bisected the problem to the same commit, and also my patch is part of the one posted at the other Bug. So maybe these two Bug reports should be merged? Btw, this also means I am not the only one affected by this bug... Kind regards, Thomas
*** This bug has been marked as a duplicate of bug 42870 ***
Created attachment 79391 [details] cpuidle: make power_usage unsigned
Created attachment 79401 [details] use power values provided by _CST table
A patch referencing this bug report has been merged in Linux v3.8-rc4: commit 8aef33a7cf40ca9da188e8578b2abe7267a38c52 Author: Daniel Lezcano <daniel.lezcano@linaro.org> Date: Tue Jan 15 14:18:04 2013 +0100 cpuidle: remove the power_specified field in the driver