Add experimental reMarkable 1/rM2 windowed build (rm1 feature)#1
Add experimental reMarkable 1/rM2 windowed build (rm1 feature)#1sliekens wants to merge 3 commits into
Conversation
Optional armv7 qtfb/AppLoad target alongside unchanged default Paper Pro builds. Gated by --features rm1: 1404x1872 display, Wacom pen + axis map, qtfb-shim launch script. qtfb/evdev wire layouts follow target pointer width (32 vs 64 bit). Windowed mode also falls back to qtfb pen events when evdev grab fails or AppLoad input shim is active — safe for existing aarch64 builds.
Disable takeover-only footstep stamps when running inside AppLoad; they read as random spatters on e-ink windowed builds. Tighten pen filtering: require BTN_TOUCH with pressure > 40, and ignore hover pressure noise.
There was a problem hiding this comment.
Pull request overview
Adds an experimental reMarkable 1 / rM2 windowed (qtfb) build path gated behind a new rm1 Cargo feature, while keeping the default Paper Pro build behavior unchanged.
Changes:
- Introduces
rm1feature flags for resolution, framebuffer format, and digitizer handling (Wacom vs Paper Pro marker). - Updates qtfb and evdev parsing to handle 32-bit vs 64-bit ABI layout differences via
target_pointer_width. - Adds armv7 build/install artifacts (build script, AppLoad launcher, external manifest) and documents the new workflow.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| riddle/src/qtfb.rs | Adds ABI-dependent parsing helpers for init reply and userinput messages (32-bit vs 64-bit layout). |
| riddle/src/pen.rs | Adds rm1 Wacom ranges, 32/64-bit input_event parsing, and rm1 axis-to-screen rotation mapping. |
| riddle/src/main.rs | Changes raw-pen selection logic and gates the “footstep stamp” experiment behind takeover mode. |
| riddle/src/fb.rs | Makes screen dimensions feature-dependent (Paper Pro vs rm1/rm2). |
| riddle/src/display.rs | Selects qtfb fmt/geometry per feature and tweaks refresh mode for rm1. |
| riddle/scripts/appload-launch-rm1.sh | New AppLoad launcher that preloads the 32-bit qtfb shim for rm1/rm2 windowed mode. |
| riddle/external.manifest.rm1.json | New AppLoad manifest for the rm1/rm2 windowed bundle. |
| riddle/Cargo.toml | Adds rm1 feature and updates crate description to mention optional windowed build. |
| riddle/build-rm1.sh | New cross-build script producing a dist-rm1/ bundle for tablet install. |
| riddle/.cargo/config.toml | Adds armv7 linker configuration. |
| README.md | Documents the experimental rm1/rm2 windowed build steps and constraints. |
| .gitignore | Ignores the riddle/dist-rm1/ build output directory. |
Comments suppressed due to low confidence (1)
riddle/src/qtfb.rs:107
recvmay return fewer than 32 bytes; the code only checksn <= 0and then parses fixed offsets. If the init reply is short (or malformed), this can mis-parseshm_key/shm_sizeand attempt toopen/mmapthe wrong segment. Add a minimum-length check keyed off the ABI before callingparse_init_reply.
let mut reply = [0u8; 32];
let n = unsafe { libc::recv(fd, reply.as_mut_ptr() as *mut libc::c_void, 32, 0) };
if n <= 0 {
unsafe { libc::close(fd) };
return Err(io::Error::new(
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41400c229e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- build-rm1.sh and appload-launch-rm1.sh: executable bit (100755) - qtfb connect: reject truncated init replies before parsing - main.rs: document why qtfb-shim path keeps pen_dev without EVIOCGRAB
Summary
Optional reMarkable 1 / rM2 support alongside unchanged default Paper Pro builds. Compiles with
--features rm1for armv7 windowed AppLoad/qtfb; default aarch64 targets are untouched.What changes
rm1cargo feature — 1404×1872 display, Wacom digitizer,FBFMT_RM2FB, noquilltakeovertarget_pointer_width(32 vs 64 bit), not productqtfb-shim-32bitvia launch script, qtfb pen fallback when evdev grab failsbuild-rm1.sh,external.manifest.rm1.json,appload-launch-rm1.sh, README sectionTested on
reMarkable 1.0, OS 3.22.0.64, xovi arm32 + AppLoad v0.4.2, OpenAI HTTP oracle.
Not included
quilltakeover, 5-finger quit, power-button sleep — Paper Pro / takeover only.