Closed raisjn closed 3 years ago
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.
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
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.
opkg
again (to install another launcher).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)
Installation was very easy indeed! I noticed having rm2fb installed breaks things like https://github.com/rien/reStream/pull/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?
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)
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.
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 https://github.com/Eeems/oxide/pull/114
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.
@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?
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?
@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.
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.
That would be great! Thanks! Also, is there a reason why reStream isn't available as an opkg
package?
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.
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 :)
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 withopkg
, 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 ;)
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 withopkg
, 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.
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
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.)
Looks like busybox-udhcpd@usb0.service
is crashing due to the rm2fb preload?
I get messages about upping interface but don't have errors about busybox-udhcpcd.
@notDavid could you check the output of journalctl -u busybox-udhcpd@usb0.service
to see if it has more information?
journalctl -u busybox-udhcpd@usb0.service
( @ same time as the log above) :
@notDavid Could you get us the contents of the unit file? You can find the path by checking systemctl status busybox-udhcpd@usb0.service
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/busybox-udhcpd@.service
:
[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
@raisjn Does this unit exist for you as well? And if so, does it match?
Okay so, i'm not sure if this is useful to anyone, but just in case;
When i change busybox-udhcpd@.service
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]: busybox-udhcpd@usb0.service: Main process exited, code=exited, status=1/FAILURE
So, i tried connecting the USB cable and this happens:
reMarkable: ~/ opkg list_installed | grep -i rm2fb
rm2fb - 1.0.0-5
opkg remove rm2fb
and a reboot = no more errors.
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?
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:
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?
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?
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.
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.
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.
@notDavid I modified two files, /lib/systemd/system/busybox-udhcpd@.service
and busybox-ifplugd@.service
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)
@raisjn Great, i just tested it and it works 👌🏼 No more errors.
thanks for all the testing and help, everyone! rm2fb has been in toltec for a while now, going to close out
https://github.com/toltec-dev/toltec/pull/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:
opkg install rm2fb_1.0.0-1_armv7-3.2.ipk
if you run into problems: ssh in with the USB cable, remove rm2fb with
opkg remove rm2fb
and restart xochitlsystemctl restart xochitl
. also disable / uninstall other launchersdebugging tips:
journalctl -u rm2fb
andjournalctl -u <service>
will show logsremarkable-shutdown
will show up in the process listrm2fb-client <app>
- it will add the LD_PRELOAD client shimfor 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