toltec icon indicating copy to clipboard operation
toltec copied to clipboard

rm2fb service is not stopped on uninstall

Open matteodelabre opened this issue 4 years ago • 13 comments

  • Install Toltec stable (or testing).
  • Install rm2fb.
  • Remove rm2fb.
  • Notice that the rm2fb service is still active, and that the remarkable-shutdown process is still running.

Since the systemd unit is actually removed, this is fixed after a reboot, or if you do systemctl stop rm2fb. The package uninstall script should normally stop the service by itself, though.

matteodelabre avatar Mar 08 '21 15:03 matteodelabre

Looks like it should be stopped: https://github.com/toltec-dev/toltec/blob/stable/package/rm2fb/package#L58

Eeems avatar Mar 08 '21 15:03 Eeems

this is semi purposeful. it leaves the system in a usable state until they reboot and doesn't restart xochitl. I believe instructions say to reboot to finalize

raisjn avatar Mar 08 '21 15:03 raisjn

I ran into this while writing an uninstall script (#295). The script cannot unmount /opt as long as the rm2fb server process is running. If possible, I’d prefer to avoid having to reboot the tablet in the middle of the uninstall script, since it would make the script unnecessarily complicated (requires setting up a one-time hook that gets executed after the reboot).

matteodelabre avatar Mar 08 '21 15:03 matteodelabre

that makes sense. some things to pay attention to:

  • launchers don't depend on rm2fb, so uninstall of rm2fb can leave launcher running
  • need to restart xochitl to get new preload
  • current app on screen can be non xochitl. it will no longer work but potentially still be running with the preload attached
  • what happens on upgrades? (i think will get double flash and lose screen content)

i think that 1 and 2 combined can leave two xochitl running at same time, too

raisjn avatar Mar 08 '21 15:03 raisjn

* launchers don't depend on rm2fb, so uninstall of rm2fb can leave launcher running

As soon as the rm2fb changes that make it noop on rM1 is in stable, we might want to change this.

* what happens on upgrades? (i think will get double flash and lose screen content)

Upgrades don't run preremove or postremove, they run preupgrade (from old package), postupgrade (from old package), and configure (from new package): https://github.com/toltec-dev/toltec/blob/stable/docs/package.md#install-section

  • need to restart xochitl to get new preload

  • current app on screen can be non xochitl. it will no longer work but potentially still be running with the preload attached

Is there a way to easily enumerate all the locations that have the preload in place? That or figure out a way to modify how rm2fb's server works such that it can reload itself on the fly?

Eeems avatar Mar 08 '21 15:03 Eeems

As for the uninstall script, we can always lazy-unmount /opt, remove the systemd unit, then reboot. This will work even if there are remaining processes with opened files in /opt.

matteodelabre avatar Mar 11 '21 11:03 matteodelabre

I know it was discussed before, but was it determined that there is no good way to make rm2fb a device specific hard dependency for applications on rM2?

There's another issue open (mine, I think) to add "PROVIDES" support to package recipes. We had discussed a "display" metapackage that is provided by rm2fb for rM2 and could be satisfied by a shim on rM1.

Either way, rm2fb as a non-broken thing on rM1 is still a good idea.

danshick avatar Mar 11 '21 14:03 danshick

I’m working on it on the tooling/split-architectures branch. The PR should be ready by tomorrow. EDIT: #310.

matteodelabre avatar Mar 11 '21 14:03 matteodelabre

I’m working on it ... #310.

This is excellent!

danshick avatar Mar 11 '21 17:03 danshick

Is this still an issue?

Eeems avatar Oct 12 '21 19:10 Eeems

I'll have to test again.

matteodelabre avatar Oct 12 '21 21:10 matteodelabre

Issue is still present (although the package is now called display; the service is still rm2fb).

matteodelabre avatar Oct 13 '21 20:10 matteodelabre