View Single Post
Old 07-06-2013, 08:01 AM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by silverzhao View Post
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).

Last edited by knc1; 07-06-2013 at 08:20 AM.
knc1 is offline   Reply With Quote