-
Notifications
You must be signed in to change notification settings - Fork 58
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
Does not work on reMarkable 2 #28
Comments
We don't yet know how to work with the rM2's framebuffer, so all older software that interacts with the screen will not work. You can find more information on the current research here Eeems-Org/oxide#48 and here koreader/koreader#6792 |
This script makes use of the standardized I don't have an rM2, so I won't be able to do troubleshooting myself unfortunately. Good luck with the research. |
It's not a standard framebuffer, @ddvk has been having quite the time trying to figure out how it even works. |
I've got my hands on a framebuffer capture and I was not able to figure out which pixel format is used. I do have the following conclusions of my analysis:
|
@ddvk is this in line with your findings? |
I've got a second dump, where there are more values for the last byte. But they are in the same range (0x41 - 0x61). |
@Eeems it is complicated, but the waveforms are there somewhere |
@rien: from a trace that i saw, the FB reports as rgba32 when queried with fbioget_vscreeninfo ioctl during xochitl startup
rgba32 is easier to deal with than rgb565, as you've noticed it's just groups of 4 bytes :-D i am surprised you have data in your framebuffer based on what other people have reported. if rgba32 works, i'll be pretty happy. btw, what's the md5sum or sha256 of the buffer? |
regarding the bytes filled with zero: on the original rM, the framebuffer is twice as large as it needs to be (the height is 2x what is actually shown on screen), so seeing all zeroes after a certain point is not surprising to me. i think the reason for 2x is usually for double buffering purposes (write to second screen, then swap it in all at once) |
I've got access to a reMarkable 2 as well if anyone needs some commands run.
You mean?
|
yoi are running version 2.2.1.82?
…On Fri, 23 Oct 2020 at 11:30 Thomas Stenersen ***@***.***> wrote:
I've got access to a reMarkable 2 as well if anyone needs some commands
run.
btw, what's the md5sum or sha256 of the buffer?
You mean?
reMarkable: ~/ md5sum /dev/fb0
480a37f069653d6a99aa603492eb7d66 /dev/fb0
reMarkable: ~/ sha256sum /dev/fb0
3b5db951652767e4e1abaa964107d5e37cd1ea972297c0b273c1b1dcb8bb1d27 /dev/fb0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIYZFLQBYZDX4E6S3CFOOSLSMFEJXANCNFSM4ST2JWJA>
.
|
2.3.1.27 |
What does xochitl's log say, e.g: the line: |
This part?
|
ah, sorry,my mistake, didn't see that it is sha2 and not 1, mine is the same, the framebuffer does not change. sha256sum /dev/fb0 |
The framebuffers I was sent were also the same, so I fear there is no useful information in there. Has somebody tried |
yes, fbpan and sometimes fbblank
…On Fri, 23 Oct 2020 at 12:50 Rien ***@***.***> wrote:
The framebuffers I was sent were also the same, so I fear there is no
useful information in there.
Has somebody tried strace xochitl to look which syscalls happen?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIYZFLWYAES6PMKVUIYEZ6DSMFNXFANCNFSM4ST2JWJA>
.
|
Attached a strace: Suppose the interesting bits are here:
|
Here's an
I do not see any calls to |
@tadfisher i have been examining the xochitl binary with bokluk and what you've said lines up with what we've seen. a few things:
it will be really nice when we can find the memory area that corresponds to what is being displayed on screen (for capturing purposes). it might be in xochitl's process memory (instead of system wide) though. |
I don't have the technical skills to help, but I have access to both a rM1 and rM2, so if there are tests I can try and report here, let me know. I'd very much like to be able to use the script on the new device! |
@raisjnn The pointer to global framebuffer data is located at address If you would like a ghidra export, I can provide one. |
awesome, nice work! it looks like the first half of that is something else? the image itself reminds me of when there is a bpp mismatch or resolution mismatch (it ends up printing the image a few times) btw, are you able to find the same address in remarkable-shutdown binary? |
try converting it like this
|
@tadfisher i'm curious how you managed to get the dump at address |
@harrylepotter This location is in xochitl's address space, so I'm not surprised. To grab the pointer, use |
@tadfisher great you were able to dump the image! If someone could write a script which is able to fetch the memory address and then dump that memory, I can fix it in the
To check whether de data is correct, you can use @ddvk's convert command. I haven't tested it so I am not sure the pixel format is correct. If I had a rM2 I would do it myself, but that's unfortunately not the case. |
i don't think this is portable across compiles of xochitl, so you'd want to make sure the memory address is correct before dumping |
We could make a mapping between the |
I have updated the binary (I've probably used an old build). Can someone test with the latest binary? I should be dumping the right amount of bytes with the correct offset. But it's hard to test without a rM2 unfortunately. |
In the current version reMarkable 2 have stream is in beta (requires cloud), but I guess there could be a way to intercept it somewhere, just don't have the time right now to see that rabbit hole. Maybe setting routes to the machine via usb and having a custom server that read the stream? Not sure, just thinking. |
I know the rM1 could handle color because the framebuffer was a the 'normal' one built into Linux. The rM2 uses special hardware and drives the display from user-space, so I don't think there is any color information present. From what I remember from the cloud stream, it sends file updates (e.g. the lines you draw) instead of an actual "video stream" of the screen. If the file contains images in color, it will be rendered by your browser. |
@rien I just tried with the updated binary. By default it is in portrait mode, and when I add the |
Thanks for trying out @BeneCollyridam, does that mean the video isn't broken anymore? How is the latency/fps?
OK, I 've updated the script now. Can you try again? |
For me it is now in landscape when running with |
Ok, I've looked at @Foxei's PR and I've updated it again. I've forced pushed so you'll have to |
It works perfectly now. I haven't measured, but it feels great (with regards to fps and latency). |
I've just pulled the latest commit on this branch (cf6b105 in case you force push again). Can confirm that it works on the rm2 too. I've only stumbled onto this project recently, and wow, great work! |
@rien I have to be honest, I am If you have any problem in the future just drop me a line. I am down about any research about the rM2. |
I don't know what I did or what happened, It might be that the firmware was updated to 2.5.0.27 (it is at that version now anyways), but reStream was working as intended on my reMarkable2 just a few days ago and today it stopped working. reMarkable: ~/ ./restream
Error: No line containing /dev/fb0 in /proc/218/maps file
reMarkable: ~/ ps | grep xochitl
218 root 265m S /usr/bin/xochitl --system
925 root 2496 S grep xochitl
reMarkable: ~/ grep "/dev/fb0" /proc/218/maps
reMarkable: ~/ Any Ideas what I could try? Is there a reason we are not reading from /dev/fb0 directly? |
I just checked my own, it is at 2.5.0.27 and reStream works fine - both in landscape and portrait modes - as far as I can tell. |
I also did install rm2fb ... https://github.com/ddvk/remarkable2-framebuffer maybe that has something to do with it? |
Hello @1ykos, |
If you redirected your frame buffer to /dev/fb0 you should use the old rM1 way of streaming. Hard code the rM verison to 1.0 and the image sizes to 1872px times 1404px with the corresponding number of bytes per pixel you are outputting. This should do the trick. |
@Foxei Ah that is what the checksum was about. Indeed |
Yes, this is not compatible with rm2fb yet. See #41 |
Could you try with this maybe ? |
Did you do something like install rm2fb? |
Yes I installed rm2fb and in my case there where no "/dev/fb0" line in the fb maps, only a "/dev/shm/swtfb.01". I'm on 2.6 on a rm2 |
Right, so #41 should have resolved this. |
Worked well with reMarkable 1. Tried with reMarkable and despite no error and a window appearing it remains black. I tried with the version I received the device with 2.2.1.88 then latest update 2.3.1.27 but to no avail.
Happy to provide logs or any other information that could help.
Here is the output I have without ffmpeg banner.
The text was updated successfully, but these errors were encountered: