Mobileread
Night mode problem on PW1 after cover opening
#1  LittleBiG 05-16-2020, 01:08 PM
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.
Reply 

#2  NiLuJe 05-16-2020, 05:26 PM
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.
Reply 

#3  NiLuJe 05-17-2020, 09:29 PM
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).
Reply 

#4  LittleBiG 05-22-2020, 02:35 PM
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.
Reply 

#5  NiLuJe 05-23-2020, 01:15 AM
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.
Reply 

#6  yparitcher 05-24-2020, 07:56 PM
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?
Reply 

#7  NiLuJe 05-24-2020, 10:26 PM
@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.
Reply 

#8  LittleBiG 05-25-2020, 01:16 PM
Quote NiLuJe
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.
Reply 

#9  yparitcher 05-25-2020, 01:25 PM
Quote NiLuJe
@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 NiLuJe
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?
Reply 

#10  yparitcher 05-25-2020, 03:51 PM
I got it working, i check for the existence of "/var/tmp/koreader.sh" to indicate if koreader is running.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register