Quote:
Originally Posted by silverzhao
Thanks for your reply. What I want is not to re-map Home button to power button, but to not disable it in some way when in screensaver state, and when pressing it this command could be executed:
Code:
# powerd_test -p # simulate power button pressed event
I think eventHandler may be able to do something here in some way, but I don't know how.
So could anyone help?
|
"When in screensaver state ..." the CPU is halted.
You need a running CPU to execute firmware/software commands.
Sorry, that is just the way it is with these electronic computers, you have to have the CPU running before they work.
You can read the kernel messages associated with it going into 'suspend' and coming out of 'suspend' in the dmseg log (there is a KUAL button for that).
Which, by the way, is one of the "hardware things" that special chip on the power button does - sends a
hardware event signal to the SoC that makes it resume the CPU.
The only other, easily accessible, known hardware event the user can create, is a "USB event". Plug (or unplug) a USB device while the CPU is suspended. The change in the hardware configuration will cause the Linux kernel to resume operation.
Note There are some 'states' a Kindle can be put into that causes it to display the screensaver while the CPU is still running.
But in most cases of the screensaver being displayed, the CPU is in a "suspend to ram" state (I.E: shutdown).