matteodelabre/vnsee

Remarkable 2 rm2fb Missing Signature

mehalter opened this issue · 8 comments

Very excited with the v0.4.0 release. I tried to run the released vnsee binary while preloading the latest rm2fb binary but I am getting the error:

reMarkable: ~/ LD_PRELOAD=/opt/lib/librm2fb_server.so.1 ./vnsee
STARTING RM2FB
BIN FILE: ./vnsee
COULDNT LOCATE SIGNATURE IN ./vnsee
PLEASE SEE https://github.com/ddvk/remarkable2-framebuffer/issues/18

Has anyone else encountered this and know how to fix it? Thank you!

Hi @mehalter! rm2fb is made up of two parts that work together: (1) a server lib that is preloaded into /usr/bin/xochitl and is used to control the display, and (2) an (optional) client lib to be preloaded in apps, which acts as a compatibility layer for apps that weren’t designed to work on rM2. Here, it seems that you tried to preload the server lib into a client app, which is incorrect (the server lib should only be preloaded into xochitl). VNSee actually does not need the client lib either: it will detect that it’s running on a rM2 and try to connect to the rm2fb server automatically. The only requirement is to have the rm2fb server running when you run vnsee.

@matteodelabre thanks for the clarification, this makes total sense. I noticed that it was working without doing the LD_PRELOAD with the rm2fb server running, but I also noticed that I was having issues with touch events registering for both the vnc client and the xochitl running in the background. I have tried stopping xochitl before starting vnsee but am still getting this strange behavior where it interacts with both the xochitl and vnsee. Thanks again for your help!

This is not normal. Did you install rm2fb manually or via Toltec? Can you please share the logs of the rm2fb service (journalctl --unit rm2fb --no-pager) and the output of ps when this issue occurs?

I have installed through Toltec. I also get the same behavior without running the LD_PRELOAD as well as when I run the LD_PRELOAD with the client

Here's the journalctl output:

reMarkable: ~/ journalctl --unit rm2fb --no-pager
-- Logs begin at Sun 2021-04-25 14:26:16 UTC, end at Mon 2021-04-26 14:56:08 UTC. --
Apr 25 14:26:20 reMarkable systemd[1]: Started Remarkable2 Framebuffer Server.
Apr 25 14:26:20 reMarkable remarkable-shutdown[187]: BIN FILE: /usr/bin/remarkable-shutdown
Apr 25 14:26:20 reMarkable remarkable-shutdown[187]: ADDR: 227a8
Apr 25 14:26:20 reMarkable remarkable-shutdown[187]: REPLACING THE IMAGE with shared memory
Apr 25 14:26:23 reMarkable remarkable-shutdown[187]: SWTCON initialized \o/
Apr 25 14:26:23 reMarkable remarkable-shutdown[187]: STARTING RM2FB
Apr 25 14:26:23 reMarkable remarkable-shutdown[187]: Reading waveforms from /usr/share/remarkable/320_R349_AF0411_ED103TC2U2_VB3300-KCD_TC.wbf
Apr 25 14:26:23 reMarkable remarkable-shutdown[187]: Running INIT (111 phases)
Apr 25 14:26:23 reMarkable remarkable-shutdown[187]: 1404 1872 16

Here is ps output when the error occurs:

reMarkable: ~/ ps
  PID USER       VSZ STAT COMMAND
    1 root      7732 S    {systemd} /sbin/init
    2 root         0 SW   [kthreadd]
    3 root         0 IW   [kworker/0:0]
    4 root         0 IW<  [kworker/0:0H]
    5 root         0 IW   [kworker/u4:0]
    6 root         0 IW<  [mm_percpu_wq]
    7 root         0 SW   [ksoftirqd/0]
    8 root         0 IW   [rcu_preempt]
    9 root         0 IW   [rcu_sched]
   10 root         0 IW   [rcu_bh]
   11 root         0 SW   [migration/0]
   12 root         0 SW   [cpuhp/0]
   13 root         0 SW   [cpuhp/1]
   14 root         0 SW   [migration/1]
   15 root         0 SW   [ksoftirqd/1]
   16 root         0 DW   [kworker/1:0]
   17 root         0 IW<  [kworker/1:0H]
   18 root         0 SW   [kdevtmpfs]
   19 root         0 IW   [kworker/0:1]
   20 root         0 DW   [kworker/1:1]
   21 root         0 SW   [oom_reaper]
   22 root         0 IW<  [writeback]
   23 root         0 SW   [kcompactd0]
   24 root         0 IW<  [crypto]
   25 root         0 IW<  [kblockd]
   26 root         0 SW   [irq/235-bd7181x]
   27 root         0 IW<  [cfg80211]
   28 root         0 IW<  [watchdogd]
   29 root         0 IW<  [rpciod]
   30 root         0 IW<  [xprtiod]
   31 root         0 SW   [kswapd0]
   32 root         0 IW<  [nfsiod]
   81 root         0 SW   [irq/66-max77818]
   82 root         0 SW   [irq/66-max77818]
   83 root         0 SW   [irq/66-max77818]
   84 root         0 IW<  [ci_otg]
   85 root         0 IW<  [ci_power_lost]
   86 root         0 SW   [irq/60-wacom_i2]
   87 root         0 SW   [irq/73-2-0024]
   88 root         0 IW   [kworker/1:2]
   89 root         0 IW   [kworker/1:3]
   90 root         0 IW<  [kworker/1:1H]
   91 root         0 SW   [cfinteractive]
   92 root         0 IW   [kworker/1:4]
   93 root         0 SW   [irq/52-mmc1]
   94 root         0 SW   [irq/53-mmc2]
   95 root         0 IW   [kworker/1:5]
   96 root         0 IW<  [ipv6_addrconf]
   97 root         0 IW<  [kworker/0:1H]
   98 root         0 IW   [kworker/1:6]
   99 root         0 SW   [irq/37-imx_ther]
  100 root         0 SW   [irq/99-one_wire]
  101 root         0 IW   [kworker/1:7]
  102 root         0 IW   [kworker/1:8]
  103 root         0 IW<  [ci_otg]
  104 root         0 IW<  [ci_power_lost]
  105 root         0 IW<  [kworker/1:2H]
  106 root         0 SW   [jbd2/mmcblk2p3-]
  107 root         0 IW<  [ext4-rsv-conver]
  108 root         0 IW   [kworker/u4:1]
  131 root         0 IW<  [kworker/0:2H]
  134 root      7596 S    /usr/sbin/haveged -w 1024 -v 1 --Foreground
  135 root     27216 S    /lib/systemd/systemd-journald
  136 root     12200 S    /lib/systemd/systemd-udevd
  142 systemd-  6732 S    /lib/systemd/systemd-networkd
  153 root         0 IW   [kworker/0:2]
  155 root         0 IW<  [kworker/1:3H]
  157 root         0 IW<  [kworker/0:3H]
  160 root         0 IW<  [brcmf_wq/mmc1:0]
  162 root         0 SW   [brcmf_wdog/mmc1]
  174 root         0 SW   [jbd2/mmcblk2p4-]
  175 root         0 IW<  [ext4-rsv-conver]
  178 systemd- 25496 S    /lib/systemd/systemd-timesyncd
  180 root     18188 S    /usr/sbin/ifplugd -n -i usb0
  181 root     40440 S    /usr/bin/crashuploader --path /home/root/
  182 messageb 19524 S    /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-
  185 root     19808 S    /sbin/agetty -o -p -- \u --noclear tty1 linux
  187 root     83260 S    /usr/bin/remarkable-shutdown
  188 root     17760 S    /sbin/agetty -8 -L ttymxc0 115200 xterm
  189 root     49840 S    /usr/bin/sync --service
  193 root     65448 S    /opt/bin/remux
  201 root     18236 S    /usr/sbin/dhcpcd -4 -b --master wlan0
  213 root     21084 S    /lib/systemd/systemd-logind
  233 root         0 IW   [kworker/0:3]
  244 root      259m S    /usr/bin/xochitl --system
  263 root     23084 S    /usr/sbin/wpa_supplicant -u
  271 root         0 IW   [kworker/u4:2]
  278 root     18188 S    /usr/sbin/udhcpd -f /etc/udhcpd.usb0.conf
  297 root     18332 R    /usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -B
  299 root      3180 S    -sh
  306 root     18332 S    /usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -B
  307 root      3180 S    -sh
  314 root     24320 S    ./vnsee
  315 root     19376 S    /usr/bin/qmdns-responder
  325 root      2832 R    ps

Thanks! Your ps output shows that there’s a xochitl process running (with PID 244). Are you sure that the xochitl systemd service is stopped? To check whether it was started as a service (i.e., by systemd) or not, you can check what is its parent process by running grep PPid /proc/244/status. If the parent PID is 1, then it was started by systemd, which would indicate that the service is actually running.

What is the intended workflow to get it running? Do you usually stop xochitl before or after starting vnsee?

~$ systemctl stop xochitl
~$ ./vnsee

Like this? Or is the new GUI application the best option, does it handle stopping xochitl and everything? Also, I don't think the README mentiona any process of stopping xochitl or intended workflow to start it other than running the binary after copying it to the device.

Thanks for your help!

You would indeed need to stop it before starting VNSee to make sure there’s no interaction between the two apps. This is documented in the OS-specific guides (in the second paragraph), but I agree that this would be useful information to have in the main README. Once this new version lands in Toltec, you’ll be able to start the GUI from a launcher such as remux or Oxide, which handle stopping and starting Xochitl automatically as needed.

Awesome, thank you so much! I'll take a look at the linked page and I'm looking forward to an update in Toltec.