mxc_epdc_fb_damage
mxc_epdc_fb_damage copied to clipboard
RM2: Could not insert module, invalid module format
Hi Peter,
This tool has been very helpful, thanks for writing it.
I'm now on an rM2 and I'm seeing this error with the pre-build release binaries:
reMarkable: ~/ insmod mxc_epdc_fb_damage.ko
insmod: ERROR: could not insert module mxc_epdc_fb_damage.ko: Invalid module format
reMarkable: ~/ uname -a
Linux reMarkable 4.14.78 #1 SMP PREEMPT Fri Sep 4 14:30:06 UTC 2020 armv7l GNU/Linux
Do you happen to know what the cause of the issue might be?
So excited to try this on the RM2. I too am not sure what the differences are with the RM1 as I've not used it :(
/proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 16.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 16.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : Freescale i.MX7 Dual (Device Tree)
Revision : 0000
Linux reMarkable 4.14.78 #1 SMP PREEMPT Fri Sep 4 14:30:06 UTC 2020 armv7l GNU/Linux
I'm glad the tool has been helpful. Unfortunately, I don't have an RM2 to test with. Thank you for the information pulled from the device. It looks like the RM2 uses new hardware, and in particular a newer kernel (although still a surprisingly old one). Linux kernel modules unfortunately have to be built against the version of the kernel in use---the kernel I'm building against is pulled from the official reMarkable repos here.
A quick look sadly does not reveal official kernel sources for the RM2 anywhere that I can see (this issue report further indicates that sources are missing). If you know where a kernel source tree for the new device is, I'd be happy to update the build scripts to build another version of the module against the new kernel for testing. However, it looks like we may need to wait some time for Remarkable A.S. to release the new kernel sources---they're usually extremely good about GPL compliance, so hopefully that'll happen soon. (I'd rather not try to build against upstream kernels, since the EPDC drivers aren't upstreamed as far as I can tell.)
That said, from the hardware report that @drasch provided (thank you!), it does look like the new device is using i.MX7Dual rather than i.MX6SoloLite. That means that it will be using the new EPDC v2 driver, which I believe on at least some devices supports a new MXCFB_SEND_UPDATE_V2
update ioctl due to new/improved hardware support for dithering, REGAL/-D, 5-bit waveforms, etc. (these may or may not be used on the device). So, a trace of xochitl (or its replacement on the new device) would be useful to ensure that I can make any necessary changes.
Let me know how to run a trace and I'm happy to do so!
Here's the text output when starting the UI:
54:22.889 we're running on an epaper device (int main(int, char**) /usr/src/debug/xochitl/2.3+gitAUTOINC+3ccb7cc15b-r0/git/src/main.cpp:139)
Reading waveforms from /usr/share/remarkable/320_R292_AFBC21_ED103TC2M1_TC.wbf
Running INIT (135 phases)
54:24.914 SWTCON initialized \o/
54:24.923 EPD platform plugin loaded!
54:24.925 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
54:24.932 evdevtouch: Using device discovery
54:24.938 evdevtouch: Adding device at "/dev/input/event2"
54:24.939 evdevtouch: Using device /dev/input/event2
54:24.940 evdevtouch: /dev/input/event2: Protocol type B (multi), filtered=no
54:24.941 evdevtouch: /dev/input/event2: min X: 0 max X: 1403
54:24.942 evdevtouch: /dev/input/event2: min Y: 0 max Y: 1871
54:24.943 evdevtouch: /dev/input/event2: min pressure: 0 max pressure: 0
54:24.943 evdevtouch: /dev/input/event2: device name: cyttsp5_mt
54:25.164 Empty filename passed to function
54:25.387 LoadingBlock > Loading (LoadingBlock(bool) /usr/src/debug/xochitl/2.3+gitAUTOINC+3ccb7cc15b-r0/git/src/shared/include/shared/loadingthread.h:80)
54:25.388 LoadingBlock Starting loading (LoadingBlock(bool) /usr/src/debug/xochitl/2.3+gitAUTOINC+3ccb7cc15b-r0/git/src/shared/include/shared/loadingthread.h:83)
Installing crash handler
installed crash handler
54:26.368 Could not attach Keys property to: QQuickWindowQmlImpl_QML_289(0x830768) is not an Item
54:26.562 Could not create scene graph context for backend 'epaper' - check that plugins are installed correctly in /usr/lib/plugins
54:26.912 Creating window
54:26.942 LoadingBlock < Loading (~LoadingBlock() /usr/src/debug/xochitl/2.3+gitAUTOINC+3ccb7cc15b-r0/git/src/shared/include/shared/loadingthread.h:92)
54:26.943 LoadingBlock Stopping loading (~LoadingBlock() /usr/src/debug/xochitl/2.3+gitAUTOINC+3ccb7cc15b-r0/git/src/shared/include/shared/loadingthread.h:96)
54:27.176 LoadingBlock Stopped loading (~LoadingBlock() /usr/src/debug/xochitl/2.3+gitAUTOINC+3ccb7cc15b-r0/git/src/shared/include/shared/loadingthread.h:98)
54:27.177 evdevtouch: Updating QInputDeviceManager device count: 1 touch devices, 0 pending handler(s)
54:27.182 wlan0: Link is up
54:27.198 > Loading
54:27.199 Starting loading
54:27.201 wlan0: Address added: XXX
54:27.203 wlan0: Address added: XXXXX
54:27.231 FIXME: mipmap filtering not supported
54:27.232 FIXME: wrapmode not supported
54:27.232 FIXME: wrapmode not supported
54:27.233 FIXME, setting node inner target rect for image node not supported: QRectF(0,0 372x60)
54:27.233 FIXME: mirroring not supported
54:27.347 No worker!
54:27.441 Got gateway: XXXXX
54:27.446 We probably have Internet
54:27.558 < Loading
54:27.558 Stopping loading
54:27.701 Stopped loading
54:27.719 void Library::load() 521 ms *** ON GUI THREAD ***
And here's an strace
of some writing on the screen:
https://gist.github.com/drasch/f7b640a1e6eb2187d621c594a9aa4108
Thanks! An strace is a good first step (it should at least give us the ioctl numbers)---unfortunately, it looks like that didn't quite catch the ioctl()s run by child threads. Could you run strace again with -f
?
The same gist above has been updated with additional traces including one with -f
(trace2.txt
)