2x faster display hack
this should work on inkpad 3 pro and similar devices, jailbreak needed, would be nice if somebody can verify:
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)
- KOReader installed and booting directly
Activation (Runtime)
SSH into the device and run:
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:
#!/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
# 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=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
# Shows wf=2 but uses REAGL internally — remap is transparent
Recovery
Reboot. The remap is RAM-only. Or hot-load the original WBF:
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× |