Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for 64-bit Binary Release Compatible with reMarkable Paper Pro #3

Open
yyamagit opened this issue Feb 8, 2025 · 13 comments
Open

Comments

@yyamagit
Copy link

yyamagit commented Feb 8, 2025

Dear Awwaiid,
I hope this message finds you well.

I am writing to request the release of a 64-bit binary compatible with the reMarkable Paper Pro. The current 32-bit ARM binary is not executable on this device due to its 64-bit ARM architecture.

Recompiling the application for the 64-bit architecture would enable users of the reMarkable Paper Pro to utilize it effectively.

Thank you for considering this request. I look forward to your response.

Best regards,
Yamada

@awwaiid
Copy link
Owner

awwaiid commented Feb 8, 2025

Greetings @yyamagit ! I'd love to, but the parameters are probably a bit funny to get it right. If someone has a Paper Pro to lend me I could figure it out, or if you have some more specific build instructions for the rust cross-compile.

@mm-zacharydavison
Copy link

mm-zacharydavison commented Feb 8, 2025

I've got a Paper Pro, an RM2, and am probably technical enough to help you out here, if you can give me some pointers on what we'd need to do, I'd love to contribute.

@awwaiid
Copy link
Owner

awwaiid commented Feb 8, 2025

@mm-zacharydavison ok great! This might be super easy. Inside build.sh it runs a straightforward cross build with a specific target:

cross build \
  --release \
  --target=armv7-unknown-linux-gnueabihf \
  && scp target/armv7-unknown-linux-gnueabihf/release/ghostwriter root@$remarkable:

This could be as simple as slotting in the correct target. It'll be one of the targets in this list, but I don't know which one. I just searched a bit but didn't hit it; we might be able to ask on discord or reddit.

@awwaiid
Copy link
Owner

awwaiid commented Feb 8, 2025

I'm pretty sure that the screenshot will be the main thing. oh. Also I guess maybe the colors. Well one thing at a time.

@awwaiid
Copy link
Owner

awwaiid commented Feb 8, 2025

Oh, also once we figure out the target then we can add it to the github build action

@yyamagit
Copy link
Author

yyamagit commented Feb 9, 2025

Dear Awwaiid,

I have gathered some information that might assist in determining the appropriate target for cross-compiling to the reMarkable Paper Pro. Executing the uname -m command on the device returns aarch64, indicating a 64-bit ARM architecture.

While I haven't tested this configuration myself, it seems that using the aarch64-unknown-linux-gnu target could be suitable for building applications for the reMarkable Paper Pro.

I'm willing to test any builds or configurations you develop to ensure compatibility with the device.

Best regards,
Yamada

@zinccat
Copy link

zinccat commented Feb 9, 2025

I tried aarch64-unknown-linux-gnu, and received following error
RUST_BACKTRACE=1 ./ghostwriter --model gpt-4o-mini
thread 'main' panicked at src/keyboard.rs:98:14:
called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: ghostwriter::keyboard::Keyboard::new
4: ghostwriter::main

@robserva
Copy link

robserva commented Feb 9, 2025

I was able to get this built with aarch64-unknown-linux-gnu as well, but ran into the same issue. Essentially it looks like those are unrelated but significant differences in the Remarkable 2 vs the original. I'm testing out my own changes to address them now, but not sure how easy it'll be.

@robserva
Copy link

robserva commented Feb 9, 2025

@awwaiid FYI, here's my forked action (replaced release with upload artifact as well). Hacky, but got the build running at least!

https://github.com/robserva/ghostwriter/blob/main/.github/workflows/build.yml

Now all these other changes...

@yyamagit
Copy link
Author

yyamagit commented Feb 10, 2025

I tried aarch64-unknown-linux-gnu, and received following error
RUST_BACKTRACE=1 ./ghostwriter --model gpt-4o-mini
thread 'main' panicked at src/keyboard.rs:98:14:
called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: ghostwriter::keyboard::Keyboard::new
4: ghostwriter::main

It appears that in src/keyboard.rs at line 98, the application attempts to create a virtual keyboard device using uinput. However, on my reMarkable Paper Pro, /dev/uinput does not exist:

# ls /dev/uinput
ls: /dev/uinput: No such file or directory

Additionally, attempting to load the uinput module results in the following error:

# modprobe uinput
modprobe: FATAL: Module uinput not found in directory /lib/modules/6.1.55+git+38f31d579d-imx8mm-ferrari

Given this, would it be possible to modify the implementation to avoid relying on a virtual keyboard? Alternatively, is there a recommended approach to enable uinput support on the reMarkable Paper Pro?

I came across a project called rM-input-devices that provides an API for handling input devices on reMarkable tablets. However, it appears that this project does not currently support the reMarkable Paper Pro.

Thank you for your attention to this matter.

@boangs
Copy link

boangs commented Feb 13, 2025

@awwaiid FYI, here's my forked action (replaced release with upload artifact as well). Hacky, but got the build running at least!

https://github.com/robserva/ghostwriter/blob/main/.github/workflows/build.yml

Now all these other changes...

I tested with your approach, but it didn’t work. I encountered the same error:

called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }.

Is there anything else I should try?

@awwaiid
Copy link
Owner

awwaiid commented Feb 17, 2025

Well I made the mistake of going to Best Buy and noticing that they have the rmPP on display and playing with it .... and now I want one. So. I just hit the buy button from the reMarkable site and having the device will go a long way toward this ticket :)

@robserva
Copy link

That's good to hear, because I'm swamped right now and haven't had the time to make much progress myself. You seem smarter than me too. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants