Scanline Mode
It was more annoying to implement than anticipated but there you have it. Another mode of operation, another way to detect nickel going to sleep (or powering off), and it supports different sets of images for sleep/poweroff states, too. On the downside it requires manual setup.
What's scanline mode? When Kobo goes to sleep, it executes a command (dd) before doing so and the screensaver hooks into that. Since that command is also executed at other times, screensaver then "scans" a "line" (of pixels) on the screen in order to "read" whether it says "Sleeping" or "Poweroff". And then it displays a sleep or poweroff image.
But unfortunately the Sleep/Poweroff screen looks different on every device and for every language.
So you have to teach it how to read correctly.
In order to switch to scanline mode you have to edit the configuration file, .addons/screensaver/screensaver.cfg. Here's what the relevant values look like for me (for Aura H2O, 3.17.3 firmware, English language):
Code:
method=scanline
offset=105
debug=0
standby=1324b028adf403db69004f9c5025c163
poweroff=9d79ef5cdf4d49315e61eaae3e397eac
The
method=scanline is what puts the mod into scanline mode. (The default mode is method=logread). You'll have to reboot for the new mode to take over.
The
offset=105 is the offset of the scanlines in pixels from the bottom of the screen. That's where the line crosses the Sleep/Poweroff status message displayed by Kobo, on the Aura H2O.
The
standby= and
poweroff= things are signatures for the scanline when it actually says Sleep or Poweroff and not something else.
You'll have to find your own signatures, and that can be achieved by setting
debug=1.
With
debug=1 you get two things:
1) The scanline will be visually displayed on the screen. If it does not appear in the correct place, adapt the offset accordingly until it crosses the Power/Sleep message.
2) The detected signature will be stored in a file called scanline.txt. It will also include the date and time the signature was detected, so you can do the following:
So to get your own scanline standby/poweroff signature,
- Go into settings, set sleep timeout to 5 minutes and power off timeout to 5 minutes.
- Enable debug,
- Check the time, for example, tap the screen at 20:30 and then let it idle for ~15 minutes. The device should go to sleep and subsequently power off in that time.
- Turn it back on and check the scanline.txt. If you went idle at 20:30 then there should be a signature around 20:35 and another around 20:40. If there is more than one signature for each of those time slots, the last one is probably the good one.
- set standby= and poweroff= to the signatures you discovered, set debug=0, and see if it works.
Sorry it's complicated.
If you try this let me know how it works out for ya. Also share your device / language / signatures that work for you.
PS: I should add that if there is any other mod trying to hook into the dd command, it would probably be a conflict of interests with that mod. Right now I simply assume no one else is crazy enough to do that.