matteodelabre/vnsee

reMarkable resolution is 1404×1872 but this client forces servers to send a 1408×1872 image

oresk opened this issue · 2 comments

oresk commented

A quick question
Everywhere in the project 1408x1872 resolution is used.

When using fbset gives me this back

root@reMarkable:~# fbset

mode "1404x1872-47"
	# D: 160.000 MHz, H: 88.594 kHz, V: 46.900 Hz
	geometry 1404 1872 1408 3840 16
	timings 6250 32 326 4 12 44 1
	accel false
	rgba 5/11,6/5,5/0,0/0
endmode

Here: https://remarkable.com/ the same resolution is stated.

Is that just a typo or is there a reason for that?

Thanks for bringing that up @oresk! As you can see in the output of fbset, although the screen can only display 1404 columns of pixels, the internal video buffer actually contains 1408 columns (the first pair in the geometry field is the visible resolution, the second pair is the “virtual” resolution, i.e. the size of the buffer). To make things simpler, I chose to pass that internal buffer directly to the VNC client library, instead of allocating an intermediate one and performing additional copying. This means that the VNC library effectively sees a 1408 × 1872 screen, which in turn forces the server to send a 1408 × 1872 image. In short, because we’re not using any intermediate buffer, we have no option to support other sizes than the one of the internal buffer.

A major side-effect is that we lose the content from the 4 rightmost columns of pixels. So I’m going to keep this issue open as a reminder that this is something that should be fixed.

This is fixed in release 0.4.0. The client will now accept any server resolution, and will crop the image to fit in the screen if needed. I updated the docs to state that the recommended resolution is 1404x1872.