Bug 43349 - ACPI C3 disabled forever after DC/AC/DC transition - Samsung NC20 Netbook
Summary: ACPI C3 disabled forever after DC/AC/DC transition - Samsung NC20 Netbook
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Processor (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_power-processor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-07 11:26 UTC by Thomas Schlichter
Modified: 2013-01-28 23:06 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.2.0
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
cpuidle information showing the problem (3.83 KB, text/plain)
2012-06-07 11:26 UTC, Thomas Schlichter
Details
git bisect log (1.02 KB, text/plain)
2012-06-07 11:26 UTC, Thomas Schlichter
Details
proposed patch to fix DC-AC-DC issue (1011 bytes, patch)
2012-09-02 12:57 UTC, Thomas Schlichter
Details | Diff
cpuidle: make power_usage unsigned (1.41 KB, patch)
2012-09-06 23:08 UTC, Thomas Schlichter
Details | Diff
use power values provided by _CST table (1.84 KB, patch)
2012-09-06 23:09 UTC, Thomas Schlichter
Details | Diff

Description Thomas Schlichter 2012-06-07 11:26:07 UTC
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
Comment 1 Thomas Schlichter 2012-06-07 11:26:47 UTC
Created attachment 73524 [details]
git bisect log
Comment 2 Len Brown 2012-06-12 03:21:22 UTC
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)
Comment 3 Thomas Schlichter 2012-06-14 06:56:29 UTC
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.
Comment 4 Thomas Schlichter 2012-08-03 17:56:37 UTC
Today I tested the mainline kernel v3.5 and the bug is still present there.
Seems I am the only one who cares... ;-(
Comment 5 Thomas Schlichter 2012-09-02 12:57:37 UTC
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
Comment 6 Thomas Schlichter 2012-09-03 13:42:42 UTC
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
Comment 7 Thomas Schlichter 2012-09-04 15:54:55 UTC

*** This bug has been marked as a duplicate of bug 42870 ***
Comment 8 Thomas Schlichter 2012-09-06 23:08:10 UTC
Created attachment 79391 [details]
cpuidle: make power_usage unsigned
Comment 9 Thomas Schlichter 2012-09-06 23:09:02 UTC
Created attachment 79401 [details]
use power values provided by _CST table
Comment 10 Florian Mickler 2013-01-19 22:58:27 UTC
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

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