|
|
#1 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 3656
Join Date: Feb 2009
Device: cybook
|
faster display inkpad 3 pro and others
# REAGL Mode for PocketBook — Activation Guide
REAGL is a ghost-compensated non-flashing EPD waveform mode built into the factory waveform file. It delivers 16-gray quality at 2.1× the speed of GC16 (270 vs 576 frames at room temperature), handling ghosting on every partial update so you no longer need periodic full-screen flashes. ## What It Does ``` GC16 (stock): erase → black → white → target → 576 frames, visible flash REAGL (mod): ghost-compensate → target → 270 frames, no flash ``` InkView (PocketBook's display server) only uses GC16 (mode 2). By telling the kernel "when InkView asks for mode 2, use mode 8's waveform data instead", all updates become REAGL. No files modified. No InkView patching. Survives until reboot. ## Prerequisites - PocketBook device with Allwinner B288 SoC (InkPad 3, InkPad 3 Pro, InkPad 4, Touch HD 3, Color, Verse, Era) - Root SSH access via pbjb jailbreak ([guide](https://www.mobileread.com/forums/sh...d.php?t=325185)) - KOReader installed and booting directly ## Activation (Runtime) SSH into the device and run: ```sh luajit -e ' ffi = require("ffi") ffi.cdef[[int open(const char*,int); int close(int); int ioctl(int, unsigned long, ...);]] require("ffi/mxcfb_pocketbook_h") ffi.cdef[[struct mxcfb_waveform_modes { int mode_count; int modes[16]; };]] wm = ffi.new("struct mxcfb_waveform_modes") wm.mode_count = 11 for i = 0, 10 do wm.modes[i] = 8 end wm.modes[14] = 8 fd = ffi.C.open("/dev/fb0", 2) ffi.C.ioctl(fd, 0x4024462B, wm) ffi.C.close(fd) print("REAGL active") ' ``` Takes effect immediately. KOReader and native PocketBook UI both benefit. ### In KOReader — Disable Full Refresh Gear menu → Screen → E-ink settings → Full refresh rate → Never (or 99). With REAGL ghost-compensating each partial, periodic flashes are unnecessary. ## Making Permanent (Survives Reboot) Add the luajit one-liner to `/mnt/secure/etc/init.d/03-koreader.sh` before the bind-mounts. Replace `/path/to/koreader` with your KOReader build path: ```sh #!/bin/sh # Activate REAGL mode remap /path/to/koreader/luajit -e ' ffi = require("ffi") ffi.cdef[[int open(const char*,int); int close(int); int ioctl(int, unsigned long, ...);]] require("ffi/mxcfb_pocketbook_h") ffi.cdef[[struct mxcfb_waveform_modes { int mode_count; int modes[16]; };]] wm = ffi.new("struct mxcfb_waveform_modes") wm.mode_count = 11 for i = 0, 10 do wm.modes[i] = 8 end wm.modes[14] = 8 fd = ffi.C.open("/dev/fb0", 2) ffi.C.ioctl(fd, 0x4024462B, wm) ffi.C.close(fd) ' # Bind-mount KOReader over bookshelf umount /ebrmain/cramfs/bin/bookshelf.app 2>/dev/null mount --bind /mnt/secure/bin/bookshelf_koreader /ebrmain/cramfs/bin/bookshelf.app ``` ## Verification ```sh # Check waveform modes loaded (mode 8 should appear) cat /sys/devices/platform/sw-epdc.0/waveform_info | grep Waveforms # Send a test mode 2 update and check dmesg luajit -e ' ffi = require("ffi") ffi.cdef[[int open(const char*,int);int close(int);int ioctl(int,unsigned long,...);]] require("ffi/mxcfb_pocketbook_h") u = ffi.new("struct mxcfb_update_data") u.update_region.top=500;u.update_region.left=500 u.update_region.width=200;u.update_region.height=2 00 u.waveform_mode=2;u.update_mode=0;u.temp=0x1000 fd = ffi.C.open("/dev/fb0",2) ffi.C.ioctl(fd, ffi.C.MXCFB_SEND_UPDATE, u) ffi.C.close(fd) ' dmesg | grep "wf=2" | tail -1 # Shows wf=2 but uses REAGL internally — remap is transparent ``` ## Recovery Reboot. The remap is RAM-only. Or hot-load the original WBF: ```sh cat /boot/default.wbf > /sys/devices/platform/sw-epdc.0/waveform_binary ``` ## Speed Comparison (24°C) | Mode | Frames | Relative | |------|--------|----------| | GC16 (mode 2) | 576 | 1.0× | | GS16 (mode 14) | 435 | 1.3× | | GL16 (mode 5) | 435 | 1.3× | | **REAGL (mode 8)** | **270** | **2.1×** | | DU (mode 1, B/W) | 247 | 2.3× | |
|
|
|
|
|
#2 | ||
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 694086
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
|
I was curious and tried it:
1) First attempt with a script on the PB 740 running luajit as root. Quote:
Booth tries failed with some couldn't find error: Quote:
Last edited by nhedgehog; 05-20-2026 at 04:15 AM. |
||
|
|
|
| Advert | |
|
|
|
|
#3 |
|
0000000000101010
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,938
Karma: 12984859
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
I used this as reagl.sh:
Code:
#!/mnt/secure/su /bin/sh cd /mnt/ext1/applications/koreader luajit -e ' ffi = require("ffi") ffi.cdef[[int open(const char*,int); int close(int); int ioctl(int, unsigned long, ...);]] require("ffi/mxcfb_pocketbook_h") ffi.cdef[[struct mxcfb_waveform_modes { int mode_count; int modes[16]; };]] wm = ffi.new("struct mxcfb_waveform_modes") wm.mode_count = 11 for i = 0, 10 do wm.modes[i] = 8 end wm.modes[14] = 8 fd = ffi.C.open("/dev/fb0", 2) ffi.C.ioctl(fd, 0x4024462B, wm) ffi.C.close(fd) ' Code:
#!/mnt/secure/su /bin/sh cd /mnt/ext1/applications/koreader cat /sys/devices/platform/sw-epdc.0/waveform_info | grep Waveforms luajit -e ' ffi = require("ffi") ffi.cdef[[int open(const char*,int);int close(int);int ioctl(int,unsigned long,...);]] require("ffi/mxcfb_pocketbook_h") u = ffi.new("struct mxcfb_update_data") u.update_region.top=500;u.update_region.left=500 u.update_region.width=200;u.update_region.height=200 u.waveform_mode=2;u.update_mode=0;u.temp=0x1000 fd = ffi.C.open("/dev/fb0",2) ffi.C.ioctl(fd, ffi.C.MXCFB_SEND_UPDATE, u) ffi.C.close(fd) ' dmesg | grep "wf=2" | tail -1 Code:
/ $ /mnt/ext1/test_reagl.sh Waveforms: 0 1 2 3 4 5 6 7 8 13 14 [ 125.060671] [epdc] %%UPDATE: pid=1877 wf=2 mode=1 area=(0,0,1448,1072) FB[2:1448x1072] 10000000 / $ /mnt/ext1/reagl.sh / $ /mnt/ext1/test_reagl.sh Waveforms: 0 1 2 3 4 5 6 7 8 13 14 [ 163.820820] [epdc] %%UPDATE: pid=1877 wf=2 mode=1 area=(0,0,1448,1072) FB[2:1448x1072] 10000000 / $ And from my other post... For the bind-mount, what is: /mnt/secure/bin/bookshelf_koreader This write-up does not specify what this file is, how it is created. I'm guessing the prerequisite: - KOReader installed and booting directly is the reason it isn't working??? But again, there is no explanation to what this implies. On PocketBooks KOReader can be set as the default app to open ebook file-extensions and the device can be set to open the "last book read" automatically, therefore KOReader would boot directly... but I doubt this is what you are alluding to. Last edited by neil_swann80; 05-21-2026 at 04:04 AM. |
|
|
|
|
|
#4 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 204
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
|
|
|
|
|
|
#5 |
|
0000000000101010
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,938
Karma: 12984859
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
@EastEriq - It may have worked I suppose, but then running the test is pointless as-is as its output is the same before and after making the change
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 204
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
Giving a go on pb631, having copied neil_swann80's reagl.sh as /mnt/ext1/applications/REAGL.app, but a)
Code:
/mnt/ext1/applications # ./REAGL.app ./REAGL.app: line 15: luajit: not found Code:
/mnt/ext1/applications # ls -l koreader/luajit -rwxrwxrwx 1 root root 350168 Mar 17 02:00 koreader/luajit ETA: solved with Code:
cd /mnt/ext1/applications/koreader /mnt/ext1/applications/koreader/luajit -e ' Last edited by EastEriq; 05-21-2026 at 10:21 AM. Reason: solved a) |
|
|
|
|
|
#7 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 3656
Join Date: Feb 2009
Device: cybook
|
this method is likely display specific only will work on carta screen devices. koreader isn't necessary thats a mistake in my documentation.
It's changing parameters in the display driver. With some considerable coding you could implement even faster display changes. speak 3 times faster. |
|
|
|
|
|
#8 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 204
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
I though the old pb631 has a Carta display. Maybe sw-epdc.0/ is a FW6 thing?
|
|
|
|
|
|
#9 | |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 3656
Join Date: Feb 2009
Device: cybook
|
Quote:
REGARDLESS you simply write faster modes for any firmware that exposes enough of the hardware and you can even rewrite the driver to make the display faster. so in theory i could make almost every old display 3 times faster. its just work. anybody would be willing to donate for the effort? |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| inkpad 3 pro | x3oo | PocketBook | 4 | 07-07-2023 04:02 PM |
| PocketBook Inkpad 3 Pro display issue | acmobi | PocketBook | 1 | 08-07-2021 04:00 PM |
| Inkpad 3 vs. Inkpad 3 pro - HW differences | brudigia | PocketBook | 4 | 08-06-2020 01:13 PM |
| Inkpad 3 and Inkpad 3 Pro | Pale | Which one should I buy? | 2 | 02-04-2020 12:16 PM |
| Looking for Inkpad 3 display | ChriChri | PocketBook | 0 | 11-13-2019 04:44 PM |