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

VNC binary needs update for system software version 2.6 #57

Closed
pks40 opened this issue Mar 17, 2021 · 27 comments
Closed

VNC binary needs update for system software version 2.6 #57

pks40 opened this issue Mar 17, 2021 · 27 comments
Labels
bug Something isn't working
Milestone

Comments

@pks40
Copy link

pks40 commented Mar 17, 2021

Apparently, the VNC server binaries need to be recompiled to work with the new reMarkable software version 2.6, since some shared libraries were updated to new versions in this update. (At least libcrypto.so was updated; I’m not sure about others.)
I have already opened a corresponding issue at the rM-vnc-server repo.

@Doarry
Copy link

Doarry commented Mar 19, 2021

Hi,

I was having trouble running rmview and just saw your issue. I think my error is related to this too so I will just add the error that I get :
Connection failed : [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionRefusedError'>: Connection was refused by other side: 10061: No connection could be made because the target machine actively refused it]

With an infinite loop of Starting VNC server

@Foxei
Copy link

Foxei commented Mar 19, 2021

@bordaigorl Wouldn't it be nice if there were a working ssh version of rmView that does not require the vnc binaries? ;)

I have not much time in the moment but I had a working ssh version a couple of months ago. https://github.com/Foxei/rmview

@bordaigorl
Copy link
Owner

@Doarry @Foxei @pks40 I still haven't received the update; could you maybe run a test for me?
Does the version at commit acfcfcc work?

@bordaigorl Wouldn't it be nice if there were a working ssh version of rmView that does not require the vnc binaries? ;)

The ssh branch should work for RM1...but perhaps you mean one that works for RM2?
That would be nice as a fallback. I'd consider a PR on the ssh branch, but I would want to keep supporting both RM1 and RM2.

@pks40
Copy link
Author

pks40 commented Mar 22, 2021

@Doarry @Foxei @pks40 I still haven't received the update; could you maybe run a test for me?
Does the version at commit acfcfcc work?

@bordaigorl I’ve got an RM2, so for me it probably won’t work.

The ssh branch should work for RM1...but perhaps you mean one that works for RM2?
That would be nice as a fallback. I'd consider a PR on the ssh branch, but I would want to keep supporting both RM1 and RM2.

Since I needed a working version last week, I hacked together a modified version of the ssh branch using the RM2 modifications from reStream. (But I didn’t update anything else in there, so it doesn’t have any of the nice new developments of the vnc branch, like supporting both RM1 and RM2; also the orientation auto-detect doesn’t work. I really just needed something that streamed my screen and had a pointer.) If you wanna see this, just tell me and I’ll upload it!

@Foxei
Copy link

Foxei commented Mar 22, 2021

@bordaigorl you need to overwrite you machine id to one that will revive the update and you will receive the update next time you press the check for update button.

mv /etc/machine-id /etc/machine-id_orig && echo 682bae7101e04f86bf7930cc79112a30 > /etc/machine-id

@bordaigorl bordaigorl added bug Something isn't working help wanted Extra attention is needed labels Mar 24, 2021
@bordaigorl bordaigorl pinned this issue Mar 24, 2021
@bordaigorl
Copy link
Owner

bordaigorl commented Mar 26, 2021

I am happy to announce a workaround:
for both RM1 and RM2 it suffices to copy the old version of the libcrypto library to the tablet.
⚠️ CORRECTION: RM1 should work without any modification!

To do so you can:

  • download the attached libcrypto.so.1.0.2.zip and unzip it

  • copy it over with (assuming connection via USB)

    scp /path/of/uncompressed/libcrypto.so.1.0.2 root@10.11.99.1:/usr/lib/
    

The file has been lifted from a pre2.6 RM1.
If you don't trust the binary (and it is good practice not to) you can obtain a copy from the official remarkable toolchain.

Checksum for the attachment:

> shasum -a 256 libcrypto.so.1.0.2
2ff293d44e272d7279c0c3330a17dbc89af19e8195d3efb180e50add0ba8f8b1

I will try to push a new version of rmview that automates this in the weekend.

@d-falck
Copy link

d-falck commented Mar 26, 2021

This is fantastic, thanks for working this out!

@lylethorngage
Copy link

lylethorngage commented Mar 26, 2021 via email

@bordaigorl bordaigorl removed the help wanted Extra attention is needed label Mar 26, 2021
@pks40
Copy link
Author

pks40 commented Mar 26, 2021

Thanks a lot, that’s an easy ‘fix’!

@Doarry
Copy link

Doarry commented Mar 26, 2021

Thank you very much for this nice and easy fix! Works perfectly for me :)

@axelson
Copy link

axelson commented Mar 26, 2021

Interesting, on my pre 2.6 reMarkable 2 (specifically 2.5.0.27-patch_17.2.04-0-g41b4f55) I get a different sha:

reMarkable: ~/ sha256sum libcrypto.so.1.0.2 
e7bdf84d7410c777dfc47b4354622444346c44bbee244c18b4dacce743fcdb69  libcrypto.so.1.0.2

But perhaps that's expected.

@bordaigorl
Copy link
Owner

bordaigorl commented Mar 26, 2021

@axelson yes that is expected (although not really sure what the diff is about).
My copy was obtained from a RM1 version 2.5.0.27

@axelson
Copy link

axelson commented Mar 26, 2021

Makes sense 👍

@bordaigorl
Copy link
Owner

For the ones that prefer a GUI, the update2.6 branch offers a message box asking to upload the library if needed (i.e. only on RM2s that lack the library).
For the main branch I think I'll wait a little bit until we determine what's the best way to address this in the VNC server

@d-falck
Copy link

d-falck commented Apr 2, 2021

The fix on on the update2.6 branch seems not to work when accessing the tablet over WiFi (at an IP address other than 10.11.99.1); RMView asserts the needed library isn't installed even when it already is. If I hit 'yes' to install the library anyway (whether or not the library is currently installed), I get libcrypto could not be decompressed on the tablet.

Edit: this problem seem to happen on USB too for me now. It means I have to delete the library each time to use it!

Can you reproduce this error? Apologies if this is an SSH problem due to my setup.

@jasonhemann
Copy link

@d-falck , I'm seeing the same issue over USB.

@khalid-salad
Copy link

khalid-salad commented Apr 14, 2021

Same issue for me. Deleting libcrypto.so.1.0.2 then calling rmview seems to work.

ssh remarkable 'rm /usr/lib/libcrypto.so.1.0.2*'

Though I currently have to do this each time I call rmview.

@bordaigorl
Copy link
Owner

bordaigorl commented Apr 14, 2021

@d-falck @jasonhemann @khalid-salad I can think of three possible reasons:

  • after checking out the update2.6 branch, you need to re-run pip install . to apply the changes.
  • you can ssh into the tablet after rmview complained failing to install the library, and check if you see a non-empty file at /usr/lib/libcrypto.so.1.0.2.gz. Also, try to run [ -x /usr/lib/libcrypto.so.1.0.2 ]; echo $? and see if it returns 0.
  • you can try to ssh into the remarkable and run /bin/gunzip -V and see if it's there

The reason update2.6 has not been merged into master is that I could only test it on my RM1 and I do not own a RM2, so I am not really sure the environment there supports the installation method.
Let me know.

[In case nothing works, you can just copy the libcrypto manually from bin into the tablet at /usr/lib/, then switch to the vnc branch and reinstall]

@khalid-salad
Copy link

khalid-salad commented Apr 14, 2021

The output of [ -x /usr/lib/libcrypto.so.1.0.2 ]; echo $? is 1. I am doing what I can to debug this, but looking at the relevant source code in rmview.py, I cannot determine why the call to /bin/gunzip /usr/lib/libcrypto.so.1.0.2.gz works on the first call to rmview, but not subsequent calls (edit: or why it appears that libcrypto.so.1.0.2 runs fine on the first use of rmview but not on subsequent uses`).

I have noticed, however, that manually extracting the zip from the repo here and copying it to /usr/lib/ with scp has fixed the issue.

@ghost
Copy link

ghost commented Apr 19, 2021

I think somehow /usr/lib/libcrypto.so.1.1 got deleted in the process (probably it was my fault). My WiFi stopped working, and running systemctl status wpa_supplicant@wlan0.service
gives me
/usr/sbin/wpa_supplicant: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory.
I'm on a RM2 on version 2.6.2.75, does anyone have that file?

@sakabug
Copy link

sakabug commented Apr 29, 2021

to neutronsgit:
I got it working with libcrypto.so.1.0.2 and RM2 v 2.6.2.75.
USB and WiFi works.

@larsblumberg
Copy link
Contributor

larsblumberg commented Apr 29, 2021

@neutronsgit I’m running the same software version. Do you still need the file? If yes, let me know where to put it for you.

@ghost
Copy link

ghost commented May 2, 2021

@sakabug I do have the 1.0.2 version but that somehow does not work.

@larsblumberg If you could drop it of here, that would be great!

@larsblumberg
Copy link
Contributor

@neutronsgit Transferred. You need to set these permissions to that file:

reMarkable: ~/ ll /usr/lib/libcrypto.so.1.1 
-rwxr-xr-x    1 root     root       2043816 Dec 17 19:40 /usr/lib/libcrypto.so.1.1

@bordaigorl
Copy link
Owner

@d-falck @jasonhemann @khalid-salad I just realised in the update2.6 branch I forgot to make sure libcrypto was executable 🤦🏻
I just committed a patch, could you check if that works?

@sakabug
Copy link

sakabug commented May 5, 2021

Now tried proper 2.6 branch (my earlier message was errorneously with main branch of rmview)

start rmview -> Missing libcrypto 1.0.2 alert
Select download
rmview works properly

@jasonhemann
Copy link

jasonhemann commented May 11, 2021

@d-falck @jasonhemann @khalid-salad I just realised in the update2.6 branch I forgot to make sure libcrypto was executable 🤦🏻
I just committed a patch, could you check if that works?

I can now connect over USB, and that works just fine. I cannot, however, connect over wifi. I'm not sure if this is related or an independent issue I'm facing. I found that when I try:

  1. Stop the wlan service systemctl stop wpa_supplicant@wlan0.service and
  2. Manually run the wpa_supplicant tool wpa_supplicant -C/var/run/wpa_supplicant -c/etc/wpa_supplicant/eduroam.conf -iwlan0

I get an error libssl.so.1.1: cannot open shared object file: No such file or directory . I have in /usr/lib/ libssl.so.1.0.2, as I think recommended. I have another file ssl-1.1. Those version numbers seemed suspiciously mismatched, but this is not my area of expertise.

EDIT: This was due to removing/overwriting libssl and libcrypto in my 2.5 > 2.6 upgrade. If anyone else did that, don't do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests