update manager should warn about laptop running on battery when installing big updates
Bug #377697 reported by
Przemek K.
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
One Hundred Papercuts |
Fix Released
|
Undecided
|
Unassigned | ||
update-manager (Ubuntu) |
Fix Released
|
Wishlist
|
Michael Vogt |
Bug Description
Binary package hint: update-manager
update manager should warn about laptop running on battery when installing big updates.
mac os x' update manager does that.
that would be an improvement in usability - the laptop wouldn't run out of power when doing dist-upgrade or downloading and installing >100MB.
Changed in update-manager (Ubuntu): | |
importance: | Undecided → Wishlist |
Changed in hundredpapercuts: | |
status: | New → Triaged |
Changed in hundredpapercuts: | |
milestone: | none → round-2 |
Changed in update-manager (Ubuntu): | |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
status: | New → Triaged |
Changed in update-manager (Ubuntu): | |
assignee: | Canonical Foundations Team (canonical-foundations) → Michael Vogt (mvo) |
Changed in update-manager (Ubuntu): | |
status: | Triaged → In Progress |
Changed in hundredpapercuts: | |
status: | Triaged → Fix Committed |
Changed in hundredpapercuts: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
That's a good idea. It might be good if this was at a low enough level in apt that aptitude, and even apt-get, could prompt, too. (or just warn if non-interactive).
Download speed is very hard to predict, and could take a _really_ long time. So it would be smart to check battery status after download but before install. Alway warn at that point if you're on batteries, but if there is lots of battery left and few updates, don't hold up the process by waiting for user input.
A good heuristic might be: Get time until battery-critical shutdown (from ACPI on PC hardware...). Estimate update install time very conservatively (in case of slow discs and/or competing I/O load) as 5s per package + 10s per uncompressed MB. (made-up numbers, not based on any measurements.) Some packages have time-consuming post-install scripts; another reason for a conservative estimate.
If install time > (battery - 10min), wait for user confirmation. This is after download. But always warn when on battery before starting to download, in case the user goes away right after starting the download.
The extra heuristics for forcing user confirmation before actually installing when on battery may be excessive, but a forced shutdown during an update could cause a really big problem. (most laptops support suspend or hibernate, but some may resort to shutdown -h now.)