Bug 113551

Summary: intel_pstate=no_hwp else Thinkpad T460s freezes on lid close on battery power
Product: Power Management Reporter: Yrjan Skrimstad (yrjans)
Component: intel_pstateAssignee: Srinivas Pandruvada (srinivas.pandruvada)
Severity: normal CC: admin, andre.insead, d.r.vanrossum, holger+kernel, homedecoren, lenb, marco, mczubak, rui.zhang, russell.jones, sjensen+kernel, szg00000, zorkerz
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.5.0-rc6 Tree: Mainline
Regression: No
Attachments: Output from acpidump
Output from "dmesg -s64000"
Output from dmidecode
Output from /proc/interrupts
Output from lspci

Description Yrjan Skrimstad 2016-03-02 11:02:07 UTC
Created attachment 206581 [details]
Output from acpidump

The new Thinkpad T460s from Lenovo freezes on lid close when on battery power. If plugged into AC power the laptop does not crash on lid close. When the laptop has frozen I can no longer ping it and it is completely unresponsive to user input, with the image from when the lid was closed still shown. To restart the laptop I have to hold the power button. 

In single user mode the problem disappears when the kernel is booted with the argument "acpi=off", however the problem reappears on "acpi=ht".

The system suspends and resumes nicely when calling suspend with "systemctl suspend", even if the lid has been closed while suspended.

The problem happens with all tested Linux kernels.

I've tested this on Debian Sid, however the problem also seems to appear on other distros according to other users in this thread on reddit: https://www.reddit.com/r/thinkpad/comments/48fwhw/new_t460s_unsuccessfully_linux_installations/

Will attach output from:
lspci -vv
Comment 1 Yrjan Skrimstad 2016-03-02 11:03:07 UTC
Created attachment 206591 [details]
Output from "dmesg -s64000"
Comment 2 Yrjan Skrimstad 2016-03-02 11:03:59 UTC
Created attachment 206601 [details]
Output from dmidecode
Comment 3 Yrjan Skrimstad 2016-03-02 11:04:30 UTC
Created attachment 206611 [details]
Output from /proc/interrupts
Comment 4 Yrjan Skrimstad 2016-03-02 11:04:52 UTC
Created attachment 206621 [details]
Output from lspci
Comment 5 Yrjan Skrimstad 2016-03-04 15:54:18 UTC
Seems intel_pstate=no_hwp as a kernel option fixes the issue, will move bug to Power Management->intel_pstate.
Comment 6 Yrjan Skrimstad 2016-03-09 11:30:15 UTC
The patch given in attachment 208331 [details] from bug 110941 seems to fix the issue.
Comment 7 Yrjan Skrimstad 2016-03-15 22:23:28 UTC
The new patch given in attachment 209371 [details] from bug 110941 seems to fix the issue.
Comment 8 Srinivas Pandruvada 2016-03-15 23:21:00 UTC
Great. I will submit to upstream mailing list if I get confirmation for issues reported on Yoga 260.
Comment 9 Ingo Bürk 2016-03-29 20:18:22 UTC
I also have a T460s. The first time I suspended it via lid close the same as described here happened (freeze). However, today I suspended via "systemctl suspend" and then closed the lid. It seemed to properly suspend, but after a few minutes of it laying around I noticed the LED blinking rapidly and the laptop being extremely hot. I couldn't wake it from suspend and had to reboot it by holding the power button.

I will try if this is reproducible and see if the attached patch fixes this as well.
Comment 10 Zhang Rui 2016-04-11 02:13:31 UTC
commit a21211672c9a1d730a39aa65d4a5b3414700adfb
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Wed Mar 23 21:07:39 2016 -0700

    ACPI / processor: Request native thermal interrupt handling via _OSC
Patch has been shipped in 4.6-rc2.
Comment 11 Daan van Rossum 2016-04-14 16:56:39 UTC
(In reply to Yrjan Skrimstad from comment #7)
> The new patch given in attachment 209371 [details] from bug 110941 seems to
> fix the issue.

This patch seems to cause a resume issue (black screen, unresponsive) upon resume from hibernate when on _adapter power_, no resume from hibernate issue on battery power.

Without the patch applied there is no issue with resume from hibernate on either adapter power or battery power.
Comment 12 Srinivas Pandruvada 2016-04-14 17:28:55 UTC
Can you try before you going to suspend?

wrmsr 0x64b 0
Comment 13 Daan van Rossum 2016-04-14 18:29:05 UTC
That fixes the resume from hibernation issue when on charger power.(In reply to Srinivas Pandruvada from comment #12)
> Can you try before you going to suspend?
> wrmsr 0x64b 0

That fixes the resume from hibernation issue when on charger power.

Booting with intel_pstate=no_hwp also avoids the issue.
Comment 14 Daan van Rossum 2016-04-14 19:02:00 UTC
Sorry, this needs more testing.  The resume from hibernate issue seems to only occur sporadically.  I need to test the vanilla kernel more before I can say more confidently that the issue is absent without your patch, and also whether battery power vs charger power is related at all.  So please ignore my report above for now.

The resume from hibernation issue may be related to this bug:
Comment 15 Srinivas Pandruvada 2016-04-14 20:16:06 UTC
There can be number of reasons for suspend/resume as depends on how other device drivers are active and have any issue.