Repository navigation
Add workspace: rm-common, rm-screen, rm-client-screen (PipeWire screen mirror) - #7
alvesvaren wants to merge 3 commits into
Conversation
Split shared SSH/config/device/grab code into rm-common. rm-pad remains the input forwarder; rm-screen captures via XDG portal + PipeWire, tracks dirty regions, packs 4-bit grayscale with LZ4, and streams over TCP with TCP_NODELAY. rm-client-screen uses libremarkable to restore RGB565 regions and refresh the e-paper display, with a 3s idle GC16 full refresh. Reverse SSH (-R) starts the tablet client after PipeWire is ready so the TCP accept does not block the tunnel. rm-common ssh2 is optional so the tablet binary cross-compiles without OpenSSL for the target. CI installs libssl-dev, pkg-config, and libpipewire-0.3-dev; PKGBUILD and release workflow build rm-screen alongside rm-pad. Co-authored-by: Alve Svarén <alve@hotmail.se>
|
Error: "portal session failed: Session creation failed: Source selection: Portal request failed: org.freedesktop.portal.Error.InvalidArgument: Remote desktop sessions cannot persist" when running |
|
Here is what was going wrong and what we changed. Cause
For Remote Desktop sessions, several implementations (your error matches this) do not allow any persist mode other than “do not persist”. They answer with:
So Fix
PortalConfig::builder()
.persist_mode(PersistMode::DoNot)
.build()and passes that to A direct Trade-offYou may get the permission dialog every run instead of “remember forever”, which is what portals allow for this session type. The change is committed and pushed on
|
lamco-portal defaults to ExplicitlyRevoked persistence, which many portals reject for remote-desktop sessions (InvalidArgument: cannot persist). Build PortalConfig with DoNot so source selection succeeds. Co-authored-by: Alve Svarén <alve@hotmail.se>
|
➜ rm-mouse git:(cursor/screen-mirror-workspace-28fd) cargo run --bin rm-screen -- --client-binary target/debug/rm-client-screen I wonder if the IP is correct. The laptop that is connected to the remarkable has the ip 10.11.99.10 |
About the IPsFor USB tethering, 10.11.99.1 is normally the tablet and 10.11.99.10 is your laptop. You should keep Why it timed outThe usual mistake is passing What we changed (pushed on the PR branch)
What you should runCross-compile for reMarkable 2, then point cargo build -p rm-client-screen --release --target armv7-unknown-linux-gnueabihf
cargo run --bin rm-screen -- --client-binary target/armv7-unknown-linux-gnueabihf/release/rm-client-screen(Paper Pro: Commit 565aad8 is on |
…er accept wait - Reject host-built rm-client-screen via ELF e_machine vs tablet arch from SSH - Log 10.11.99.x USB hint (tablet is usually .1, PC often .10) - Poll accept loop with configurable --accept-timeout-secs (default 120s) - Inherit SSH stderr so OpenSSH errors (e.g. Exec format error) are visible - Clearer timeout message referencing correct host and cross-compile targets Co-authored-by: Alve Svarén <alve@hotmail.se>


Summary
This change turns the repo into a Cargo workspace and adds low-latency PC→reMarkable screen mirroring alongside the existing
rm-padinput tool.Crates
sshfeature),UpdateHeaderwire format, and helpers to upload/run the tablet client plus spawn a reverse SSH tunnel.rm-commonwith SSH enabled;build.rsstill cross-compilesevgrabfromrm-common/helper/.lamco-portal,lamco-pipewirewithdamage). Uses PipeWire damage metadata when present, otherwise tile-based frame differencing. Converts regions to 4-bit packed grayscale, LZ4-compresses with size prefix, sends 13-byte little-endian headers + payload over TCP withTCP_NODELAY. Starts the reverse SSH tunnel after PipeWire is ready so the tablet can connect without blocking tunnel setup.libremarkablerestore_region+partial_refreshwith DU (wire value 1). After 3s without receiving data, triggers a full-screenGC16refresh to reduce ghosting.Cross-compilation
rm-commondefaults tosshfor host tools;rm-client-screenusesdefault-features = falseso it does not pullopenssl-sysfor ARM targets..cargo/config.tomlsets GCC as the linker forarmv7-unknown-linux-gnueabihfandaarch64-unknown-linux-gnu.CI / packaging
GitHub Actions and PKGBUILD install
libssl-dev,pkg-config, andlibpipewire-0.3-dev; release tarball includesrm-screenin addition torm-pad.Usage notes
cargo build -p rm-client-screen --release --target armv7-unknown-linux-gnueabihf(oraarch64-unknown-linux-gnufor Paper Pro).rm-screen --client-binary /path/to/rm-client-screen(plus usualRMPAD_HOST/ key options). Reverse tunnel requires SSH key auth (password-only is rejected with a clear error).