Bug 66751

Summary: [BISECTED]Does not resume from suspend (bisected)
Product: Power Management Reporter: Martin Ziegler (ziegler)
Component: cpufreqAssignee: cpufreq
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: high CC: alan, bjorn, tianyu.lan
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: v3.13-rc3 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: config for 3.13-rc3

Description Martin Ziegler 2013-12-07 12:30:38 UTC
Created attachment 117791 [details]
config for 3.13-rc3

This is on a Thinkpad T510. If a try to wake up the machine from suspend,
only the start button light changes from "blink" to "on". The screen remains black and the machine is unresponsive. All I can do is a hard reboot by holding down the start button.

I bisected between  v3.13-rc2 and v3.13-rc3 and got 

 commit 2167e2399dc5e69c62db56d933e9c8cbe107620a
 Author: Bjørn Mork <bjorn@mork.no>
 Date:   Tue Dec 3 12:14:32 2013 +0100

    cpufreq: fix garbage kobjects on errors during suspend/resume

as the first bad commit
Comment 1 Martin Ziegler 2013-12-07 13:50:30 UTC
reverting 2167e2399dc5e69c62db56d933e9c8cbe107620a solves the problem
Comment 2 Alan 2013-12-09 13:41:51 UTC
Adding Bjørn to the cc
Comment 3 Bjørn Mork 2013-12-09 14:39:09 UTC
Yes, this is a pretty interesting one. The bug is caused by the combination of two commits added between -rc2 and -rc3:

 5a87182aa21d cpufreq: suspend governors on system suspend/hibernate
 2167e2399dc5 cpufreq: fix garbage kobjects on errors during suspend/resume

The order these are applied is really arbitrary, and the bisect will point to the last one applied. Which happens to be 2167e2399dc5. But I will still claim that it was commit 5a87182aa21d that caused this bug by adding even more special handling of cpufreq suspend.  This needs to be done properly if it is done at all, including hooks for drivers and governors. Adding special cases and "if suspending" tests here and there with subtle implicit dependencies between the different code blocks is not going to fly.

Note that reverting only 5a87182aa21d will fix the problem, with simpler code and no dangling sysfs files as a result.
Comment 4 Lan Tianyu 2013-12-10 06:55:44 UTC
Both Commit 2167e2399dc5 and 5a87182aa21d have been reverted in the linux-pm tree. bleeding-edge branch. So close this bug.