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

test rm2fb toltec package #35

Closed
raisjn opened this issue Dec 19, 2020 · 37 comments
Closed

test rm2fb toltec package #35

raisjn opened this issue Dec 19, 2020 · 37 comments
Labels
help wanted Extra attention is needed

Comments

@raisjn
Copy link
Collaborator

raisjn commented Dec 19, 2020

toltec-dev/toltec#143 is the PR for the rm2fb package

the rm2fb package can be found at https://toltec-dev.org/stable/rm2fb_1.0.0-1_armv7-3.2.ipk.

to test the package:

  • install with opkg install rm2fb_1.0.0-1_armv7-3.2.ipk
  • verify xochitl restarted
  • verify that /dev/shm/swtfb.01 now exists
  • test out launchers like draft, oxide or remux
  • install other apps from toltec: plato, retris & chessMarkable are not yet rm2 compatible
  • report any issues on this task

if you run into problems: ssh in with the USB cable, remove rm2fb with opkg remove rm2fb and restart xochitl systemctl restart xochitl. also disable / uninstall other launchers

debugging tips:

  • journalctl -u rm2fb and journalctl -u <service> will show logs
  • if the rm2fb server is running, remarkable-shutdown will show up in the process list
  • to run an app from command line, use rm2fb-client <app> - it will add the LD_PRELOAD client shim

for testing rmkit apps:
* use toltec's testing repo instead of stable repo or download binaries from https://build.rmkit.dev/master/latest/
update jan 04 2021: rm2fb is in toltec stable repository

@raisjn raisjn added the help wanted Extra attention is needed label Dec 19, 2020
@danshick
Copy link

Just installed. I'll let you know if I end up with any crashes or bugs. Thanks for everyone's efforts to get this working.

@raisjn
Copy link
Collaborator Author

raisjn commented Dec 19, 2020

the remux in toltec stable does not work on rM2 (remux will migrate to toltec stable soon). for now, it's advised to copy the remux binary from https://build.rmkit.dev/master/latest/ into /opt/bin (and make sure to chmod +x it)

EDIT: toltec testing now has a version of remux that works well with rM2

@lcpriest
Copy link

It installed very easily.

I have tested draft, KOReader and Plato.

Some very stream-of-thought notes, many may be relevant to the specific app and not this PR, apologies.

Draft

  • xochitl inside draft works perfectly.
  • Often had to power cycle to get back to the launcher due to lack of middle button.
  • The draft launcher had no wifi when enabled, had to click into xochitl to be able to use opkg again (to install another launcher).

Oxide

  • Oxide installed and launched correctly
  • xochitl inside oxide works perfectly, powering off xochitl opens back into Oxide.
  • Often had to power cycle to get back to the launcher due to lack of middle button.
  • wifi works great

Remux

  • Install from opkg worked, have no idea how to test as I believe it requires a longpress on the no-longer-present middle button to allow for app switching.

KOReader

  • KOReader opens perfectly but seems to only respond to the marker and not any touch inputs.

Calculator

  • Calculator opens perfectly but seems to only respond to touch inputs and not the marker.
  • Have to power cycle to exit calculator

fingerterm

  • fingerterm opens fine
  • responds to touch input and not the market.
  • touch input is very finicky, long press is often needed to get a response and then it has recognized 5+ inputs of the same character.
  • Quit from within fingerterm returns to parent launcher.

harmony

  • could not open.

recrossable

  • opens great
  • slight input lag
  • main issue is due to being many different input fields, unlikely to be related to this repo.

@raisjn
Copy link
Collaborator Author

raisjn commented Dec 20, 2020

Some very stream-of-thought notes, many may be relevant to the specific app and not this PR, apologies.

great notes, thanks! for rmkit apps, you can install them from toltec testing. for remux (assuming you get the latest version), you can launch by swiping up the side of the display

we don't expect plato to work yet, and only recently did ddvks rm2 support patches get merged into koreader (for touch support)

@pascalw
Copy link

pascalw commented Dec 21, 2020

Installation was very easy indeed! I noticed having rm2fb installed breaks things like rien/reStream#31 and https://gist.github.com/owulveryck/4007cbf14e0028f373e4294f66c4ad07 which are reading xochitl memory directly. I couldn't find any advice how these utilities should be adapted to be compatible with rm2fb, is there any guidance on this?

@raisjn
Copy link
Collaborator Author

raisjn commented Dec 21, 2020

Installation was very easy indeed! I noticed having rm2fb installed breaks things like rien/reStream#31 and https://gist.github.com/owulveryck/4007cbf14e0028f373e4294f66c4ad07 which are reading xochitl memory directly. I couldn't find any advice how these utilities should be adapted to be compatible with rm2fb, is there any guidance on this?

The framebuffer is exposed as /dev/shm/swtfb.01 - you can point reStream at that location instead of /dev/fb (this is what the person using xofb + color patches in reStream#28 is doing)

For screenshots, you can similarly grab /dev/shm/swtfb.01 and then convert it raw rgb565 -> png. (to convert, you can use a script like iraw2png.pl in https://www.cnx-software.com/2010/07/18/how-to-do-a-framebuffer-screenshot/ or however you were converting previously)

@Brandieee
Copy link

Brandieee commented Dec 23, 2020

No issues with installation. I've only really tried to use Xochitl and KOreader from Oxide.

Getting back to oxide from Xochitl can be accomplished by powering off or restarting via the menu, sometimes this dumps you straight back into Xochitl though.

One problem I've had is that KOreader seems to crash on auto-sleep from Oxide, does not crash on button-sleep.

I'll be trying out Draft as well sometime in the coming days and updating my comment.

@Eeems
Copy link
Collaborator

Eeems commented Dec 23, 2020

No issues with installation. I've only really tried to use Xochitl and KOreader from Oxide.

Getting back to oxide from Xochitl can be accomplished by powering off or restarting via the menu, sometimes this dumps you straight back into Xochitl though.

Did you disable the xochitl service and enable the tarnish service? Or did you set xochtil as the default startup application in oxide?

One problem I've had is that KOreader seems to crash on auto-sleep from Oxide, does not crash on button-sleep.

@Witos has been having trouble with returning from suspend as well and has a PR in the works to resolve it Eeems-Org/oxide#114

@Brandieee
Copy link

No issues with installation. I've only really tried to use Xochitl and KOreader from Oxide.
Getting back to oxide from Xochitl can be accomplished by powering off or restarting via the menu, sometimes this dumps you straight back into Xochitl though.

Did you disable the xochitl service and enable the tarnish service? Or did you set xochtil as the default startup application in oxide?

xochitl disabled and enabled tarnish, set no default startup application. Just figured out that it might be that Oxide buffers the input given, past app launches, i.e.

  • press app icon two times
  • app launches
  • exit app
  • oxide pops up again and interprets the second press launching the app again

@Eeems
Copy link
Collaborator

Eeems commented Dec 23, 2020

@Brandieee Oh interesting, I've had others report the same thing on the rM1. I've been unable to replicate on my own rM1, but it's very likely happening. On the rM1 we have to flush out the button press queue before switching applications to avoid the same issue. It might be necessary to also do the same of touch input. Could you open an issue on the Oxide repository about this?

@FabrizioRomanoGenovese
Copy link

FabrizioRomanoGenovese commented Jan 3, 2021

Hey everyone, first of all thanks for the great work. I've tested the package and it works more or less. Some things are not perfect, e.g. koReader works only with pen input, but I can live with that. The only thing that really is a bummer for me is that reStream does not work. I get the following error from the script I had to move over the reMarkable2:
Error: No line containing /dev/fb0 in /proc/xxx/maps file
where xxx is some pid number.

A few comments above in the thread, there's this post:

Installation was very easy indeed! I noticed having rm2fb installed breaks things like rien/reStream#31 and https://gist.github.com/owulveryck/4007cbf14e0028f373e4294f66c4ad07 which are reading xochitl memory directly. I couldn't find any advice how these utilities should be adapted to be compatible with rm2fb, is there any guidance on this?

The framebuffer is exposed as /dev/shm/swtfb.01 - you can point reStream at that location instead of /dev/fb (this is what the person using xofb + color patches in reStream#28 is doing)

For screenshots, you can similarly grab /dev/shm/swtfb.01 and then convert it raw rgb565 -> png. (to convert, you can use a script like iraw2png.pl in https://www.cnx-software.com/2010/07/18/how-to-do-a-framebuffer-screenshot/ or however you were converting previously)

...Which I guess would help. Still, I'm not exactly sure where should I replace/dev/fb with /dev/shm/swtfb.01 Do you mean that I have to download the codebase from https://github.com/rien/reStream, spot the relevant place where the substitution has to be made, and recompile? If that's the case, it would be actually better to implement a way to check if rm2fb is installed, and depending on the result, pointing at a different location, which I guess I could do by grepping rmfb2 from opkg list-installed, right?

@Eeems
Copy link
Collaborator

Eeems commented Jan 3, 2021

@FabrizioRomanoGenovese I believe we have an updated build of KOReader in the works still. Just resolving some other issues on it with how it interacts with the oxide package.

As for reStream, it doesn't currently support rm2fb as you've found out. I believe there are some discussions going on around getting it to work. I believe you can use https://github.com/bordaigorl/rmview though safely, but don't quote me on that, I don't have a rM2 to test on. I would suggest either opening issues on the respective repositories asking for support, or commenting on existing issues mentioning that you would also like proper rm2fb support.

As for you comment about checking to see if rm2fb is installed, yes you can simply run opkg list-installed | grep rm2fb to see if it's installed.

@danshick
Copy link

danshick commented Jan 4, 2021

As for reStream, it doesn't currently support rm2fb as you've found out. I believe there are some discussions going on around getting it to work.

If no one gets to it first, I'll push a PR this week to add rm2fb support.

@FabrizioRomanoGenovese
Copy link

That would be great! Thanks! Also, is there a reason why reStream isn't available as an opkg package?

@Eeems
Copy link
Collaborator

Eeems commented Jan 4, 2021

That would be great! Thanks! Also, is there a reason why reStream isn't available as an opkg package?

It's not a reMarkable application, so you don't install it on the reMarkable itself. That said they really should package up the dependencies so you can opkg install restream-deps or something. But nobody has created the packages yet.

@FabrizioRomanoGenovese
Copy link

Yeah, part of the application is to be ran on the host PC, but you also need to scp an executable on the remarkable. It would be easier if this could be done with opkg, so that the only thing one has to download on the host PC is a bash script :)

@Eeems
Copy link
Collaborator

Eeems commented Jan 4, 2021

Yeah, part of the application is to be ran on the host PC, but you also need to scp an executable on the remarkable. It would be easier if this could be done with opkg, so that the only thing one has to download on the host PC is a bash script :)

You should open a PR to add it ;)

@danshick
Copy link

danshick commented Jan 4, 2021

Yeah, part of the application is to be ran on the host PC, but you also need to scp an executable on the remarkable. It would be easier if this could be done with opkg, so that the only thing one has to download on the host PC is a bash script :)

This is new as of their rm2 support PR. That small rust binary never used to exist until recently. It'd be great to add it to toltec.

@notDavid
Copy link

notDavid commented Jan 11, 2021

Hi, after installing rm2fb from toltec on my RM2 my journalctl -f is spammed with this nonstop. Is it a bug or am i using a wrong version or something? Please advise, thanks:

journalctl -f

Details

-- Logs begin at Mon 2021-01-11 13:46:35 CET. --
Jan 11 19:07:35 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:36 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:37 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 43.
Jan 11 19:07:37 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:37 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:38 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:39 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:40 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:41 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:42 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 44.
Jan 11 19:07:42 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:42 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:43 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:44 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:45 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:46 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:47 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 45.
Jan 11 19:07:48 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:48 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:48 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:49 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:50 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:51 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:52 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 46.
Jan 11 19:07:53 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:53 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:53 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:54 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:55 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:56 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:57 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:58 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 47.
Jan 11 19:07:58 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:58 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:59 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:08:00 reMarkable ifplugd(usb0)[243]: upping interface
Jan 11 19:08:01 reMarkable ifplugd(usb0)[243]: upping interface

reMarkable: ~/tmp/ opkg list_installed | grep rm2fb
rm2fb - 1.0.0-3

PS. This starts after opkg install rm2fb AND a reboot. It stops when i opkg remove rm2fb (and a reboot i think.)

@Eeems
Copy link
Collaborator

Eeems commented Jan 11, 2021

Looks like [email protected] is crashing due to the rm2fb preload?

@raisjn
Copy link
Collaborator Author

raisjn commented Jan 11, 2021

I get messages about upping interface but don't have errors about busybox-udhcpcd.

@Eeems
Copy link
Collaborator

Eeems commented Jan 11, 2021

@notDavid could you check the output of journalctl -u [email protected] to see if it has more information?

@notDavid
Copy link

journalctl -u [email protected] ( @ same time as the log above) :

Details

Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 43.
Jan 11 19:07:37 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:37 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:37 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 44.
Jan 11 19:07:42 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:42 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:42 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 45.
Jan 11 19:07:48 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:48 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:48 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 46.
Jan 11 19:07:53 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:53 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:53 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 47.
Jan 11 19:07:58 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 11 19:07:58 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 11 19:07:58 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.

@Eeems
Copy link
Collaborator

Eeems commented Jan 11, 2021

@notDavid Could you get us the contents of the unit file? You can find the path by checking systemctl status [email protected]

@notDavid
Copy link

I've removed rm2fb now (because of the issues) with opkg remove rm2fb, but i assume that's not relevant... (i can reinstall if needed.)

cat /lib/systemd/system/[email protected] :

[Unit]
Description=udhcpd on %I
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device systemd-networkd.service
Requires=systemd-networkd.service sys-subsystem-net-devices-%i.device

[Service]
ExecStart=/usr/sbin/udhcpd -f /etc/udhcpd.%i.conf
Restart=on-failure
RestartSec=5
StandardOutput=null
StandardError=journal
LogLevelMax=3

[Install]
WantedBy=multi-user.target

@Eeems
Copy link
Collaborator

Eeems commented Jan 11, 2021

@raisjn Does this unit exist for you as well? And if so, does it match?

@notDavid
Copy link

Okay so, i'm not sure if this is useful to anyone, but just in case;

When i change [email protected] to LogLevelMax=6 i get 2 extra lines of info:

Jan 14 23:20:05 reMarkable udhcpd[525]: udhcpd: is interface usb0 up and configured?: Cannot assign requested address
Jan 14 23:20:05 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE

So, i tried connecting the USB cable and this happens:

Details

Jan 14 23:36:42 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:43 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:44 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 14 23:36:44 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 7.
Jan 14 23:36:44 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 14 23:36:44 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 14 23:36:44 reMarkable udhcpd[322]: udhcpd: started, v1.30.1
Jan 14 23:36:44 reMarkable udhcpd[322]: udhcpd: is interface usb0 up and configured?: Cannot assign requested address
Jan 14 23:36:44 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 14 23:36:44 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 14 23:36:44 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:45 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:46 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:47 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:48 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:49 reMarkable kernel: random: crng init done
Jan 14 23:36:49 reMarkable kernel: random: 7 urandom warning(s) missed due to ratelimiting
Jan 14 23:36:49 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 14 23:36:49 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 8.
Jan 14 23:36:49 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 14 23:36:49 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 14 23:36:49 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:49 reMarkable udhcpd[323]: udhcpd: started, v1.30.1
Jan 14 23:36:49 reMarkable udhcpd[323]: udhcpd: is interface usb0 up and configured?: Cannot assign requested address
Jan 14 23:36:49 reMarkable systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Jan 14 23:36:49 reMarkable systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 14 23:36:50 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:51 reMarkable ifplugd(usb0)[214]: upping interface

-> Connected the USB cable approximately here

Jan 14 23:36:51 reMarkable kernel: g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
Jan 14 23:36:51 reMarkable systemd-networkd[139]: usb0: Gained carrier
Jan 14 23:36:51 reMarkable systemd-timesyncd[208]: Network configuration changed, trying to establish connection.
Jan 14 23:36:51 reMarkable kernel: IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
Jan 14 23:36:50 reMarkable systemd-timesyncd[208]: Synchronized to time server 216.239.35.8:123 (time3.google.com).
Jan 14 23:36:51 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:52 reMarkable systemd-networkd[139]: usb0: Gained IPv6LL
Jan 14 23:36:52 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:53 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:53 reMarkable systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Jan 14 23:36:53 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 9.
Jan 14 23:36:53 reMarkable systemd[1]: Stopped udhcpd on usb0.
Jan 14 23:36:53 reMarkable systemd[1]: Started udhcpd on usb0.
Jan 14 23:36:53 reMarkable udhcpd[326]: udhcpd: started, v1.30.1
Jan 14 23:36:54 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:55 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:56 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:56 reMarkable udhcpd[326]: udhcpd: sending OFFER of 10.11.99.2
Jan 14 23:36:57 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:58 reMarkable udhcpd[326]: udhcpd: sending ACK to 10.11.99.2
Jan 14 23:36:58 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:36:59 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:00 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:01 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:02 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:03 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:04 reMarkable systemd-networkd[139]: usb0: Configured
Jan 14 23:37:04 reMarkable systemd-timesyncd[208]: Network configuration changed, trying to establish connection.
Jan 14 23:37:04 reMarkable systemd-networkd-wait-online[152]: ignoring: lo
Jan 14 23:37:04 reMarkable systemd[1]: Started Wait for Network to be Configured.
Jan 14 23:37:04 reMarkable systemd[1]: Reached target Network is Online.
Jan 14 23:37:04 reMarkable systemd[1]: Started A simple mDNS responder.
Jan 14 23:37:04 reMarkable systemd-timesyncd[208]: Synchronized to time server 216.239.35.8:123 (time3.google.com).
Jan 14 23:37:04 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:05 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:06 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:07 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:08 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:09 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:10 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:11 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:12 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:13 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:14 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:15 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:16 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:17 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:18 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:19 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:20 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:21 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:22 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:23 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:24 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:25 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:26 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:27 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:27 reMarkable udhcpd
[326]: udhcpd: sending ACK to 10.11.99.2
Jan 14 23:37:28 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:29 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:30 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:31 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:32 reMarkable systemd[1]: dev-ttyGS0.device: Job dev-ttyGS0.device/start timed out.
Jan 14 23:37:32 reMarkable systemd[1]: Timed out waiting for device dev-ttyGS0.device.
Jan 14 23:37:32 reMarkable systemd[1]: Dependency failed for Serial Getty on ttyGS0.
Jan 14 23:37:32 reMarkable systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'.
Jan 14 23:37:32 reMarkable systemd[1]: dev-ttyGS0.device: Job dev-ttyGS0.device/start failed with result 'timeout'.
Jan 14 23:37:32 reMarkable systemd[1]: Reached target Login Prompts.
Jan 14 23:37:32 reMarkable systemd[1]: Reached target Multi-User System.
Jan 14 23:37:32 reMarkable systemd[1]: Starting Update UTMP about System Runlevel Changes...
Jan 14 23:37:32 reMarkable systemd[1]: Started Update UTMP about System Runlevel Changes.
Jan 14 23:37:32 reMarkable systemd[1]: Startup finished in 4.374s (kernel) + 1min 30.559s (userspace) = 1min 34.934s.
Jan 14 23:37:32 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:33 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:34 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:35 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:36 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:37 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:38 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:39 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:40 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:41 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:42 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:43 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:44 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:45 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:46 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:47 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:48 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:49 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:50 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:51 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:52 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:53 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:54 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:55 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:56 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:57 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:57 reMarkable udhcpd[326]: udhcpd: sending ACK to 10.11.99.2
Jan 14 23:37:58 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:37:59 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:00 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:01 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:02 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:03 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:04 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:05 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:06 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:07 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:08 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:09 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:10 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:11 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:12 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:13 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:14 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:15 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:16 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:17 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:18 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:19 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:20 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:21 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:22 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:23 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:24 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:25 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:26 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:27 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:27 reMarkable udhcpd[326]: udhcpd: sending ACK to 10.11.99.2
Jan 14 23:38:28 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:29 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:30 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:31 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:32 reMarkable ifplugd(usb0)[214]: upping interface

-> Disconnected the USB cable

Jan 14 23:38:32 reMarkable qmdns-responder[327]: reinitializing sockets
Jan 14 23:38:32 reMarkable systemd-networkd[139]: usb0: Lost carrier
Jan 14 23:38:32 reMarkable systemd-timesyncd[208]: Network configuration changed, trying to establish connection.
Jan 14 23:38:32 reMarkable systemd-timesyncd[208]: Synchronized to time server 216.239.35.8:123 (time3.google.com).
Jan 14 23:38:33 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:34 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:35 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:36 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:37 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:38 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:39 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:40 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:41 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:42 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:43 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:44 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:45 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:46 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:47 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:48 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:49 reMarkable ifplugd(usb0)[214]: upping interface
Jan 14 23:38:50 reMarkable ifplugd(usb0)[214]: upping interface

-> this keeps going on forever...

reMarkable: ~/ opkg list_installed | grep -i rm2fb
rm2fb - 1.0.0-5

opkg remove rm2fb and a reboot = no more errors.

@Eeems
Copy link
Collaborator

Eeems commented Jan 14, 2021

Hmm, I'm thinking the preload isn't playing well with it. Perhaps we shouldn't have rm2fb auto add to environment for all services and have it be a bit more selective?

@raisjn
Copy link
Collaborator Author

raisjn commented Jan 14, 2021

It should be possible to disable the LD_PRELOAD directly in the systemd unit by adding a line to [Service] section like Environment=LD_PRELOAD= (but maybe need to play around with it)

some options for rm2fb:

  • disable the LD_PRELOAD for this service specifically but on for everything else
  • add LD_PRELOAD to each launcher's service file, but still need to edit xochitl's service file to add the environment.
  • ???

@danshick
Copy link

If rm2fb is failing based on the versions of libs a binary is using, can't we use ldd to figure out if a binary links against the remarkable libs and LD_PRELOAD conditionally?

@raisjn
Copy link
Collaborator Author

raisjn commented Jan 15, 2021

If rm2fb is failing based on the versions of libs a binary is using, can't we use ldd to figure out if a binary links against the remarkable libs and LD_PRELOAD conditionally?

that sounds nice - how would we do that for systemd services?

@danshick
Copy link

danshick commented Jan 15, 2021

If rm2fb is failing based on the versions of libs a binary is using, can't we use ldd to figure out if a binary links against the remarkable libs and LD_PRELOAD conditionally?

that sounds nice - how would we do that for systemd services?

Well, for any one service, you could override the Exec line and use a conditional expression when launching. It'd be nicer to have something globally applicable though. I'll do some searching.

Edit:

You could have a Before relationship to a unit that creates an EnvironmentFile, and use systemd specifiers to let this specialized Before unit know which other unit it is being called about. You'd need a pretty clever script to extract the actual executable from the target unit in order to run ldd on it and conditionally write an EnvironmentFile. I hope that word salad makes some sense.

Edit2:

You'd still need to add this Before unit to every existing unit, as well as the EnvironmentFile config.

Edit3:

Before and After work differently than I thought. There may be some other unit relationship we could use instead, but I'm not sure.

@Eeems
Copy link
Collaborator

Eeems commented Jan 15, 2021

Before and After work differently than I thought. There may be some other unit relationship we could use instead, but I'm not sure.

@danshick There is a weaker version of After that can be used. Can't remember what it was called though.

@danshick
Copy link

Before and After work differently than I thought. There may be some other unit relationship we could use instead, but I'm not sure.

@danshick There is a weaker version of After that can be used. Can't remember what it was called though.

I think we need Wants= and After= to get both order and weak requirement. Then we could remove the global DefaultEnvironment setting. But this still needs to be overridden into every unit I think.

@raisjn
Copy link
Collaborator Author

raisjn commented Jan 19, 2021

@notDavid I modified two files, /lib/systemd/system/[email protected] and [email protected] and added Environment="LD_PRELOAD=" to the [Service] section which had the effect of quieting the logs down.

If that works for you, the next question is how to set that up automatically when installing rm2fb (and maybe do it for all services that are really busybox files)

@notDavid
Copy link

@raisjn Great, i just tested it and it works 👌🏼 No more errors.

@raisjn
Copy link
Collaborator Author

raisjn commented Jan 30, 2021

thanks for all the testing and help, everyone! rm2fb has been in toltec for a while now, going to close out

@raisjn raisjn closed this as completed Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants