09-06-2015, 07:48 PM | #106 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
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 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,
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. Last edited by frostschutz; 09-09-2015 at 12:19 PM. |
09-07-2015, 03:30 PM | #107 |
Evangelist
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
|
So, do all image used have the word sleeping/power off wrote?
|
Advert | |
|
09-07-2015, 03:39 PM | #108 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
The image is whatever you use as image. You can use transparency or put your own words in your images if you like.
The poweroff/sleep is displayed by Kobo and then replaced by the mod so if everything works that text will appear only temporarily. Timing is still an issue, but you can play with the delay setting in the config file for that. With the scanline approach I might be able to make it more aggressive (like test it 60 times per second until it appears) but I'll have to re-write it in C for that, a shell script does not work well for this kind of thing. |
09-07-2015, 03:49 PM | #109 |
Evangelist
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
|
Ah, I got it! Really good trick!
|
09-08-2015, 02:41 PM | #110 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Another day, another update, with a few optimizations.
The scanline debug is now more aggressive which should make it more likely to catch the signatures you need to set it up. And it no longer puts duplicate (or repeating) signatures in the file. Small delay values should now work better than before. You might still have to experiment which values work best for you, but before something like 'delay=0.1 0.1 0.1' didn't work too well (too many pngshow instances fighting each other and in the end none managing to actually display before poweroff). There just isn't much time between the "Poweroff" message and the device actually powering off. The mod has to display its image in that time, particularly in scanline mode this means using more (and smaller) delays. It also means that you should not make your PNG images too large as they have to be loaded from storage and displayed as well. So make sure the resolution of the PNG is not higher than your display, and reduce color images to 16 levels of gray as the display can't do color anyway. |
Advert | |
|
09-09-2015, 09:53 AM | #111 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Some things to look out for regarding the configuration file:
- In order to prevent overwriting an already existing configuration file, the config file is created only a few seconds after the device reboots (and named screensaver.cfg.$date if there already was a screensaver.cfg). Now, if after installing this mod you connected to PC instantly, it may be that the screensaver.cfg did not have a chance to be created yet. After rebooting the Kobo, give it a few seconds before you connect to PC. (I will try to improve this in a future version). - If you set uninstall=1 in the configuration file, the mod will be uninstalled on the next reboot. If you then decide to re-install the mod, you should change the config file back to uninstall=0 first. Otherwise you will install the mod, and because the mod does not overwrite the old config file, it will uninstall itself right away again. - Don't use MS Notepad to edit the configuration file. Use Notepad++ instead. In particular you must use Unix/Linux line endings (\n instead of \r or \r\n) |
09-09-2015, 01:02 PM | #112 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Example for the scanline debug mode on a Kobo Touch - bought it on Ebay, broken substrate, lower third of the display still operational. No idea what language it's set to.
With offset=105 the scanline is a tad too high: It might work but it's not optimal. With offset=75 it's too low: With offset=95 it's okay: The scanline should cross the letters in as many places as possible. Note I had to reboot the device between each offset change that should not be necessary, I'm still looking for that bug. Last edited by frostschutz; 09-09-2015 at 01:57 PM. |
09-09-2015, 05:07 PM | #113 | |
Member
Posts: 15
Karma: 21264
Join Date: Jul 2014
Device: none
|
Quote:
And yes, I promptly installed the screensaver and it works nicely whether I use the switch or just wait for the timeout to kick in. I have only one png in each of the folders so far, I use logread and I'm running 3.17.3 Sorry, I don't have telnet so can't post any further details. Thank you for all your hard work. I used another mod before for the aura and yours seems a lot more reliable. |
|
09-09-2015, 05:17 PM | #114 | ||
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Quote:
Quote:
It's scanline mode that uses different images for standby/poweroff. If you want to use the same images in scanline mode you can just delete all images from the off/ folder. scanline is more difficult to set up, unfortunately, but it's the more reliable/powerful mode. Are you also using Night Mode or Kobo Start Menu? The other mod (that I'm aware of) is using LD_PRELOAD trick, which should be the moste potente solution, but it might not work with other mods also trying to use LD_PRELOAD or those that introduce other ways of starting nickel. Last edited by frostschutz; 09-09-2015 at 05:27 PM. |
||
09-10-2015, 01:49 PM | #115 | ||
Member
Posts: 15
Karma: 21264
Join Date: Jul 2014
Device: none
|
Quote:
Quote:
|
||
09-23-2015, 09:10 PM | #116 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
For some reason or other this mod seems to break with every firmware update...
In firmware 3.18.0 the Sleeping/Poweroff message seems to have moved by a few pixels on my H2O (offset ~105 vs ~150 -ish, so the message appears a little higher now). For scanline mode that means having to re-do the setup using debug=1. New values for Aura H2O running 3.18.0, English language: Code:
offset=150 standby=220c9ccc1a263b4b871c35d4dc6cbb40 poweroff=d516079aedea23f2dbd7de1712f24129 Last edited by frostschutz; 09-23-2015 at 10:11 PM. |
09-25-2015, 04:50 AM | #117 |
Wizard
Posts: 2,845
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
|
mod isn't working for me in 3.18.0 on an H2O.
I've tried the default- no go I've switched to scanline using the already set settings since you're using an H2O with English as am I. May do a factory reset tomorrow and see if that clears things up. 3.18.0 already made me reconvert my ebook collection so I'm not concerned about losing anything with a reset. |
09-25-2015, 05:58 AM | #118 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Did you reboot after changing modes? Unfortunately the mod right now needs more reboots than strictly necessary [when editing the config file], I'm hoping to fix that in a future version of the mod.
Did you disable showing cover etc. in poweroff settings? Those would change how things look like in standby/poweroff... Did you notice the post above yours - the scanline values changed in 3.18.0. Otherwise you might have to find your own with debug=1. If the scanline debug does not work either (no scanline appears) then it's something weird, like a config file broken with MS notepad/wordpad; file needs unix newlines. It appears the log messages the mod was using for logread mode no longer exist in 3.18.0 so you're now forced to use scanline mode ... Last edited by frostschutz; 09-25-2015 at 06:06 AM. |
09-25-2015, 11:23 AM | #119 |
Wizard
Posts: 2,845
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
|
Ah I'd caught the post, but thought you may have updated the patch in the first post. Corrected the values and all is well with scanline. Shame about logread, though I'm glad I wasn't going crazy since that method should have been simple.
|
09-25-2015, 01:51 PM | #120 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
@MGlitch: glad it works! thanks for your feedback
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boox T68 - Screensaver Image | fozzedout | Onyx Boox | 4 | 07-27-2020 07:25 PM |
(PW) Location of waterstones screensaver image | mrspaceman | Kindle Developer's Corner | 19 | 05-09-2013 02:07 AM |
[PB360] Image Viewer with random? | rogue_librarian | PocketBook | 2 | 12-12-2010 05:20 AM |
K2i original screensaver image | Aeroraptor | Kindle Developer's Corner | 1 | 12-12-2009 07:40 PM |
Hacks Angus Young Screensaver Image | Jason Shaffer | Amazon Kindle | 5 | 04-08-2009 01:34 PM |