When running on battery power, update manager creates spooky, confusing messages

Bug #494772 reported by Rich Jones on 2009-12-09
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Low
Mohamed Amine Ilidrissi
Software Updater
Fix Released
Undecided
Unassigned
Ubuntu Netbook Remix
Undecided
Unassigned
update notifier
Invalid
Undecided
Unassigned

Bug Description

This bug is a consequence of https://bugs.edge.launchpad.net/bugs/377697

Example (wish I took a screenshot, oops):

Running UNR 9.10
I open my computer on battery power and begin surfing the internet in Firefox
After a few minutes of browsing the internet, a message box appears. It says simply

'You are running on battery power. Do you still want to continue?'

There is no indication that this message has anything to do with update manager. I think this is part of firefox - I click yes.

<https://wiki.ubuntu.com/SoftwareUpdateHandling#alert>: "The secondary text for the alert should consist of one or more list items, depending on the exact situation ... Whenever the computer is running on battery, there should be an item (fixing bug 484249 and bug 494772) with exactly the same battery icon as the power status menu is currently using for the battery, and the text: “It’s safer to connect the computer to AC power before installing.” (fixing bug 426708)."

Related branches

Rich Jones (richwjones) wrote :

It happened to me again, but I caught a screenshot this time:

http://imgur.com/HDTEm.png

No indication that this is update-manager!

Rich Jones (richwjones) wrote :

Easy solution

Rich Jones (richwjones) wrote :

Although, to be honest, I think this is clearly a more intelligent solution:

Changed in hundredpapercuts:
status: New → Confirmed
Rich Jones (richwjones) wrote :

So what's the best forum for discussing this behavior?

Vish (vish) wrote :

This doesnt seem like a UNE bug , hence closing it.

Changed in netbook-remix:
status: New → Invalid
Rich Jones (richwjones) wrote :

You didn't answer me.. :(

Rich Jones (richwjones) wrote :

Bump! Bump!

Dylan McCall (dylanmccall) wrote :

The application in charge of running update-manager automatically is update-notifier. May as well stop this issue at its source :)

Changed in update-manager:
status: New → Invalid
Dylan McCall (dylanmccall) wrote :

Well, I got 3/4 through implementing it, then I found that an implementation already exists in update-notifier/src/update.c !
Function is called running_on_battery, but it is commented out (as well as the bit of code that uses it in auto_launch_now. (I wonder if that should really be done before doing update_check, to save battery power).

Anyway, the message is: "disabled because we need more cleverness here in order to cover the case where people always work on battery (and charge overnight)"

It's a good point. I had prematurely marked the update-manager part of this as invalid. In fact, that may be the best place to fit an alternative solution. Perhaps a little notification bar attached to the main window - as opposed to the modal dialogue box - reminding the user that updates consume lots of battery power. A change in the tone of the message makes sense to me, too, since the current one does not explain anything; it just says that the user is on battery, which he/she probably knows.

On the other hand, there's still the nagging thought that we should not perform heavy operations such as checking for updates _in the background_ when the user is on battery without first asking if it is okay. Maybe the Ayatana people have an opinion on this?

Changed in update-manager:
status: Invalid → New
Rich Jones (richwjones) wrote :

Thanks for looking into this!

I hadn't thought about that case (and it is quite a rarity), but of course it should be considered. People who never operate their computer on mains power should have to do their upgrades manually (Does the Red-Arrow indicator still appear in Ubuntu Desktop? I use UNR and I don't think it does), and it should warn them that doing that on battery power might not be a good idea. For rest of the 99.9% of us who use laptops with and without power, we should only be notified that there are updates WHEN we are charging.

For this reason, patch #1 to add a title to the dialog box should be applied, and there should be some small reorganizations of code as well so that users on laptop power CAN update, but are not prompted to do so automatically.

Dylan McCall (dylanmccall) wrote :

I agree that Patch #1 solves most of the problem, I don't think a title alone is going to do it. Going back to the tone of the message, I think right now we're describing a serious problem ("no updates for you!") ... and that's it.

David Siegel's mockup[1] from bug #517732 is getting closer, I think...
[1] http://launchpadlibrarian.net/38800803/Update%20on%20Battery%20Warning.png

...but this thing is still appearing completely out of the blue! I like how Palm does this: "You have a system update, and it will download over the next week." Relaxed, simple, not saying "do-this-now-or-your-phone-explodes!"

In the current case, this updater message reveals itself at a very specific point in time, producing a particular urgency that isn't necessary, or (by its own admission) a remotely good idea.

Instead of an updater exploding out of nowhere and saying "hey, you needed to to install updates but you're on battery, so you can't! (Unless you really want me to)", it should say, in a nice box that appears behind everything, "by the way, there are updates; I suggest you install them next time the computer is on AC power" (or even "I will install them next time the computer is plugged in" if update-notifier can do that). The difference is in whether we talk to the user with solutions or problems.

Rich Jones (richwjones) wrote :

Why does it need to be a dialog box?

Could we use Notify-OSD for this? Seems like a perfect application of Notify-OSD.

So - if running on battery power, send a Notify-OSD message saying "Your system requires updates. Please do this when your computer is plugged in by using the Update Manager."

Otherwise, update notifications should be the same as a normal desktop.

Notify-osd is a great mechanism for alerting the user to new emails,
instant messages, and other events. Informing the user that they could
potentially ruin their system by installing updates on a battery
that's running low is /definitely/ important enough to be displayed in
a solid, modal dialog window.

Rich Jones (richwjones) wrote :

But instead you're suggesting that we randomly pop into the middle of their screen and in fact PRESENT THEM WITH A BUTTON with which to 'ruin their systems.'

I'm simply saying that we let them know that updates are available, and that they should do it manually with AC power. This is to satisfy the 1% scenario of people who only use their laptops away from the base - everybody else will receive the normal notifications when they are on AC power as well.

Matthew Paul Thomas (mpt) wrote :

Yesterday, responsibility for specifying the software updates design was shunted back to me. So, here's the relevant part of my specification-in-progress:
------------
Whenever the computer is running on battery, there should be an item [of text at the bottom of the main updates window, just above the “Cancel” and “Install Now” buttons] (fixing bug 484249 and bug 494772) with exactly the same battery icon as the power status menu <https://wiki.ubuntu.com/PowerStatusMenu> is currently using for the battery, and the text: “It’s safer to connect the computer to AC power before installing.” (fixing bug 426708). The item should automatically appear or disappear (with the alert resizing appropriately) if the computer starts or stops using battery while the alert is open (fixing bug 426710).
------------

This way, the battery warning wouldn't interrupt anything, because it's not a separate alert. But Update Manager would still appear automatically, even if you were using battery at the time. I'm interested in suggestions of a way of delaying automatic opening if your computer happens to be using battery, without starving people of updates when they *only* ever run their computer on battery. (And without adding more settings!) In the meantime, maybe someone would like to implement what I've written above to see if it looks and feels reasonable.

levk (lev-kuznetsov) wrote :

I'm one of those people always running on a huge battery and charging overnight. On Ubuntu 9.10 update doesn't pop any kind of window it just doesn't do updates on battery period. I don't think that's ideal, but it's OK, it's better than having a window annoy me every other day. If the chosen solution is popping a window, I'd really like a checkbox to remember my answer and never ask again. Alternatively I'm perfectly content with editing a config file.

Just so I'm being clear I'm fine with it installing updates while on battery power as I imagine would a number of people running on battery only because chances are they made their purchasing decisions accordingly.

Anzenketh (anzenketh) on 2010-02-27
tags: added: patch
tekstr1der (tekstr1der) wrote :

What is the current status of this? I am no longer getting any message or indication when running update-manager on battery power. Is this by design? I want to make sure it's not an issue with the switch from devkit-power to upower.

description: updated
Changed in update-manager:
status: New → Confirmed
Vish (vish) on 2010-06-21
Changed in hundredpapercuts:
importance: Undecided → Low
status: Confirmed → Triaged
Miguel Gaspar (ghaspias) wrote :

My 2 cents:

I suppose we are talking about defaults. Provided the configuration options aren't removed...
We want to be on the safe side, because:
- tech-savvy users are responsible for their (informed) choices (unless we induce them in error by way of bad phrasing / erroneous info / etc ), they may change the default behaviour if that isn't made too difficult.
- regular users who need to do some (light) administrative tasks rely on the system to help them.

So, if we really consider a good practice (or a necessary evil) to open a window out of nowhere in front of whatever the user is doing, because he must know that crucial updates should be applied, that window should explain in clear wording why it is so, and that's all.
It isn't very plausible that an ordinary user will want to pick which updates to install...
If, on the other hand, I consider myself an advanced user, I will dismiss that window and open up update-manager / synaptic / aptitude / terminal, and take proper action.

I would sugest one of two approaches:
1. Continue to use the automatic, behind the scene check and prompt for install, but use a simplified update manager window:

"There are critical updates available for your system. It is highly recommended that at least the security-related updates be applied. This may take some time (insert a reasonable estimate?) and should not be interrupted.
[Please note that you are now running on battery, with xx:xx estimated time remaining.]
You can learn more about updating your system in the documentation section [link to proper documentation section, so the users won't stay dumb forever]
(Show me more info) (Install later, when on AC power) (Install the security updates now)"

2. Just don't do update checks while on battery (and also perhaps while using mobile broadband, or... - there are plenty of reasons for not doing that automatically...), but put up an icon in the notification area, along with a notification, to alert that the system would like to check for updates. Periodically, we might even put up a dialog:

"It is advisable to periodically check for updates to your software. This check will happen automatically when you are connected to the Internet, but is disabled when running on battery.
The last time you checked was ... days ago. Do you want to check now?"

Leo (leorolla) on 2010-07-07
Changed in update-notifier:
status: New → Confirmed
Changed in update-manager:
status: Confirmed → Invalid
Leo (leorolla) wrote :

The patch from post #2 is really urgent.
It costs nothing, it can't possibly cause any harm.

I like Miguel's approaches. One could actually mix both.

The biggest problem: some computers only have internet when they are on battery.
(Examples: a user doesn't have internet at home, or the convenient place to use the computer is not the convenient place to charge the computer, etc.)

So, a solution could be:

- Always download updates in the background without asking.
- Check daily. Limit the speed to save bandwidth.
- Install the security updates without asking, but never a big bunch at a time, as breaking the update causes problems.
- For release updates I don't really have a suggestion.

The idea is to mitigate the issue a little bit by downloading when there is internet and installing when there is power. Just downloading is not really dangerous, even on battery.

Changed in update-manager:
status: Invalid → Confirmed
Changed in update-notifier:
status: Confirmed → Invalid
Changed in update-manager:
status: Confirmed → In Progress
Changed in hundredpapercuts:
assignee: nobody → Mohamed Amine IL Idrissi (ilidrissi.amine)
status: Triaged → In Progress
Vish (vish) on 2010-08-07
Changed in hundredpapercuts:
milestone: none → maverick-round-8-potpourri
Vish (vish) wrote :

This bug was fixed in the package update-manager - 1:0.142.6

---------------
update-manager (1:0.142.6) maverick; urgency=low

  [ Mohamed Amine IL Idrissi ]
  * Implemented battery and network alerts directly in the main window.
    LP: #484249, #426708, #426710, #494772

  [ Michael Vogt ]
  * UpdateManager/Core/MyCache.py:
    - support looking for the changelog by source version
      (and add tests)
  * UpdateManager/Core/utils.py:
    - fix crash when reading the synaptic config (LP: #614170)
 -- Michael Vogt <email address hidden> Tue, 10 Aug 2010 15:16:27 +0200
----------
We didnt have an Ubuntu task open hence the lp janitor dint auto-close this bug.

Changed in update-manager:
status: In Progress → Fix Released
Changed in hundredpapercuts:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers