Bug 150321

Summary: I7 Generation 6 Laptop remains hot while suspended
Product: Power Management Reporter: Donald AItken (don.aitken)
Component: Hibernation/SuspendAssignee: Chen Yu (yu.c.chen)
Status: CLOSED CODE_FIX    
Severity: normal CC: devurandom, leho, peter, yu.c.chen
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.4.0 Subsystem:
Regression: No Bisected commit-id:
Attachments: Dmesg output from point of suspend until successful wake
Dmesg output from a boot of Fedora 22 from Live CD
DPKG output when installing kernel 4.8 RC1
DMESG output using 4.8 RC1 from boot until resume from 2 suspends

Description Donald AItken 2016-07-26 03:57:35 UTC
Created attachment 226451 [details]
Dmesg output from point of suspend until successful wake

This problem is easily reproduced by booting the latest Ubuntu release (16.040.1) from the "live CD".
The laptop wakes from suspend by moving mouse or pressing a key (but not just open lid).
Hardware spec http://www.mytoshiba.com.au/products/computers/satellite/c50/pscpna-01601m/specifications

The problem persists with a clean install of Ubuntu 16.04.1 retaining the Nouveau video driver but updating the Kernel to 4.6.2.

Battery is drained by around 12% per hour while suspended by closing the lid, selecting Suspend from the menu or entering sudo pm-suspend in a terminal.
Comment 1 Chen Yu 2016-07-29 02:56:29 UTC
The log shows the system has entered S3, it looks like this platform still consumes power when in S3. How about:
1. boot latest kernel with init=/bin/bash text nomodeset modprobe.blacklist=i915
2. echo mem > /sys/power/state and wait for a while to see if the power consumption is still high?
3. if step 2 is still high, then how about step 1 + echo freeze > /sys/power/state
Comment 2 Donald AItken 2016-07-29 04:24:56 UTC
(In reply to Chen Yu from comment #1)
> The log shows the system has entered S3, it looks like this platform still
> consumes power when in S3. How about:
> 1. boot latest kernel with init=/bin/bash text nomodeset
> modprobe.blacklist=i915
> 2. echo mem > /sys/power/state and wait for a while to see if the power
> consumption is still high?
> 3. if step 2 is still high, then how about step 1 + echo freeze >
> /sys/power/state

I attempted to change the linux boot line at startup but this resulted in a kernel panic. I must have misinterpreted your suggested changes.

My current boot line is:-

linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro quiet splash $vt_handsoff

Can you please advise how to change the line to reflect your suggested changes

"

1. boot latest kernel with init=/bin/bash text nomodeset
modprobe.blacklist=i915"

An additional piece of information that might help. The laptop remains warm (consumes power) after hibernating via "sudo pm-hibernate".
Comment 3 Donald AItken 2016-07-29 12:00:21 UTC
Additional information.
1. The laptop is dual booted. Windows 10 temperature while suspended is cool and battery life is very good.
2. BIOS is at level 1.00 as was installed at time of purchase in January 2016. I note that BIOS 1.50 has been released.
Comment 4 Donald AItken 2016-07-31 13:02:38 UTC
Created attachment 226971 [details]
Dmesg output from a boot of Fedora 22 from Live CD
Comment 5 Donald AItken 2016-07-31 13:07:12 UTC
As an additional test I created a Fedora 22 Live CD.
Kernel 4.04.301.FC22

The "warm while suspended" problem persists with this operating system.

Dmesg output attached.
I am unable to get output which includes a suspend with Fedora as the laptop does not wake properly from suspend; no screen display.
Comment 6 Chen Yu 2016-07-31 14:01:57 UTC
(In reply to Donald AItken from comment #2)
> (In reply to Chen Yu from comment #1)
> > The log shows the system has entered S3, it looks like this platform still
> > consumes power when in S3. How about:
> > 1. boot latest kernel with init=/bin/bash text nomodeset
> > modprobe.blacklist=i915
> > 2. echo mem > /sys/power/state and wait for a while to see if the power
> > consumption is still high?
> > 3. if step 2 is still high, then how about step 1 + echo freeze >
> > /sys/power/state
> 
> I attempted to change the linux boot line at startup but this resulted in a
> kernel panic. I must have misinterpreted your suggested changes.
> 
> My current boot line is:-
> 
> linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro quiet splash
> $vt_handsoff
> 
> Can you please advise how to change the line to reflect your suggested
> changes
> 
if

 "linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro init=/bin/bash initcall_debug no_console_suspend ignore_loglevel nomodeset text modprobe.blacklist=i915"

does not boot, please use:

 "linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro  initcall_debug no_console_suspend ignore_loglevel  nomodeset text modprobe.blacklist=i915"


After boot up, try to install the lastest turbostat and

1. 
turbostat --debug --out s2r.log echo mem > /sys/power/state 

then wait for a while and wake the system up, check if the problem is reproduced, and provide s2r.log and  'dmesg -c'

2. 
turbostat --debug --out s2i.log echo freeze > /sys/power/state 

then wait for a while and wake the system up, check if the problem is reproduced, and provide s2i.log and 'dmesg -c'


3. if possible, please check with latest upstream kernel:
www.kernel.org
Comment 7 Donald AItken 2016-08-01 04:41:55 UTC
(In reply to Chen Yu from comment #6)
> (In reply to Donald AItken from comment #2)
> > (In reply to Chen Yu from comment #1)
> > > The log shows the system has entered S3, it looks like this platform
> still
> > > consumes power when in S3. How about:
> > > 1. boot latest kernel with init=/bin/bash text nomodeset
> > > modprobe.blacklist=i915
> > > 2. echo mem > /sys/power/state and wait for a while to see if the power
> > > consumption is still high?
> > > 3. if step 2 is still high, then how about step 1 + echo freeze >
> > > /sys/power/state
> > 
> > I attempted to change the linux boot line at startup but this resulted in a
> > kernel panic. I must have misinterpreted your suggested changes.
> > 
> > My current boot line is:-
> > 
> > linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro quiet splash
> > $vt_handsoff
> > 
> > Can you please advise how to change the line to reflect your suggested
> > changes
> > 
> if
> 
>  "linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro
> init=/bin/bash initcall_debug no_console_suspend ignore_loglevel nomodeset
> text modprobe.blacklist=i915"
> 
> does not boot, please use:
> 
>  "linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro 
> initcall_debug no_console_suspend ignore_loglevel  nomodeset text
> modprobe.blacklist=i915"
> 
> 
> After boot up, try to install the lastest turbostat and
> 
> 1. sudo bash -c 'echo mem >/sys/power/state'
> turbostat --debug --out s2r.log echo mem > /sys/power/state 
> 
> then wait for a while and wake the system up, check if the problem is
> reproduced, and provide s2r.log and  'dmesg -c'
> 
> 2. 
> turbostat --debug --out s2i.log echo freeze > /sys/power/state 
> 
> then wait for a while and wake the system up, check if the problem is
> reproduced, and provide s2i.log and 'dmesg -c'
> 
> 
> 3. if possible, please check with latest upstream kernel:
> www.kernel.org

First option does not boot. Messages before kernel panic include "/bin/bash no such file or directory" (checked. The file does exist.

Second option boots however there is no Dash and no taskbar. I can suspend by closing the lid. It remains warm (one hour wait). There is no display on resume although led would indicate it has resumed.

I can only install Turbostat for kernel 4.4.0.31. I have done so. As expected the first command (sudo bash -c 'echo mem >/sys/power/state') causes the machine to sleep. The next command (turbostat --debug --out s2r.log echo mem > /sys/power/state) requires root privilige but then yields permission denied.

sudo turbostat --debug --out s2r.log echo mem > /sys/power/state
bash: /sys/power/state: Permission denied
Comment 8 Donald AItken 2016-08-01 04:44:08 UTC
(In reply to Donald AItken from comment #7)
> (In reply to Chen Yu from comment #6)
> > (In reply to Donald AItken from comment #2)
> > > (In reply to Chen Yu from comment #1)
> > > > The log shows the system has entered S3, it looks like this platform
> still
> > > > consumes power when in S3. How about:
> > > > 1. boot latest kernel with init=/bin/bash text nomodeset
> > > > modprobe.blacklist=i915
> > > > 2. echo mem > /sys/power/state and wait for a while to see if the power
> > > > consumption is still high?
> > > > 3. if step 2 is still high, then how about step 1 + echo freeze >
> > > > /sys/power/state
> > > 
> > > I attempted to change the linux boot line at startup but this resulted in
> a
> > > kernel panic. I must have misinterpreted your suggested changes.
> > > 
> > > My current boot line is:-
> > > 
> > > linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro quiet splash
> > > $vt_handsoff
> > > 
> > > Can you please advise how to change the line to reflect your suggested
> > > changes
> > > 
> > if
> > 
> >  "linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro
> > init=/bin/bash initcall_debug no_console_suspend ignore_loglevel nomodeset
> > text modprobe.blacklist=i915"
> > 
> > does not boot, please use:
> > 
> >  "linux   /boot/vmlinuz-4.6.2-040602-generic root=UUID....  ro 
> > initcall_debug no_console_suspend ignore_loglevel  nomodeset text
> > modprobe.blacklist=i915"
> > 
> > 
> > After boot up, try to install the lastest turbostat and
> > 
> > 1. sudo bash -c 'echo mem >/sys/power/state'
> > turbostat --debug --out s2r.log echo mem > /sys/power/state 
> > 
> > then wait for a while and wake the system up, check if the problem is
> > reproduced, and provide s2r.log and  'dmesg -c'
> > 
> > 2. 
> > turbostat --debug --out s2i.log echo freeze > /sys/power/state 
> > 
> > then wait for a while and wake the system up, check if the problem is
> > reproduced, and provide s2i.log and 'dmesg -c'
> > 
> > 
> > 3. if possible, please check with latest upstream kernel:
> > www.kernel.org
> 
> First option does not boot. Messages before kernel panic include "/bin/bash
> no such file or directory" (checked. The file does exist.
> 
> Second option boots however there is no Dash and no taskbar. I can suspend
> by closing the lid. It remains warm (one hour wait). There is no display on
> resume although led would indicate it has resumed.
> 
> I can only install Turbostat for kernel 4.4.0.31. I have done so. As
> expected the first command (sudo bash -c 'echo mem >/sys/power/state')
> causes the machine to sleep. The next command (turbostat --debug --out
> s2r.log echo mem > /sys/power/state) requires root privilige but then yields
> permission denied.
> 
> sudo turbostat --debug --out s2r.log echo mem > /sys/power/state
> bash: /sys/power/state: Permission denied

The latest upstream kernel I can find is 4.7.0. The problem persists with that kernel.
Comment 9 Donald AItken 2016-08-25 00:11:09 UTC
Created attachment 230081 [details]
DPKG output when installing kernel 4.8 RC1

shows lots of Warnings relating to I915 and Nvidia. I have running nouveau only (have not installed Nvidia driver).
Comment 10 Donald AItken 2016-08-25 00:13:19 UTC
Created attachment 230091 [details]
DMESG output using 4.8 RC1 from boot until resume from 2 suspends
Comment 11 Donald AItken 2016-08-25 00:16:45 UTC
I have installed 4.8 RC1 and problem appears to be fixed.
I have attached the messages generated by DPKG during the install. It shows lots of warning messages relating to I915 and nvidia.

I have also attached DMESG output from the time of a boot until resuming from two suspends.
Comment 12 Peter Wu 2016-08-28 08:56:03 UTC
The problem was fixed in v4.8-rc1 due to changes in the PCI/PM core and nouveau driver. You can see that in the dmesg via the last line here ("detected PR support, will not use DSM"):

[    1.835918] pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[    1.835921] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.RP01.PXSX handle
[    1.835922] nouveau: detected PR support, will not use DSM

Previously the nouveau driver would not detect your card and fail to power off the Nvidia GPU. Support for your card should have been added in v4.7, but the newer PM method requires v4.8.
Comment 13 Chen Yu 2016-08-29 09:16:24 UTC
(In reply to Peter Wu from comment #12)
> The problem was fixed in v4.8-rc1 due to changes in the PCI/PM core and
> nouveau driver. You can see that in the dmesg via the last line here
> ("detected PR support, will not use DSM"):
> 
> [    1.835918] pci 0000:01:00.0: optimus capabilities: enabled, status
> dynamic power, hda bios codec supported
> [    1.835921] VGA switcheroo: detected Optimus DSM method
> \_SB_.PCI0.RP01.PXSX handle
> [    1.835922] nouveau: detected PR support, will not use DSM
> 
> Previously the nouveau driver would not detect your card and fail to power
> off the Nvidia GPU. Support for your card should have been added in v4.7,
> but the newer PM method requires v4.8.
Good to know this, thanks!