Summary: | Option to apply updates on shutdown, not startup | ||
---|---|---|---|
Product: | [Applications] Discover | Reporter: | Harald Sitter <sitter> |
Component: | Updates (offline) | Assignee: | Dan Leinir Turthra Jensen <leinir> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | aleixpol, alex765, correo--correo+kde, dennis, feus73, johnmaverick74, lv215bd5, nate, postix, tobi.goergens |
Priority: | NOR | Keywords: | usability |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=436929 https://bugs.kde.org/show_bug.cgi?id=435845 https://bugs.kde.org/show_bug.cgi?id=452820 https://bugs.kde.org/show_bug.cgi?id=444269 https://bugs.kde.org/show_bug.cgi?id=447245 https://bugs.kde.org/show_bug.cgi?id=483896 |
||
Latest Commit: | Version Fixed In: |
Description
Harald Sitter
2021-05-11 13:12:40 UTC
You're talking about in the Discover UI itself, right? Ideally I think we would have two post-update options for the user: - Reboot now - Close the app and apply the updates on next shutdown/reboot, or not, as per Bug 436924. (In reply to Nate Graham from comment #1) > You're talking about in the Discover UI itself, right? Yes, well, the KCM I suppose. Depending on a specific user's way of using the system it may be more appropriate to set the offline update behavior to reboot (after update the system reboots) or power-off (after update the system powers off). e.g. consider two office use cases: User A has a system with SSD and tends to grab a cup of coffee after entering the office and turning on the PC. reboot is a reasonable system for this scenario because the user will be away from the machine for a while anyway. Meanwhile we start into the update target, apply the update, reboot. By the time the user is back we'd ideally be done and they can log in. User B has a system with a HDD and doesn't drink coffee. power-off may be a more reasonable approach. They will power off the system when they leave the office anyway. We can simply set the offline trigger to power-off and instruct ksmserver/the greeter to perform a reboot instead of a power-off. The user leaves the office. The PC reboots into the update target, applies the update, powers off. The two behaviours that PackageKit offers are: - apply on startup then reboot with the new software - apply it at shutdown where it reboots, applies the updates and shuts down Now we're always going with the first one because the latter has weirdness when the user asks for reboot (it will shut down anyway, we'd need to hook onto the user's selection) and it asks the user for the bios/disk password when they're shutting down which feels very weird. If we could get PackageKit to apply the updates in the used session before updating, that could be a useful alternative, as the next startup would already happen with the new kernel and all, but as is it feels very wonky. Technically possible; needs talking to with upstream though: https://bugs.kde.org/show_bug.cgi?id=435971#c6 *** Bug 435971 has been marked as a duplicate of this bug. *** *** Bug 438136 has been marked as a duplicate of this bug. *** Workaround for those waiting on this feature: With this script https://unix.stackexchange.com/a/621933 you can effectively "update and shutdown" but with the following caveat: - The computer needs to restart to launch the offline updater, which means that it will boot grub/bootloader and everything related, as mentioned in another comment. If you need to manually choose an option when booting or you have bios/disk password, you will need to wait and enter them. Once the updater starts you can then leave your computer, it will properly turn off after finishing (instead of the currently hardcoded reboot). Harald Sitter's *User B* is definitely the desired mode around here. (i prefer to get updates as soon as possible - even if it causes some system instability - but for all other workers here, User B is perfect) Is there any PackageKit bug report on the issue Aleix Pol describes about applying updates on shutdown? *** Bug 467145 has been marked as a duplicate of this bug. *** Bug 452820 is possibly a duplicate of this (needs confirmation) Richard Hughes, collaborator of PackageKit, said on Oct 2021 [1] >> Apply updates while shutting down instead of when turning on > Also not possible as you need a pristine boot to apply updates safely, rather than a system that has been futzed with. [1] https://github.com/PackageKit/PackageKit/issues/510#issuecomment-935732482 systemd v254 introduced a new reboot type: soft-reboot. [1] Do you think this could help here? [1] https://media.ccc.de/v/all-systems-go-2023-184-soft-reboot-atomically-replace-rootfs-and-reboot-userspace-without-kernel-restart ^ I meant in order not to need entering the luks encryption password on the reboot to apply the offline-update. Maybe it's worth noting here that, according to user "Phil O", this may serve as a workaround: > sudo dnf update -y && poweroff || { sleep 30 ; poweroff ; } from: https://pointieststick.com/2023/11/24/this-week-in-kde-the-plasma-6-feature-freeze-approaches/#comment-38562 *** Bug 483896 has been marked as a duplicate of this bug. *** |