Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2020, 01:08 PM   #1
LittleBiG
Zealot
LittleBiG began at the beginning.
 
Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
Night mode problem on PW1 after cover opening

On PW1, after opening the cover, there is an additional page refresh adter 1-2 seconds. When the KOReader is in night mode this additional automatic refresh makes the screen normal (black ink on white background), I have to do a manual full refresh to show the secreen correctly in night mode.
LittleBiG is offline   Reply With Quote
Old 05-16-2020, 05:26 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Yep. That's how nightmode works (as in, it's terrible and I can't stand it).

Note that on the PW2+, that double-refresh is inhibited by the hardware, so it's slightly less terrible in that respect.

EDIT: Errm, wait, I might have misunderstood you. I was specifically thinking about how the black flash gets stuttery in nightmode on older devices. What you describe sounds worse than that.
On which FW version is that? The final release (5.6.1.1) might be slightly less awful, but maybe not. IIRC, the first significant nightmode enhancements came with FW 5.6.5, i.e., not on a PW1.

Last edited by NiLuJe; 05-16-2020 at 05:29 PM.
NiLuJe is offline   Reply With Quote
Old 05-17-2020, 09:29 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Okay, I was apparently way too tired to understand what you were saying last night ;D.

By chance, I happen to have gotten my own PW1 back just today, so I can at least confirm that on 5.6.1.1, nightmode behaves as well as can be.

Which leads me to my next question: which FW version are you running, is this a SO device, and when you say "cover", am I right to assume you meant a smart cover?

(Un)fortunately, my own PW1 is SO, so screensaver handling is honored by the OS, which means there is indeed a race between the system and us, one we mostly always win, so I do get that double-refresh, and the system one will obviously never be using nightmode on a PW1.

There's not much I can do about that without impairing functionality.

This should squarely be an SO-specific quirk, though.

I don't have a cover on any of my devices, but I don't *think* it should affect this.

TL;DR: My money would be on Special Offers.

(On the upside, that allowed me to confirm that SO handling is still working as intended 5 years after the last time I tested it, so, yay).

Last edited by NiLuJe; 05-17-2020 at 09:34 PM.
NiLuJe is offline   Reply With Quote
Old 05-22-2020, 02:35 PM   #4
LittleBiG
Zealot
LittleBiG began at the beginning.
 
Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
SOrry for being back this late. I use 5.6.1.1. I love KOReader on PW1, because it will be never ruined by a new firmware, and I think the support is much easier this way. Even I have more modern devices, I always keep a PW1 for KOReader. Yes, I meant the smart cover. My device is without SO. And actually the same thing happens using the on/off button to wake the Kindle up, without the cover.
What you wrote:
there is indeed a race between the system and us, one we mostly always win, so I do get that double-refresh, and the system one will obviously never be using nightmode on a PW1.
Exactly what seems to be happening! The second refresh, done by the system, "ruins" the nigthmode, set by KOReader. And no, not only for SO devices, I have a confirmation from an other KOReader user.

Last edited by LittleBiG; 05-22-2020 at 02:47 PM.
LittleBiG is offline   Reply With Quote
Old 05-23-2020, 01:15 AM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
What confirmation, where, when, on which device, which FW?

This should absolutely not be happening on a sane non-SO device, and I can't reproduce it on any other Kindle than my SO one.
NiLuJe is offline   Reply With Quote
Old 05-24-2020, 07:56 PM   #6
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
I have a KT4.
Koreader is set to "leave screen as is" for screensaver.
I use a custom program (https://github.com/yparitcher/kindle-zmanim) to dynamically set the screensaver
It uses fbink dump/restore to save and restore the current screen
when using koreader's night mode if i wake the kindle quickly the screen is correct (night) however if i wait (allowing the device to suspend) when i wake the kindle it refreshes after 1-2 secs white (black ink on white background) koreader wins the race
if i remove my custom wakeup handling code it works correctly
is there a easy way to check if koreader is active and let koreader do the refresh? or maybe some way of hooking into koreader's screensaver callback?
yparitcher is offline   Reply With Quote
Old 05-24-2020, 10:26 PM   #7
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@yparitcher: The neat way would be to punt the nightmode handling to the kernel by just flipping the grayscale flag in the fb state instead of ORing the INVERT EPDC flag on each refresh ourselves. This way *every* refresh is inverted, no matter the source.

This is highly platform specific, though (mxcfb @ 8bpp, which, granted, means the full Kobo lineup, the full reMarkable lineup, and every Kindle on FW 5.x. And possibly PB, too).

----

The cheap way would be to simply check the process table for luajit/koreader and skip the fbink_refresh() call if it's up .

AFAIR, it's a bit gnarly if you want to do it in C, because you're basically reinventing procps, so it may be simpler to just rely on the output from pidof or pgrep.

Last edited by NiLuJe; 05-24-2020 at 10:32 PM.
NiLuJe is offline   Reply With Quote
Old 05-25-2020, 01:16 PM   #8
LittleBiG
Zealot
LittleBiG began at the beginning.
 
Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
Quote:
Originally Posted by NiLuJe View Post
What confirmation, where, when, on which device, which FW?
Exactly the same config: PW1, without SO, firmware version 5.6.1.1. After 1-2 seconds a refresh which causes black on white text.
Edit: it is more than 3 seconds actually. I had to change the Delay when exit from screensaver option to 5 sec to slow the koreader screen refresh enough to get nightmode after wake up.

Last edited by LittleBiG; 05-25-2020 at 01:34 PM.
LittleBiG is offline   Reply With Quote
Old 05-25-2020, 01:25 PM   #9
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
Quote:
Originally Posted by NiLuJe View Post
@yparitcher: The neat way would be to punt the nightmode handling to the kernel by just flipping the grayscale flag in the fb state instead of ORing the INVERT EPDC flag on each refresh ourselves. This way *every* refresh is inverted, no matter the source.

This is highly platform specific, though (mxcfb @ 8bpp, which, granted, means the full Kobo lineup, the full reMarkable lineup, and every Kindle on FW 5.x. And possibly PB, too).

----
this would probably cause the screensaver to also be inverted

Quote:
Originally Posted by NiLuJe View Post
The cheap way would be to simply check the process table for luajit/koreader and skip the fbink_refresh() call if it's up .

AFAIR, it's a bit gnarly if you want to do it in C, because you're basically reinventing procps, so it may be simpler to just rely on the output from pidof or pgrep.
instead of trying to walk procfs i might change my koreader.sh to save a pid file in /var/tmp/ which i can then use to check if koreader is active. this would solve all my problems, also this avoids any double flash even when in regular mode by not refreshing the screen myself.

do you think i could get that merged into koreader as it might be useful for others?
yparitcher is offline   Reply With Quote
Old 05-25-2020, 03:51 PM   #10
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
I got it working, i check for the existence of "/var/tmp/koreader.sh" to indicate if koreader is running.
yparitcher is offline   Reply With Quote
Old 05-25-2020, 05:15 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by yparitcher View Post
this would probably cause the screensaver to also be inverted
Oh, Duh. .

(I'll blame it on 5AM brain ;p).

----

Quote:
Originally Posted by yparitcher View Post
I got it working, i check for the existence of "/var/tmp/koreader.sh" to indicate if koreader is running.
Ah, yeah, I'd forgotten that bit of startup script trickery (it's a Kindle special ;p), nice .
NiLuJe is offline   Reply With Quote
Old 02-22-2021, 05:21 PM   #12
LittleBiG
Zealot
LittleBiG began at the beginning.
 
Posts: 122
Karma: 10
Join Date: Nov 2014
Device: Kindle Oasis 3, K4NT, Kobo Mini
I just want to mention that there is no extra refresh in 2021.02-20, I am not sure which build corrected it. I am actually curious if this is the result of an intentional improvement or only a fortunate side-effect of something.
LittleBiG is offline   Reply With Quote
Old 02-22-2021, 06:55 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Depends on when you last checked, I guess .

There were a few sporadic Kindle-specific tweaks to ScreenSaver handling over the last few months.
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre 4.10 night mode/dark mode likeaghost Calibre 11 05-03-2020 05:43 PM
Night mode problem with one book Valkrider Marvin 7 11-01-2018 10:01 AM
PW1 hangs when booting diags mode wstrzalka Kindle Developer's Corner 17 10-15-2016 09:56 AM
pw1 to 3 - night reading - eye burn henders254 Amazon Kindle 50 05-12-2016 04:48 AM
Cover Art Problem When Kobo Touch in Sleep Mode Bermudagirl Kobo Reader 17 02-26-2014 11:09 PM


All times are GMT -4. The time now is 03:02 PM.


MobileRead.com is a privately owned, operated and funded community.