#328 Offline updates can happen when the laptop has low battery and when the AC adapter isn't plugged
Closed: Deferred to upstream 2 years ago by aday. Opened 2 years ago by cereal-lava-planet.

I tested here (Fedora 36 Workstation) by scheduling an update in the next boot when my laptop's battery was at 12%. After entering the LUKS password, I removed the AC adapter and the offline updates started to occur without any warning.

This can be bad if the AC adapter has poor contact or if the power goes out.

I'm clueless where is the appropriate place to report this. I don't know if this issue has to do with dnf, plymouth, etc.


I tested here (Fedora 36 Workstation) by scheduling an update in the next boot when my laptop's battery was at 12%.

It's a little misleading because we don't schedule updates for the future: your computer reboots into the update immediately. And this option is only available if (a) you have sufficient battery remaining, or (b) you are charging. If you decide to unplug after choosing to update... well, there's not really anything we can do about that. Don't do that?

If you decide to unplug after choosing to update...

I didn't mention that case, but it could the avoid the user causing a breakage.
The other two cases that concerns me more are: the AC adapter stop working and a power outtage happening.

Once we've started doing the update, there's no backing out. However, we could presumably check the power situation immediately prior to starting to install, and abort if there's no AC and the battery level is low.

I don't think that this issue needs to be tracked by the working group, but I'm not sure which upstream component it would be best filed against.

I don't think that this issue needs to be tracked by the working group, but I'm not sure which upstream component it would be best filed against.

I think it would have to be PackageKit. GNOME has already done all it can to prevent this from happening by refusing to trigger an offline update on low battery unless you are charging. This issue as about the case where the user yanks the cable after triggering the update but before the update installation actually begins. I think only PackageKit can detect that.

Thanks @catanzaro .

@cereal-lava-planet , please report directly to PackageKit. Thanks!

Metadata Update from @aday:
- Issue close_status updated to: Deferred to upstream
- Issue status updated to: Closed (was: Open)

2 years ago

Thinking of, I'm unsure if there is a solution for this, because the power can be interrupted in the middle of the process too. I'll file a bug report in Plymouth to show a warning that the battery is low.

Login to comment on this ticket.

Metadata