For some reason nickel executes dd before going to sleep (or power off). So an alternative method would be to hook into dd, and then look at the display. This is easy if you restrict yourself to a single line of pixels. So you can make a single line pattern that matches the Sleeping and Poweroff screens respectively. It would be an alternative approach to screensaver for devices that don't work with the current method, and in case the log message method breaks entirely in the future (it seems the message I originally used is not coming back).
Problems with this approach, however, are several:
- needs a different pattern for each device/resolution/language, so there must be a (simple?) way for users to come up with these patterns by themselves
- timing. at the time dd is called it's not yet showing the sleeping/poweroff screen. That appears 0.x seconds afterwards. Then you only have a short time until the device is actually asleep or off and the magic has to happen in between
timing already is an issue with the current incarnation of the script.
On the upside this approach might make it possible to have different images for sleeping and poweroff states.
|