View Single Post
Old 09-04-2015, 04:44 PM   #105
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
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.
Attached Thumbnails
Click image for larger version

Name:	poweredoff.png
Views:	413
Size:	3.1 KB
ID:	141714   Click image for larger version

Name:	sleeping.png
Views:	417
Size:	3.4 KB
ID:	141715  
frostschutz is offline   Reply With Quote