the phone should switch itself off before completely draining battery

Bug #1317860 reported by Michael Zanetti
114
This bug affects 23 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Alejandro J. Cura
indicator-power (Ubuntu)
Invalid
Critical
Xavi Garcia
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Xavi Garcia
upower (Ubuntu)
Invalid
High
Xavi Garcia

Bug Description

the phone should switch itself off at around ~5% remaining battery.

This is to preserve a little battery for use cases such as:

* turn it back on once or twice for urgent short phone calls
* prevent the battery from going into a state where it can't be charged any more
* have enough power to turn itself on again and trigger an alarm

<https://wiki.ubuntu.com/Power#auto-off>: "The device should hibernate (PC) or power off (phone/tablet) if both of these things are true: * there is less than 2% battery remaining * there has been more than 3% battery remaining at some point since the last time the device hibernated or powered off."

Related branches

Michał Sawicz (saviq)
Changed in indicator-power:
status: New → Confirmed
Changed in indicator-power:
assignee: nobody → Matthew Paul Thomas (mpt)
Revision history for this message
Julien Funk (jaboing) wrote :

Worth linking back to the following related defect: https://bugs.launchpad.net/indicator-power/+bug/1317858

tags: added: avengers-3
Daniela Ferrai (dferrai)
Changed in ubuntu-ux:
assignee: nobody → Matthew Paul Thomas (mpt)
Ruby Hatem (rh-r)
Changed in indicator-power:
assignee: Matthew Paul Thomas (mpt) → nobody
Changed in ubuntu-ux:
assignee: Matthew Paul Thomas (mpt) → John Lea (johnlea)
status: New → Fix Committed
summary: - the phone should switch itself off before completely draining battery
+ [system] the phone should switch itself off before completely draining
+ battery
John Lea (johnlea)
description: updated
Changed in indicator-power:
assignee: nobody → Ricardo Mendoza (ricmm)
Changed in indicator-power (Ubuntu):
status: New → Confirmed
Revision history for this message
Oliver Grawert (ogra) wrote : Re: [system] the phone should switch itself off before completely draining battery

android does warn when it goes below 15% ... i wonder if we should not do teh same here ...

Charles Kerr (charlesk)
Changed in indicator-power:
assignee: Ricardo Mendoza (ricmm) → Charles Kerr (charlesk)
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Not Fix Committed yet because it's not mentioned in the spec.

Changed in ubuntu-ux:
importance: Undecided → Medium
assignee: John Lea (johnlea) → Matthew Paul Thomas (mpt)
status: Fix Committed → Confirmed
Changed in ubuntu-ux:
status: Confirmed → Triaged
Revision history for this message
Charles Kerr (charlesk) wrote :

Needs spec documentation.

MPT, please change these statuses to "Triaged" once the spec defines this behavior.

Changed in indicator-power:
status: Confirmed → Incomplete
Changed in indicator-power (Ubuntu):
status: Confirmed → Incomplete
assignee: nobody → Charles Kerr (charlesk)
Revision history for this message
Matthew Paul Thomas (mpt) wrote :
Changed in indicator-power:
status: Incomplete → Triaged
no longer affects: indicator-power
Changed in indicator-power (Ubuntu):
status: Incomplete → Triaged
Changed in ubuntu-ux:
status: Triaged → Fix Committed
description: updated
description: updated
summary: - [system] the phone should switch itself off before completely draining
- battery
+ the phone should switch itself off before completely draining battery
tags: added: power-bugs
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

upower already has logic to detect at 10%, 3% and 2%

Changed in canonical-devices-system-image:
assignee: nobody → Alejandro J. Cura (alecu)
importance: Undecided → Critical
milestone: none → ww02-2016
status: New → Confirmed
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
milestone: ww02-2016 → ww08-2016
Revision history for this message
Charles Kerr (charlesk) wrote :

It looks like upower should be handling this; it has triggers for hibernation / power off at configured battery percentage.

I'll see if I can figure out why that's not kicking in.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

mzanetti mentions that this bug is critical to him, because every time a frieza device reaches 0% charge he's blocked from further using it because it needs to charge up to some safe value before being able to turn it on.

Changed in indicator-power (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Michael Zanetti (mzanetti) wrote :

It is not limited to frieza. Once you have 3 or 4 developer devices, you will frequently run into this issue. Whenever you need to test something on that particular device, rest assured it wants to be charged for 10 mins before turning on :)

Revision history for this message
David Barth (dbarth) wrote : Re: [Bug 1317860] Re: the phone should switch itself off before completely draining battery

As a FYI : some of those devices may have an IC that allows for NOBATOP
operation. For example, the TI BQ24160 was popular in Android handsets and
has support for such a mode.

On Mon, Feb 15, 2016 at 2:28 PM, Michael Zanetti <
<email address hidden>> wrote:

> It is not limited to frieza. Once you have 3 or 4 developer devices, you
> will frequently run into this issue. Whenever you need to test something
> on that particular device, rest assured it wants to be charged for 10
> mins before turning on :)
>
> --
> You received this bug notification because you are a member of Indicator
> Applet Developers, which is subscribed to indicator-power in Ubuntu.
> https://bugs.launchpad.net/bugs/1317860
>
> Title:
> the phone should switch itself off before completely draining battery
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/canonical-devices-system-image/+bug/1317860/+subscriptions
>

Changed in indicator-power (Ubuntu):
assignee: Charles Kerr (charlesk) → Xavi Garcia (xavi-garcia-mena)
Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

Just to add a note here:

The upower config is NOT using percentages. It's using the calculated remaining time...

From /etc/UPower/UPower.conf

# Policy for warnings and action based on battery levels
#
# Whether battery percentage based policy should be used. The default
# is to use the time left, change to true to use the percentage, which
# should work around broken firmwares.
# default=false
UsePercentageForPolicy=false

Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

Alright, so I did some tests and here's what I needed to change ON THE PHONE.

UsePercentageForPolicy=true
CriticalPowerAction=PowerOff

The default critical power action is: HybridSleep

Those changes work fine on the phone, but upower has only 1 configuration file, there is no different configuration for the desktop and the phone.

If we change the values like I noted above this is going to affect the desktop.

I think we should create a separated config package for each device config.

Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

BTW,

we could leave UsePercentageForPolicy=false and use the time estimation instead, but on the phone we need to change the action to PowerOff as HybridSleep is not supported.

Changed in indicator-power (Ubuntu):
status: Triaged → Invalid
Changed in upower (Ubuntu):
assignee: nobody → Xavi Garcia (xavi-garcia-mena)
importance: Undecided → High
Changed in canonical-devices-system-image:
importance: Critical → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in upower (Ubuntu):
status: New → Confirmed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

If we want to avoid changes the upower package itself, we could add an override using the environment variable
UPOWER_CONF_FILE_NAME
the providing a modified file in the ubuntu-touch-session package such as UPower.override

Changed in canonical-devices-system-image:
milestone: ww08-2016 → 11
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

It was further suggested to make the changefrom comment #15 in ubuntu-touch-settings

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in upower (Ubuntu):
status: Confirmed → Invalid
Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
assignee: nobody → Xavi Garcia (xavi-garcia-mena)
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
no longer affects: ubuntu-ux
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.