You are not logged in.

#1 2015-05-01 05:13:55

dr.dynamics
Member
Registered: 2011-11-10
Posts: 48

kernel 4.0 sleep bug

Upgraded to kernel 4.0 on my Thinkpad Yoga (with i7).  Sleep now broken.  On command, goes to sleep, but wakes up 2-3 sec later.  Won't stay asleep, even with multiple tries.  Actually. the first sleep and wake cycle works normally, but then subsequent sleeps are broken.  Something in the wakeup signal stays on somehow?

Downgrade back to 3.19.3 solves problem.  Even weirder, after downgrade, the first sleep-wake cycle in 3.19.3 is also broken, won't stay asleep.  But then subsequent sleep-wakes work.  It's like 4.0 forgets to set or clear some kind of flag when it wakes, and once it has a wake event in 3.19.3, it fixes the problem.

Anyone else seeing this?  Works fine on my desktop machine.

Last edited by dr.dynamics (2015-05-01 05:20:29)

Offline

#2 2015-05-12 17:36:13

jp
Member
Registered: 2014-10-25
Posts: 5

Re: kernel 4.0 sleep bug

echo disabled > /sys/bus/pci/devices/0000\:00\:14.0/power/wakeup

works for me. It is not permanent, i. e. needs to be executed on startup (as root).

Offline

#3 2015-05-12 19:12:10

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,366

Re: kernel 4.0 sleep bug

I noticed that the thing doesn't sleep when I shut the lid down now.  But sometimes I actually want it to do that.  Other times I do want it to suspend when I close the lid.  Think I had to press the power button to get it to come out of sleep mode the last time.  I think there's a toggle in /sys or /proc where I can go to change that behaviour.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#4 2015-05-17 04:11:30

dr.dynamics
Member
Registered: 2011-11-10
Posts: 48

Re: kernel 4.0 sleep bug

Hey jp

I added a systemd call to a script with your command, and it seems to do the trick.  Thanks for that; I would never have known to go poking around in the sys folder.  Any chance you can explain how you knew to look there?  If this wakeup file gets reset at each reboot, is it reading from a default value that I can edit, rather than setting it each time?

FYI, issue still exits in 4.0.2 and 4.0.3.

Last edited by dr.dynamics (2015-05-18 02:54:24)

Offline

#5 2015-05-17 19:15:30

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,366

Re: kernel 4.0 sleep bug

Might be able to put it in tmpfiles.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#6 2015-05-22 15:21:26

jp
Member
Registered: 2014-10-25
Posts: 5

Re: kernel 4.0 sleep bug

dr.dynamics wrote:

Any chance you can explain how you knew to look there?

I don’t quite remember. I googled, and read about the wakeup files in the /sys folder, so I just tried disabling the devices that were enabled. It turned out to be the xHCI USB host controller, which controls quite a few devices like the camera, the touchscreen, the bluetooth controller, so it’s hard to tell what is causing the wakeup.

dr.dynamics wrote:

If this wakeup file gets reset at each reboot, is it reading from a default value that I can edit, rather than setting it each time?

See here for an explanation of the wakeup files. Apparently it is hardcoded in the kernel driver (xhci_hcd), so there doesn’t seem to be a better way than running a script on every boot for now.
On a different note, is anyone experiencing wakeup fails on their Thinkpad Yoga? Sometimes when in sleep, it just won’t wake up and I have to use the power button to poweroff. I’m not sure if this could be related to disabling the xHCI wakeup capability, and I really couldn’t think of any way to find out… I suspect it might have to do with powertop, which I use to “auto-tune” the power management (and which improves battery life quite significantly, actually).

Last edited by jp (2015-05-22 15:22:02)

Offline

Board footer

Powered by FluxBB