Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nook: add support for eink screen refresh #5056

Closed
hcors opened this issue Jun 3, 2019 · 79 comments

Comments

Projects
None yet
7 participants
@hcors
Copy link

commented Jun 3, 2019

  • KOReader version: Any
  • Device: Nook Glowlight 3 (Android 4.4.2)

Issue

Getting some ghosting even with smaller panning rate. Would it be possible to flash a black screen every certain number of pages on Android e readers to clear ghosting? There's a version of Coolreader that allows that option. It's on Github, as well. Just a suggestion more than bug.

Thanks!

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2019

Probably related to this issue: https://www.mobileread.com/forums/showthread.php?t=316479 or maybe not.

Anyways, on android each eink device behaves differently, so a video showcasing your issues would be great to understand current situation.

@hcors: I will label this as won't fix, but of course that depends on you and other users with the device. We added support to other android devices on the past based on user feedback.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 3, 2019

Hey, I will get home later and make a video. It's not egregious, the amount of ghosting, certainly. Just sort of greys the background and a nice screen flash is all it needs. I ran that einktest program earlier, and none of the buttons forced a flash of the screen. The info it displayed:

Manufacturer: Barnes and Noble
Brand: Nook
Model: BNRV520
Product: ntx_6sl
Hardware: E60QQ0
Platform: imx6

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2019

Just sort of greys the background and a nice screen flash is all it needs.

Cool, that seems different to the mobileread issue and just related to normal behaviour on unsupported eink devices. Since your device is a freescale one will probably be fixed with #3517

Anyways, with the video we will figure out, thanks!

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2019

Please install this build of einkTest.apk.zip (just rename .apk.zip to .apk)

Does the generic button refresh the screen?
untitled

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 4, 2019

Tried the file you linked, none of them refreshed at all. Did nothing to refresh it.

As you can see in the video, the ghosting is pretty minimal, but after a number of page turns its starts to get a little murky. The Plotn fork of Coolreader has a setting that you can flash a black screen every certain number of pages, for a duration of your choosing. Possible that it's just flashing a black screen as a workaround to full refresh? That works fantastically.

https://vimeo.com/340113071 is my clicking away on it. I swear it looks murkier in person :)

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

Tried the file you linked, none of them refreshed at all. Did nothing to refresh it.

Ok, sad news :/

Would it be possible to flash a black screen every certain number of pages on Android e readers to clear ghosting?

That is the behaviour on supported models (likebook mars/muses/mimas, inkbook prime/prime hd, energy sistem ereaders...). On those devices you can configure the refresh under settings->screen->eink full screen refresh. That setting is disabled for unknown devices.

The Plotn fork of Coolreader has a setting that you can flash a black screen every certain number of pages, for a duration of your choosing. Possible that it's just flashing a black screen as a workaround to full refresh? That works fantastically.

That would need a specific method for your device. You need to RE that. Here is an example: #4595 (used for the mimas)

https://vimeo.com/340113071 is my clicking away on it. I swear it looks murkier in person :)

That's the normal behaviour on unsupported eink devices. Nothing can be done without finding a way to refresh the screen.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 4, 2019

Based on my fooling around with this particular fork of CR, you can do the flash black page with any android device, doesn't seem to be device specific. I just tried it on my phone and it did the flash black page thing when set up, as well.

There's a setting you can set it to E-ink if not autodetected. Selected that with my Nexus 6p and my tablet, and then it gives option to flash black page every certain number of pages and for how long to leave up the black page. Can't take video, since it's on my phone. This leads me to believe its just a quick, dirty version of a page refresh that clears einks?

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 4, 2019

Screenshot_20190604-114816

This is on my phone. While obviously not serving a function on LCD screens, it's interesting that it's not something device specific.

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

@hcors: Pull requests are welcome!

@pazos pazos added the Nook label Jun 4, 2019

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 4, 2019

Oh boy, I have never done anything with code before (signed up yesterday for this issue), but I will dig through that as best I can. If I find the code responsible, I will alert. I'm on it

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 4, 2019

It appears to be based on this code. Now how does one do a pull request?

plotn/coolreader@6a44d4d

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 4, 2019

I'm afraid that that is going to be over my head. Just thought it would be an interesting solution for you all to think of implementing that would seemingly "fix" all ghosting issues on android devices (or at least a bandaid for lack of refreshing normally). Coding is about where my tinkering ability ends, I'm afraid.

@hcors hcors changed the title Flash Black Screen on Android? Feature Request: Flash Black Screen on Android? Jun 4, 2019

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

this build has enabled eink settings on KOReader for your device. It will try to invalidate the current view each x pages, hopefully forcing a full screen refresh. ->

You need to uninstall current KOReader application before installing this one (they have different signatures)

You can change defaults(6pag) under settings->screen->eink settings->full refresh rate

If you install adb on your computer you can log with adb logcat KOReader:D epd:I *:S

Based on current feedback that won't work, but the logs can be useful for further support.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 5, 2019

Tested it out, and there was no setting for Full Refresh rate on that build. Uninstalled, deleted Koreader folder, reinstalled and verified the option was not there. Just the 4 usual options. Here's my log:

PS C:\Users\Hunter\Downloads\platform-tools> .\adb logcat KOReader:D epd:I *:S
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
D/KOReader( 2884): App created
I/KOReader( 2884): [main thread]: starting KOReader
D/KOReader( 2884): App resumed
D/KOReader( 2884): Surface created
D/KOReader( 2884): Surface changed {
D/KOReader( 2884): format: 4
D/KOReader( 2884): width: 1072
D/KOReader( 2884): height: 1448
D/KOReader( 2884): }
I/KOReader( 2884): Loading KOReader using paths {
I/KOReader( 2884): assets: /data/data/org.koreader.launcher/files
I/KOReader( 2884): library: /data/app-lib/org.koreader.launcher-1
I/KOReader( 2884): storage: /storage/emulated/0
I/KOReader( 2884): }
I/KOReader( 2884): Screen size: 1072x1448
D/KOReader( 2884): show progress dialog
I/KOReader( 2884): Check file in asset module: koreader-v2019.04-101-gefe34b6f_2019-06-03.7z
I/KOReader( 2884): Found new package revision v2019.04-101-gefe34b6f_2019-06-03
I/KOReader( 2884): Installing new koreader package to /data/data/org.koreader.launcher/files
D/KOReader( 2884): ffi.load liblzma.so
D/KOReader( 2884): dismiss progress dialog
I/KOReader( 2884): Change directory to assets dir: /data/data/org.koreader.launcher/files
I/KOReader( 2884): command chmod 755 ./sdcv returned 0
I/KOReader( 2884): command chmod 755 ./tar returned 0
I/KOReader( 2884): command chmod 755 ./zsync returned 0
D/KOReader( 2884): try to load module libs/libkoreader-lfs.so
D/KOReader( 2884): ffi.load SDL2
D/KOReader( 2884): ffi.load libSDL2-2.0.so
D/KOReader( 2884): ffi.load SDL
I/KOReader( 2884): Android 4.4.2 - KitKat (API 19) - flavor: rocks
D/KOReader( 2884): ffi.load blitbuffer
D/KOReader( 2884): ffi.load ./libs/libblitbuffer.so
I/KOReader( 2884): initializing for device ntx_6sl
I/KOReader( 2884): framebuffer resolution: {
I/KOReader( 2884): ["h"] = 1448,
I/KOReader( 2884): ["w"] = 1072
I/KOReader( 2884): }
D/KOReader( 2884): ffi.load libs/libmupdf.so
D/KOReader( 2884): ffi.load libs/libwrap-mupdf.so
D/KOReader( 2884): ffi.load libs/libfreetype.so.6
D/KOReader( 2884): try to load module common/serialize.so
D/KOReader( 2884): try to load module rocks/lib/lua/5.1/lpeg.so
I/KOReader( 2884): opening file /storage/emulated/0/koreader/help/quickstart-en-v2019.04-101-gefe34b6f_2019-06-03.html
D/KOReader( 2884): try to load module libs/libkoreader-cre.so
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/ACaslonPro-Italic.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/ACaslonPro-Regular.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidClock.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidClock_Highlight.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidClock_Solid.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidEmoji.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Clockopia.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidNaskh-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansArmenian.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansGeorgian.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansHebrew-Bold.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansHebrew-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSans_Subset.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond-Initials.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond-InitialsF1.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond-InitialsF2.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond12-Italic.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond12-Regular.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramondSC12-Regular.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-Bold.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-Thin.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-ThinItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-ExtraLight.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-ExtraLightItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Italic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Light.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-LightItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Medium.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-MediumItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-SemiBold.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-SemiBoldItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/palai.ttf>
I/KOReader( 2884): Loading plugins from directory: plugins
I/KOReader( 2884): Plugin plugins/SSH.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/autofrontlight.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/autosuspend.koplugin/main.lua has been disabled.
D/KOReader( 2884): ffi.load sqlite3
D/KOReader( 2884): ffi.load ./libs/libsqlite3.so
D/KOReader( 2884): ffi.load z
D/KOReader( 2884): ffi.load sqlite3
D/KOReader( 2884): ffi.load ./libs/libsqlite3.so
D/KOReader( 2884): try to load module common/socket/score.so
D/KOReader( 2884): try to load module common/mime/mcore.so
D/KOReader( 2884): try to load module common/ssl.so
I/KOReader( 2884): Plugin plugins/hello.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/keepalive.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/kobolight.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/timesync.koplugin/main.lua has been disabled.
I/KOReader( 2884): RD loaded plugin backgroundrunner at plugins/backgroundrunner.koplugin
I/KOReader( 2884): RD loaded plugin batterystat at plugins/batterystat.koplugin
I/KOReader( 2884): RD loaded plugin calibrecompanion at plugins/calibrecompanion.koplugin
I/KOReader( 2884): CoverBrowser: setting default display modes
I/KOReader( 2884): RD loaded plugin coverbrowser at plugins/coverbrowser.koplugin
I/KOReader( 2884): RD loaded plugin evernote at plugins/evernote.koplugin
I/KOReader( 2884): RD loaded plugin goodreads at plugins/goodreads.koplugin
I/KOReader( 2884): RD loaded plugin kosync at plugins/kosync.koplugin
I/KOReader( 2884): RD loaded plugin newsdownloader at plugins/newsdownloader.koplugin
I/KOReader( 2884): RD loaded plugin perceptionexpander at plugins/perceptionexpander.koplugin
I/KOReader( 2884): RD loaded plugin readtimer at plugins/readtimer.koplugin
I/KOReader( 2884): RD loaded plugin send2ebook at plugins/send2ebook.koplugin
I/KOReader( 2884): RD loaded plugin statistics at plugins/statistics.koplugin
I/KOReader( 2884): RD loaded plugin systemstat at plugins/systemstat.koplugin
I/KOReader( 2884): RD loaded plugin terminal at plugins/terminal.koplugin
I/KOReader( 2884): RD loaded plugin texteditor at plugins/texteditor.koplugin
I/KOReader( 2884): RD loaded plugin wallabag at plugins/wallabag.koplugin
I/KOReader( 2884): RD loaded plugin zsync at plugins/zsync.koplugin
PS C:\Users\Hunter\Downloads\platform-tools> .\adb logcat KOReader:D epd:I *:S
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
D/KOReader( 2884): dismiss progress dialog
I/KOReader( 2884): Change directory to assets dir: /data/data/org.koreader.launcher/files
I/KOReader( 2884): command chmod 755 ./sdcv returned 0
I/KOReader( 2884): command chmod 755 ./tar returned 0
I/KOReader( 2884): command chmod 755 ./zsync returned 0
D/KOReader( 2884): try to load module libs/libkoreader-lfs.so
D/KOReader( 2884): ffi.load SDL2
D/KOReader( 2884): ffi.load libSDL2-2.0.so
D/KOReader( 2884): ffi.load SDL
I/KOReader( 2884): Android 4.4.2 - KitKat (API 19) - flavor: rocks
D/KOReader( 2884): ffi.load blitbuffer
D/KOReader( 2884): ffi.load ./libs/libblitbuffer.so
I/KOReader( 2884): initializing for device ntx_6sl
I/KOReader( 2884): framebuffer resolution: {
I/KOReader( 2884): ["h"] = 1448,
I/KOReader( 2884): ["w"] = 1072
I/KOReader( 2884): }
D/KOReader( 2884): ffi.load libs/libmupdf.so
D/KOReader( 2884): ffi.load libs/libwrap-mupdf.so
D/KOReader( 2884): ffi.load libs/libfreetype.so.6
D/KOReader( 2884): try to load module common/serialize.so
D/KOReader( 2884): try to load module rocks/lib/lua/5.1/lpeg.so
I/KOReader( 2884): opening file /storage/emulated/0/koreader/help/quickstart-en-v2019.04-101-gefe34b6f_2019-06-03.html
D/KOReader( 2884): try to load module libs/libkoreader-cre.so
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/ACaslonPro-Italic.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/ACaslonPro-Regular.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidClock.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidClock_Highlight.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidClock_Solid.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/AndroidEmoji.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Clockopia.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidNaskh-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansArmenian.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansGeorgian.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansHebrew-Bold.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSansHebrew-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/DroidSans_Subset.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond-Initials.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond-InitialsF1.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond-InitialsF2.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond12-Italic.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramond12-Regular.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/EBGaramondSC12-Regular.otf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-Bold.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-Thin.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Roboto-ThinItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-ExtraLight.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-ExtraLightItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Italic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Light.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-LightItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Medium.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-MediumItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-Regular.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-SemiBold.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/Spectral-SemiBoldItalic.ttf>
E/KOReader( 2884): failed to register crengine font: cannot register font </system/fonts/palai.ttf>
I/KOReader( 2884): Loading plugins from directory: plugins
I/KOReader( 2884): Plugin plugins/SSH.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/autofrontlight.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/autosuspend.koplugin/main.lua has been disabled.
D/KOReader( 2884): ffi.load sqlite3
D/KOReader( 2884): ffi.load ./libs/libsqlite3.so
D/KOReader( 2884): ffi.load z
D/KOReader( 2884): ffi.load sqlite3
D/KOReader( 2884): ffi.load ./libs/libsqlite3.so
D/KOReader( 2884): try to load module common/socket/score.so
D/KOReader( 2884): try to load module common/mime/mcore.so
D/KOReader( 2884): try to load module common/ssl.so
I/KOReader( 2884): Plugin plugins/hello.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/keepalive.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/kobolight.koplugin/main.lua has been disabled.
I/KOReader( 2884): Plugin plugins/timesync.koplugin/main.lua has been disabled.
I/KOReader( 2884): RD loaded plugin backgroundrunner at plugins/backgroundrunner.koplugin
I/KOReader( 2884): RD loaded plugin batterystat at plugins/batterystat.koplugin
I/KOReader( 2884): RD loaded plugin calibrecompanion at plugins/calibrecompanion.koplugin
I/KOReader( 2884): CoverBrowser: setting default display modes
I/KOReader( 2884): RD loaded plugin coverbrowser at plugins/coverbrowser.koplugin
I/KOReader( 2884): RD loaded plugin evernote at plugins/evernote.koplugin
I/KOReader( 2884): RD loaded plugin goodreads at plugins/goodreads.koplugin
I/KOReader( 2884): RD loaded plugin kosync at plugins/kosync.koplugin
I/KOReader( 2884): RD loaded plugin newsdownloader at plugins/newsdownloader.koplugin
I/KOReader( 2884): RD loaded plugin perceptionexpander at plugins/perceptionexpander.koplugin
I/KOReader( 2884): RD loaded plugin readtimer at plugins/readtimer.koplugin
I/KOReader( 2884): RD loaded plugin send2ebook at plugins/send2ebook.koplugin
I/KOReader( 2884): RD loaded plugin statistics at plugins/statistics.koplugin
I/KOReader( 2884): RD loaded plugin systemstat at plugins/systemstat.koplugin
I/KOReader( 2884): RD loaded plugin terminal at plugins/terminal.koplugin
I/KOReader( 2884): RD loaded plugin texteditor at plugins/texteditor.koplugin
I/KOReader( 2884): RD loaded plugin wallabag at plugins/wallabag.koplugin
I/KOReader( 2884): RD loaded plugin zsync at plugins/zsync.koplugin
I/KOReader( 2884): FM loaded plugin backgroundrunner at plugins/backgroundrunner.koplugin
I/KOReader( 2884): FM loaded plugin batterystat at plugins/batterystat.koplugin
I/KOReader( 2884): FM loaded plugin calibrecompanion at plugins/calibrecompanion.koplugin
I/KOReader( 2884): FM loaded plugin coverbrowser at plugins/coverbrowser.koplugin
I/KOReader( 2884): FM loaded plugin evernote at plugins/evernote.koplugin
I/KOReader( 2884): FM loaded plugin goodreads at plugins/goodreads.koplugin
I/KOReader( 2884): FM loaded plugin newsdownloader at plugins/newsdownloader.koplugin
I/KOReader( 2884): FM loaded plugin perceptionexpander at plugins/perceptionexpander.koplugin
I/KOReader( 2884): FM loaded plugin readtimer at plugins/readtimer.koplugin
I/KOReader( 2884): FM loaded plugin send2ebook at plugins/send2ebook.koplugin
I/KOReader( 2884): FM loaded plugin statistics at plugins/statistics.koplugin
I/KOReader( 2884): FM loaded plugin systemstat at plugins/systemstat.koplugin
I/KOReader( 2884): FM loaded plugin terminal at plugins/terminal.koplugin
I/KOReader( 2884): FM loaded plugin texteditor at plugins/texteditor.koplugin
I/KOReader( 2884): FM loaded plugin wallabag at plugins/wallabag.koplugin
I/KOReader( 2884): opening file /storage/emulated/0/Download/pg345-images.epub
I/KOReader( 2884): RD loaded plugin backgroundrunner at plugins/backgroundrunner.koplugin
I/KOReader( 2884): RD loaded plugin batterystat at plugins/batterystat.koplugin
I/KOReader( 2884): RD loaded plugin calibrecompanion at plugins/calibrecompanion.koplugin
I/KOReader( 2884): RD loaded plugin coverbrowser at plugins/coverbrowser.koplugin
I/KOReader( 2884): RD loaded plugin evernote at plugins/evernote.koplugin
I/KOReader( 2884): RD loaded plugin goodreads at plugins/goodreads.koplugin
I/KOReader( 2884): RD loaded plugin kosync at plugins/kosync.koplugin
I/KOReader( 2884): RD loaded plugin newsdownloader at plugins/newsdownloader.koplugin
I/KOReader( 2884): RD loaded plugin perceptionexpander at plugins/perceptionexpander.koplugin
I/KOReader( 2884): RD loaded plugin readtimer at plugins/readtimer.koplugin
I/KOReader( 2884): RD loaded plugin send2ebook at plugins/send2ebook.koplugin
I/KOReader( 2884): RD loaded plugin statistics at plugins/statistics.koplugin
I/KOReader( 2884): RD loaded plugin systemstat at plugins/systemstat.koplugin
I/KOReader( 2884): RD loaded plugin terminal at plugins/terminal.koplugin
I/KOReader( 2884): RD loaded plugin texteditor at plugins/texteditor.koplugin
I/KOReader( 2884): RD loaded plugin wallabag at plugins/wallabag.koplugin
I/KOReader( 2884): RD loaded plugin zsync at plugins/zsync.koplugin

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 5, 2019

screen

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

Tested it out, and there was no setting for Full Refresh rate on that build.

@hcors That's weird, I added these three devices based on feedback:

+        // Sony DPT-RP1
+        EINK_SONY_RP1 = MANUFACTURER.toLowerCase().contentEquals("sony")
+                && MODEL.toLowerCase().contentEquals("dpt-rp1");
+        deviceMap.put(Device.EINK_SONY_RP1, EINK_SONY_RP1);
+
+        // Nook Glowlight 3
+        EINK_NOOK_V520 = MANUFACTURER.toLowerCase().contentEquals("barnes and noble")
+                && MODEL.toLowerCase().contentEquals("bnrv520");
+        deviceMap.put(Device.EINK_NOOK_V520, EINK_NOOK_V520);
+
+        // Android Emulator for x86
+        EINK_EMULATOR_X86 = MODEL.contentEquals("Android SDK built for x86");
+        deviceMap.put(Device.EINK_EMULATOR_X86, EINK_EMULATOR_X86);

In particular the Nook Glowlight 3 based on your feedback in #5056 (comment). I see no differences between both (case insensitivy). Could you check if your report is correct?

I tested the behaviour on the emulator, and at least it doesn't crash and tries to invalidate each x pages as intended.

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 5, 2019

Re-downloaded the apk from Dropbox, installed, and confirmed that option is not under my e-ink settings. Copying my screenshot from e-ink test, to ensure I didn't give you incorrect info before.

screen

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 5, 2019

Is it due to the code having

contentEquals("barnes and noble") and the name on eink test is BarnesAndNoble(one word)?

I am completely guessing, but I thought it worth pointing out. As I said, coding is clear over my head. :)

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

contentEquals("barnes and noble") and the name on eink test is BarnesAndNoble(one word)

yeah, that's it. I'm uploading a new version to dropbox. It should be ready in a few minutes 👍

@NiLuJe

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

@pazos: Would it make sense to make those check ignore whitespace and case? IIRC, that's not the first time something like this happened ;).

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 5, 2019

Hey, awesome.

Adds debugging code to resume lol

I'm ready to test whenever, glad to assist

@NiLuJe

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Yeah, that vaguely looks like REAGL being quirky. Possibly related to the discussion linked above only if you have the status bar enabled in a mode that might be triggering UI refreshes (which, currently, even if it's hidden, should only happen if it's in the "all in one" mode).

Otherwise, since you're in the reader, there should be no other stray refreshes, unless Android is being quirky there, too ;).

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

Flashes a big flash every certain number of pages as specified, but it also has smaller flashes on the next two pages after the one specified in the settings. Not complaining, the less ghosting the better, I say :)

Otherwise, since you're in the reader, there should be no other stray refreshes, unless Android is being quirky there, too ;).

Android is quirky because it refreshes the screen by its own in all devices except tolinos. On other devices we just issue full updates, but Nooks are treated like tolinos right now so I think both update routines (the system one and our own) are running and the result is in de video.

Possible solution?: issue just full updates on Nooks

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 10, 2019

This is the logcat, seems its trying to refresh each page turn with two instances.

V/KOReader( 2900): requesting epd update, mode:7, delay:0, [x:0, y:0, w:1072, h:1448]
I/epd ( 2900): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=5 24698233
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=7 65931
V/PowerManagerService( 2458): Debug:mScreenOffTimeoutSetting=300000
V/KOReader( 2900): requesting epd update, mode:7, delay:0, [x:0, y:0, w:1072, h:1448]
I/epd ( 2900): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=5 2074526
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=7 70187
V/PowerManagerService( 2458): Debug:mScreenOffTimeoutSetting=300000
V/KOReader( 2900): requesting epd update, mode:7, delay:0, [x:0, y:0, w:1072, h:1448]
I/epd ( 2900): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=5 2191556
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=7 67537
V/PowerManagerService( 2458): Debug:mScreenOffTimeoutSetting=300000
V/KOReader( 2900): requesting epd update, mode:7, delay:0, [x:0, y:0, w:1072, h:1448]
I/epd ( 2900): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=5 1630809
I/imx6.gralloc( 2076): update_to_display:left=0, top=0, right=1448, bottom=1072 updatemode=7 64935

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 10, 2019

Just to add on: I ran logcat on Coolreader, and it seems it does updatemode=5 with each page turn

@pazos Is the Koreader issuing a type 7 update interfering with the normal type 5 that the Nook seems to do by default?

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

Your device worked as is without any special configuration but lacked the full refresh each x pages. This full black to white update is type 34 and delay 50.

The other eink updates (which you can log with adb logcat epd:* *:S are not needed for your device since system driver seems to do a good job based on your original video.

On Tolinos things are different and we need to do all eink refreshes, like we do in kindle, kobo ...

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 11, 2019

PS C:\Users\Hunter\Downloads\platform-tools> .\adb logcat epd:* *:S
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
I/epd ( 3480): requested eink refresh, type: 7 x:101 y:627 w:970 h:821
I/epd ( 3480): requested eink refresh, type: 34 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:1114 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:657
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:1114 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1111
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1111
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:655
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:743
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:743
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 34 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448
I/epd ( 3480): requested eink refresh, type: 7 x:0 y:0 w:1072 h:1448

@Ryogo-Z

This comment has been minimized.

Copy link

commented Jun 11, 2019

Calling update mode 7 on nooks is a bad idea in general, because Nook Glowlight Plus 6" does not support that mode. Update mode 5 (auto, which will use mode 7 most of the time when possible) should be used by default (unless you need explicit full screen update).

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

@hcors: quick fix in https://www.dropbox.com/s/mqjp5u5gmlqpqcz/koreader-android-arm-linux-androideabi-debug-v2019.04-101-gefe34b6f_2019-06-03.apk?dl=0

I'm interested in full logs (better in a text file which you can "drag and drop" here), and, if it works, I'm interested in a video too 👍

If you repeat the epd log you should see only type 34 requests.

Had no time to test on real hardware, so a bug (or two) are a expected behaviour 😄

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

Update mode 5 (auto, which will use mode 7 most of the time when possible) should be used by default

@Ryogo-Z: that is true even for Tolinos. I will fix that later (reagl -> auto). But for nooks I think we can skip uneeded updates.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 11, 2019

Looks to be working perfectly on my end.

Logcat.txt
EPD test.txt

https://vimeo.com/341652208

Thank you all so much for your help getting this to work. Love my IR screen (and style tweaks!)

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

@hcors thanks for your quick response. Everything seem to work fine except the fullscreen update, which has some artifacts. I think it is caused by the delay (50ms) introduced for tolinos. I will see a way to leave the delay at zero for Nooks without making spaguetti code.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 11, 2019

No problem, let me know anytime you want a test on your changes to it.

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

@hcors: a build without delay for full updates here -> https://www.dropbox.com/s/p5c0kbi8gqz3pky/koreader-android-arm-linux-androideabi-debug-v2019.04-101-gefe34b6f_2019-06-03.apk?dl=0

If it works then please upload a video.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 12, 2019

That didn't seem to change anything in regards to the refresh behavior. At the end of the video, I did some swipes to test that way to screen refresh, and that works quite well.

https://vimeo.com/341821741

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

@hcors: thanks for the video.

Yeah, we race against system driver and won (the full eink update finish first, then the system driver does an eink update)

But as you said our screen refresh function works quite well (and without any delay). I will leave things as they are now. Someday I will get a Nook on my hands and will figure out a way to stop system updates.

For now, you can set the full eink update each Chapter and rely on the diagonal swipes to refresh the screen when you find ghosting. That's better than nothing 👍

@char11

This comment has been minimized.

Copy link

commented Jun 12, 2019

For test set delay to 500 or above. The system will draw a new page and then you will force a full refresh. I tested this method on tolino with old software (it was the same effect as on the video) and the full refresh looked as normal. You only need to choose a good delay time.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 13, 2019

@char11 @pazos Is there a way to set that manually in any of the config files, the delay referenced?

@char11

This comment has been minimized.

Copy link

commented Jun 14, 2019

@hcors Try just for the test. I'm curious if will be any difference. https://ufile.io/2etnfa4h

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 14, 2019

@char11 That worked perfectly. The next page was drawn, and then the refresh occurs.

@char11

This comment has been minimized.

Copy link

commented Jun 14, 2019

I think it looks more "natural". I set the delay to 500. Maybe it would be enough to set less. The delay is set in the source code.

@hcors

This comment has been minimized.

Copy link
Author

commented Jun 14, 2019

Here's how it looks on the GL3. Looks awesome to me, thanks again to all of you for your help on this.

https://vimeo.com/342298768

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

If the lag (using the gesture to refresh) does not bother you we can merge the new 500ms delay

@char11

This comment has been minimized.

Copy link

commented Jun 14, 2019

@pazos By the way - I checked that mode 5 on my tolino refreshes as a2. Looks terrible. :(

@Ryogo-Z

This comment has been minimized.

Copy link

commented Jun 14, 2019

I think @pazos already know this, but nevertheless...

EINK_WAVEFORM_MODE_ANIM = 4;
EINK_WAVEFORM_MODE_AUTO = 5;
EINK_WAVEFORM_MODE_DU = 1;
EINK_WAVEFORM_MODE_GC16 = 2;
EINK_WAVEFORM_MODE_GC4 = 3;
EINK_WAVEFORM_MODE_GLD16 = 7;
EINK_WAVEFORM_MODE_GLR16 = 6;
UI_A2_MODE = 2305;
UI_DEFAULT_MODE = 5;
UI_FULL_REFRESH = 536871010;
UI_TOUCH_MODE = 1;
@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

@Ryogo-Z: a bit different than @char11 reported for tolinos

Makes sense. Auto is 5 on Nook but 4 on Tolino, GLD and GLR are swapped. Thanks for the feedback.

I'm going to revert the waveform used for partial updates on Tolinos without caring about the Nooks (since it is unused).

On the future we'll want to extend two different classes from NTXEPDController, one for Nooks and other for Tolinos, and have proper definitions on each class. I won't work on it on the next weeks/months?, PR are welcome.

@Ryogo-Z

This comment has been minimized.

Copy link

commented Jun 14, 2019

@pazos right, I had not payed attention that auto-mode on nooks and tolinos uses different values.
I'd gladly work on this, but I fear I won't be able to do so for at least 2 more weeks :(

@char11

This comment has been minimized.

Copy link

commented Jun 15, 2019

Unfortunately, mode 4 does not work on tolino as expected. koreader/koreader-base#920 (comment)
I also changed as you suggested FlashPartialImp and FlashUIImp to mode 39 also set delay for full refresh to 0. It works fine. If you could change it by the way it would be great. Big thanks.

@pazos

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

@char11: cool

-local ntx_du, ntx_gc16, ntx_auto, ntx_regal, ntx_full = 1, 2, 5, 7, 34 -- luacheck: ignore
+local update_full, update_partial = 32, 0 -- luacheck: ignore
+local waveform_du, waveform_gc16, waveform_regal = 1, 2, 7 -- luacheck: ignore
+local partial_du, partial_gc16, partial_regal = waveform_du, waveform_gc16, waveform_regal -- luacheck: ignore
+local full_du, full_gc16, full_regal = update_full + waveform_du, update_full + waveform_gc16, update_full + waveform_regal -- luacheck: ignore

So, let me understand. Do you want to change the FlashImpl to full_regal (39) and leave the non flashImpl as partial_regal(7)? For fastImpl leaving partial_du(1) and for fullImpl full_gc16(34). Am I correct?

@char11

This comment has been minimized.

Copy link

commented Jun 15, 2019

Yes, you are correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.