USB keyboard can NOT wakeup from S3( suspend to RAM )

jingyun at cpu-os.ac.cn jingyun at cpu-os.ac.cn
Mon Sep 4 21:51:42 EDT 2017


Hi,Greg

Thanks.
Yes, the suspending takes very litte time.
But the time ,which the suspending takes,  has something to do with the hardware.
Especially when you using an old mechanical  hard disk or something like that.


how do you know you are hitting the key "during" the suspend?
And after notice the problem, I do some hack to confirm that it have to be during the suspending process:
Within funcion  kernel/power/suspend.c (4.9 version kernel source)
static int suspend_enter(suspend_state_t state, bool *wakeup),
I added a line code
mdelay(5000); 
just before
error = platform_suspend_prepare_late(state);
to increase the time window.
Then rebuild&install the kernel.
After the new kernel runs up, now much easier (we got about 5 seconds more)  to reproduce the bug.


Thanks for your time.

Jim




 
From: Greg KH
Date: 2017-08-31 15:16
To: jingyun at cpu-os.ac.cn
CC: kernelnewbies
Subject: Re: Re: USB keyboard can NOT wakeup from S3( suspend to RAM )
On Thu, Aug 31, 2017 at 06:38:48AM +0800, jingyun at cpu-os.ac.cn wrote:
> Hi, Greg
> 
> Thanks for your time.
> First of all, if I do NOT hit the keyboard during the suspend.
> Then my keyboard CAN wake the system up from suspend.
> This has rule out that my system does NOT support USB wakeup. Right ?
 
I really do not know, sorry.  Given taht suspend to ram go so fast, how
do you know you are hitting the key "during" the suspend?  It's an
almost instantaneous process.
 
Check your bios settings about this, or, just don't touch the keyboard
until you really do want to wake it up :)
 
good luck!
 
greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170905/0133868c/attachment.html 


More information about the Kernelnewbies mailing list