On Tue, Jul 29, 2025 at 10:16:24AM +0100, Barry Scott wrote: > > > > On 29 Jul 2025, at 09:53, Neal Gompa <ngomp...@gmail.com> wrote: > > > > Delayed execution of scriptlets by migrating them to systemd units > > also creates problems because it de-links the execution from the > > transaction. This means that the risk of breakage goes up depending on > > things happening on the system between transaction execution and the > > reboot. > > This is a very real issue for the RPMfusuion nvidia drivers. > > Users do not know to wait for the async build of the drivers so they reboot > and all too often end up with no GUI. (In spite of the on-boot checks) > > We have to talk a user through the fixes for this at least once a week on > the support forum https://discussion.fedoraproject.org/
The offline update logic still uses the normal systemd transaction logic. The reboot after the update is done is triggered using 'systmectl reboot' or the equivalent D-Bus call, so normal transaction rules apply. The akmod@.service is just a normal service, and if it needs to finish, then this should be achievable with normal unit configuration. Even the inhibit logic that is present in the unit should not be necessary. It doesn't really make sense for things running as a systemd unit. I'm sorry to hear that the akmods service causes problems for users, but this is certainly something that can be figured out and fixed. Just spitballing, the following seems to work as expected: # /etc/systemd/system/timeout@.service [Service] Type=exec RemainAfterExit=yes ExecStart=sleep %i ExecStop=tail --pid $MAINPID -f /dev/null TimeoutStopSec=3m When I do 'sudo systemctl start timeout@{1,2,3,4}m && sudo systemctl reboot', I see the following: [ OK ] Stopped timeout@1m.service. [ OK ] Stopped timeout@2m.service. [** ] (1 of 3) Job timeout@4m.service/stop running (1min 49s / 3min) [ ***] (2 of 2) Job timeout@3m.service/stop running (2min 8s / 3min) ... [ OK ] Stopped timeout@3m.service. [ OK ] Stopped timeout@4m.service. [ OK ] Removed slice system-timeout.slice - Slice /system/timeout. (This waits approx. 3 minutes, timeout@4m is stopped immediately after timeout@3m.) I expect that if the akmods@.services are reworked like this, with the timeout limit raised to 15min or so, we just need to tell users to wait for the normal shutdown. Zbyszek -- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue