View Single Post
Old 05-20-2026, 03:32 AM   #2
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
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:
#!/bin/sh
# Activate REAGL mode remap
/mnt/secure/su /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)
'
2) Second attempt via ssh in koreader.

Booth tries failed with some couldn't find error:

Quote:
/mnt/ext1$ /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)
'
/mnt/ext1/applications/koreader/luajit: (command line):4: module 'ffi/mxcfb_pocketbook_h' not found:
no field package.preload['ffi/mxcfb_pocketbook_h']
no file './ffi/mxcfb_pocketbook_h.lua'
no file '/usr/local/share/luajit-2.1/ffi/mxcfb_pocketbook_h.lua'
no file '/usr/local/share/lua/5.1/ffi/mxcfb_pocketbook_h.lua'
no file '/usr/local/share/lua/5.1/ffi/mxcfb_pocketbook_h/init.lua'
no file './ffi/mxcfb_pocketbook_h.so'
no file '/usr/local/lib/lua/5.1/ffi/mxcfb_pocketbook_h.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
(command line):4: in main chunk
[C]: at 0x00013ee1

Last edited by nhedgehog; 05-20-2026 at 04:15 AM.
nhedgehog is offline   Reply With Quote