![]() |
#871 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 25
Karma: 438848
Join Date: Jul 2021
Location: Taiwan
Device: Kobo Forma/Elipsa/Clara 2E/Libra 2, mooInk Plus 2, Pubook Pro 10.3
|
Quote:
Reverted to 0.9.27 works again~ |
|
![]() |
![]() |
![]() |
#872 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 446
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Plato 0.9.30
I've released Plato 0.9.30.
|
![]() |
![]() |
![]() |
#873 |
doofus
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,549
Karma: 13089041
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
@baskerville is there a way to tell when the screen is done updating? I want to minimize the white flash that occurs when doing updatemode::full in inverted mode. Currently i just turn off the front light right before context.fb.update and spawn a thread which sleeps for a short interval before turning the light back on. Can I do better? Thanks
|
![]() |
![]() |
![]() |
#874 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 446
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
You can wait for an update to complete with the wait function. So in process_render_queue, instead of:
Code:
match context.fb.update(&rect, mode) { … } Code:
if mode == Update::Full && context.fb.inverted() && context.settings.frontlight { context.set_frontlight(false); // TODO: log the errors. if let Ok(token) = context.fb.update(&rect, mode) { context.fb.wait(token).ok(); } context.set_frontlight(true); } else { match context.fb.update(&rect, mode) { … } } Last edited by baskerville; 08-18-2022 at 10:45 AM. |
![]() |
![]() |
![]() |
#875 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I've never been entirely fond of the results with that approach last I checked, but it's possibly less terrible on some devices (the latency at which the frontlight reacts varies wildly between devices).
Regardless of how it ends up working, yeah, that's basically the best you can do from userland ![]() Keep in mind that wait might block *noticeably* longer than the visible refresh. Not a lot, but it's noticeable, especially given the timing issues mentioned earlier. And also that the wait ioctl is hilariously borked on some devices (Libra 1 for sure, jury's still out for the Libra 2 & Nia). Last edited by NiLuJe; 08-18-2022 at 02:01 PM. |
![]() |
![]() |
![]() |
#876 |
doofus
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,549
Karma: 13089041
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
Thank you both.
The wait method works pretty well on my Libra 2 (my only device). Certainly preferable to my dodgy sleep timer. Error log is clean so far. Binary attached if anyone wants to test. Code branch here. I'll submit a PR if you're interested. |
![]() |
![]() |
![]() |
#877 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
The Libra 2 happens to supports "Eclipse" waveforms (e.g., dedicated white-on-black ones), which is admittedly what makes nightmode bearable to begin with
![]() On older devices without those, the flash can appear to stagger or double, which looks *hilariously* bad ![]() EDIT: Or not. Flashing GL16 sucks, too. Last edited by NiLuJe; 08-20-2022 at 05:23 PM. |
![]() |
![]() |
![]() |
#878 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Just quickly tried something similar on sunxi in KOReader, and we're foiled by the fact that the wait ioctl sometimes returns early, which kinda defeats the purpose ;o).
Code:
diff --git a/ffi/framebuffer_sunxi.lua b/ffi/framebuffer_sunxi.lua index dc4ddef7..70bbf605 100644 --- a/ffi/framebuffer_sunxi.lua +++ b/ffi/framebuffer_sunxi.lua @@ -160,7 +160,10 @@ local function disp_update(fb, ioc_cmd, ioc_data, is_flashing, waveform_mode, wa end -- Handle night mode shenanigans + local frontlight_dimmed = false + local powerd, fl_intensity if fb.night_mode then + powerd = fb.device:getPowerDevice() -- Enforce a nightmode-specific mode to limit ghosting, where appropriate (i.e., partial & flashes). if fb:_isPartialWaveFormMode(waveform_mode) then waveform_mode = fb:_getNightWaveFormMode() @@ -190,6 +193,14 @@ local function disp_update(fb, ioc_cmd, ioc_data, is_flashing, waveform_mode, wa -- Recap the actual details of the ioctl, vs. what UIManager asked for... fb.debug(string.format("disp_update: %ux%u region @ (%u, %u) (WFM: %u [flash: %s])", w, h, x, y, waveform_mode, is_flashing)) + -- Frontlight dimming in night mode + if fb.night_mode and is_flashing and powerd:isFrontlightOn() then + -- FIXME: Tweak is flashing to full-screen flashing... + fl_intensity = powerd:frontlightIntensity() + powerd:setIntensity(5) + frontlight_dimmed = true + end + if C.ioctl(fb.fd, ioc_cmd, ioc_data) == -1 then local err = ffi.errno() fb.debug("DISP_EINK_UPDATE2 ioctl failed:", ffi.string(C.strerror(err))) @@ -208,6 +219,11 @@ local function disp_update(fb, ioc_cmd, ioc_data, is_flashing, waveform_mode, wa end -- And make sure we won't wait for it again, in case the next refresh trips one of our wait_for_* heuristics ;). fb.dont_wait_for_marker = marker + + if frontlight_dimmed then + -- NOTE: Foiled by the fact that the ioctl randomly returns early instead of its usual 450ms (which is a value that works decently well re: ft dimming). + powerd:setIntensity(fl_intensity) + end end end Code:
21:26:18.269456 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_UPDATE2, {area={x_top=0, y_top=0, x_bottom=1403, y_bottom=1871}, layer_num=1, update_mode=EINK_NO_MERGE|EINK_GCK16_MODE, lyr_cfg2={info={mode=LAYER_MODE_BUFFER, zorder=0, alpha_mode=1, alpha_value=255, screen_win={x=0, y=0, width=1404, height=1872}, b_trd_out=0, out_trd_mode=DISP_3D_OUT_MODE_TB, fb={fd=0, y8_fd=4, size=[{width=1404, height=1872}, {width=0, height=0}, {width=0, height=0}], align=[0, 0, 0], format=DISP_FORMAT_8BIT_GRAY, color_space=DISP_GBR_F, trd_right_fd=0, pre_multiply=1, crop={x=0, y=0, width=1404 << 32, height=1872 << 32}, flags=DISP_BF_NORMAL, scan=DISP_SCAN_PROGRESSIVE, eotf=DISP_EOTF_GAMMA22, depth=0, fbd_en=0, metadata_fd=0, metadata_size=0, metadata_flag=0}, id=0, atw={used=0, mode=NORMAL_MODE, b_row=0, b_col=0, cof_fd=0}}, enable=1, channel=0, layer_id=1}, frame_id=[12811], rotate=270, cfa_use=0}) = 12811 <0.020400> 21:26:18.291170 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_WAIT_FRAME_SYNC_COMPLETE, 12811) = 0 <0.005869> 21:26:18.298376 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x14) = 0 <0.007617> 21:26:22.473411 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x5) = 0 <0.007985> 21:26:22.482924 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_UPDATE2, {area={x_top=0, y_top=0, x_bottom=1403, y_bottom=1871}, layer_num=1, update_mode=EINK_NO_MERGE|EINK_GCK16_MODE, lyr_cfg2={info={mode=LAYER_MODE_BUFFER, zorder=0, alpha_mode=1, alpha_value=255, screen_win={x=0, y=0, width=1404, height=1872}, b_trd_out=0, out_trd_mode=DISP_3D_OUT_MODE_TB, fb={fd=0, y8_fd=4, size=[{width=1404, height=1872}, {width=0, height=0}, {width=0, height=0}], align=[0, 0, 0], format=DISP_FORMAT_8BIT_GRAY, color_space=DISP_GBR_F, trd_right_fd=0, pre_multiply=1, crop={x=0, y=0, width=1404 << 32, height=1872 << 32}, flags=DISP_BF_NORMAL, scan=DISP_SCAN_PROGRESSIVE, eotf=DISP_EOTF_GAMMA22, depth=0, fbd_en=0, metadata_fd=0, metadata_size=0, metadata_flag=0}, id=0, atw={used=0, mode=NORMAL_MODE, b_row=0, b_col=0, cof_fd=0}}, enable=1, channel=0, layer_id=1}, frame_id=[12812], rotate=270, cfa_use=0}) = 12812 <0.020275> 21:26:22.504865 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_WAIT_FRAME_SYNC_COMPLETE, 12812) = 0 <0.453873> 21:26:22.962046 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x14) = 0 <0.009773> 21:26:25.090976 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x5) = 0 <0.007463> 21:26:25.099929 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_UPDATE2, {area={x_top=0, y_top=0, x_bottom=1403, y_bottom=1871}, layer_num=1, update_mode=EINK_NO_MERGE|EINK_GCK16_MODE, lyr_cfg2={info={mode=LAYER_MODE_BUFFER, zorder=0, alpha_mode=1, alpha_value=255, screen_win={x=0, y=0, width=1404, height=1872}, b_trd_out=0, out_trd_mode=DISP_3D_OUT_MODE_TB, fb={fd=0, y8_fd=4, size=[{width=1404, height=1872}, {width=0, height=0}, {width=0, height=0}], align=[0, 0, 0], format=DISP_FORMAT_8BIT_GRAY, color_space=DISP_GBR_F, trd_right_fd=0, pre_multiply=1, crop={x=0, y=0, width=1404 << 32, height=1872 << 32}, flags=DISP_BF_NORMAL, scan=DISP_SCAN_PROGRESSIVE, eotf=DISP_EOTF_GAMMA22, depth=0, fbd_en=0, metadata_fd=0, metadata_size=0, metadata_flag=0}, id=0, atw={used=0, mode=NORMAL_MODE, b_row=0, b_col=0, cof_fd=0}}, enable=1, channel=0, layer_id=1}, frame_id=[12813], rotate=270, cfa_use=0}) = 12813 <0.019464> 21:26:25.121765 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_WAIT_FRAME_SYNC_COMPLETE, 12813) = 0 <0.452931> 21:26:25.578245 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x14) = 0 <0.010160> 21:26:27.256054 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x5) = 0 <0.007777> 21:26:27.265314 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_UPDATE2, {area={x_top=0, y_top=0, x_bottom=1403, y_bottom=1871}, layer_num=1, update_mode=EINK_NO_MERGE|EINK_GCK16_MODE, lyr_cfg2={info={mode=LAYER_MODE_BUFFER, zorder=0, alpha_mode=1, alpha_value=255, screen_win={x=0, y=0, width=1404, height=1872}, b_trd_out=0, out_trd_mode=DISP_3D_OUT_MODE_TB, fb={fd=0, y8_fd=4, size=[{width=1404, height=1872}, {width=0, height=0}, {width=0, height=0}], align=[0, 0, 0], format=DISP_FORMAT_8BIT_GRAY, color_space=DISP_GBR_F, trd_right_fd=0, pre_multiply=1, crop={x=0, y=0, width=1404 << 32, height=1872 << 32}, flags=DISP_BF_NORMAL, scan=DISP_SCAN_PROGRESSIVE, eotf=DISP_EOTF_GAMMA22, depth=0, fbd_en=0, metadata_fd=0, metadata_size=0, metadata_flag=0}, id=0, atw={used=0, mode=NORMAL_MODE, b_row=0, b_col=0, cof_fd=0}}, enable=1, channel=0, layer_id=1}, frame_id=[12814], rotate=270, cfa_use=0}) = 12814 <0.020236> 21:26:27.286899 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_WAIT_FRAME_SYNC_COMPLETE, 12814) = 0 <0.451838> 21:26:27.742053 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x14) = 0 <0.009747> 21:26:29.276559 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x5) = 0 <0.007904> 21:26:29.285973 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_UPDATE2, {area={x_top=0, y_top=0, x_bottom=1403, y_bottom=1871}, layer_num=1, update_mode=EINK_NO_MERGE|EINK_GCK16_MODE, lyr_cfg2={info={mode=LAYER_MODE_BUFFER, zorder=0, alpha_mode=1, alpha_value=255, screen_win={x=0, y=0, width=1404, height=1872}, b_trd_out=0, out_trd_mode=DISP_3D_OUT_MODE_TB, fb={fd=0, y8_fd=4, size=[{width=1404, height=1872}, {width=0, height=0}, {width=0, height=0}], align=[0, 0, 0], format=DISP_FORMAT_8BIT_GRAY, color_space=DISP_GBR_F, trd_right_fd=0, pre_multiply=1, crop={x=0, y=0, width=1404 << 32, height=1872 << 32}, flags=DISP_BF_NORMAL, scan=DISP_SCAN_PROGRESSIVE, eotf=DISP_EOTF_GAMMA22, depth=0, fbd_en=0, metadata_fd=0, metadata_size=0, metadata_flag=0}, id=0, atw={used=0, mode=NORMAL_MODE, b_row=0, b_col=0, cof_fd=0}}, enable=1, channel=0, layer_id=1}, frame_id=[12815], rotate=270, cfa_use=0}) = 12815 <0.020731> 21:26:29.307987 [b6d8f4ec] ioctl(5</dev/disp>, DISP_EINK_WAIT_FRAME_SYNC_COMPLETE, 12815) = 0 <0.005734> 21:26:29.315093 [b6d8f4ec] ioctl(6</dev/ntx_io>, _IOC(_IOC_NONE, 0, 0xf1, 0), 0x14) = 0 <0.007443> |
![]() |
![]() |
![]() |
#879 | |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Okay, now I remember why this stuck with me:
Quote:
That explains why I never went ahead with that idea ;o). FWIW, while nightmode is terrible there, that works decently well on a H2O. And on sunxi (which does sport the fancy nightmode waveforms), once you account for the ioctl sucking balls, it's not too horrible either. (Wrong thread, but here's the KOReader PoC for both sunxi & mxcfb). Note that I'm currently in complete darkness, so I have yet to see how it fares in daylight. And how it works on Kindles, where I know lab126 attempted something like this, which apparently never made it into prod (Kindles >= FW 5.6 do not suffer from the double flashing issue, though, which helps). |
|
![]() |
![]() |
![]() |
#880 |
doofus
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,549
Karma: 13089041
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
So does the newest paper white do this? If lab126 can't get it to work satisfactorily, that doesn't bode well...
I haven't seen wait ioctl returns too early, but that is on one model. I read almost exclusively in inverted mode and use 50% intensity, zero warmth in inverted mode. It works well on Libra 2, and maybe nothing older. A gigantic YMMV applies |
![]() |
![]() |
![]() |
#881 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Re: Kindles, the full story is that, starting with the Oasis 2, there were remnants left in the kernel of an ioctl that would setup frontlight behavior during flashing nightmode updates, to the effect of dimming the frontlight during flashes, with a configurable ramp down/up.
(Which would be this on mxcfb, and this on mtk). To my knowledge, an actual working/complete implementation of this never actually made it to a production kernel, though (I mean, the frontlight driver has code for it, but I don't see the symbol actually being used anywhere by the epdc). Even though the framework was, weirdly, ported to the new MTK driver, so, who knows, it might actually make it in one day. Last edited by NiLuJe; 08-21-2022 at 01:52 PM. |
![]() |
![]() |
![]() |
#882 |
Member
![]() Posts: 14
Karma: 10
Join Date: Aug 2022
Device: Libra 2
|
Love reading with Plato, great design choices and overall focus of direction. I just wanted to second the request for an option for a paginated fit to width.
Also I wonder if anyone's had success converting the massive OED to dictd as my half hearted attempt didn't get very far. Cheers to the dev and all fellow Plato enjoyers! |
![]() |
![]() |
![]() |
#883 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 446
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Quote:
If you have a StarDict dictionary, you can just put it (unzipped) in the dictionaries directory: it will be automatically converted to dictd during the startup process. |
|
![]() |
![]() |
![]() |
#884 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 446
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Plato 0.9.31
I've released Plato 0.9.31.
|
![]() |
![]() |
![]() |
#885 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2022
Device: Kobo libra 2
|
Change Default languages
How do I change the boring "Sleeping" text shen my device sleep
![]() Iam using Kobo Libra 2 newest version of Plato |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle -- KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) | hawhill | KOReader | 1237 | 07-07-2025 02:25 PM |
PocketBook-KOReader: a document reader for PDF, DJVU, EPUB, FB2, CBZ, ... (AGPLv3) | chrox | KOReader | 584 | 07-01-2025 07:34 AM |
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) | hawhill | Kindle Developer's Corner | 1289 | 04-07-2025 10:18 AM |
v3 vs. v3+ as a pdf/DjVu reader | hedonism_bot | HanLin eBook | 7 | 11-02-2010 08:16 PM |