Closed Bug 825798 Opened 12 years ago Closed 12 years ago

Device does not power down voluntarily when battery is too low

Categories

(Firefox OS Graveyard :: Gaia::System, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
B2G C4 (2jan on)
blocking-basecamp +

People

(Reporter: m1, Assigned: alive)

Details

(Whiteboard: [cr 436792])

Attachments

(1 file)

It has been observed that the device is subjected to an uncontrolled shutdown when the battery is too low to sustain normal operations.  When battery level is too low, Gaia should initiate a system shutdown to prevent data loss and a poor UX that may result from the system /crashing/ due to insufficient power. 

Note that for certain devices a system shutdown once this threshold is met should still occur even when external power is present, as certain operating states can have power requirements that exceed what external power can provide and the device will brown out.

Perhaps system/js/battery_manager.js is one place where this logic could live?
Triage: BB+ for potential blocker for partner
blocking-basecamp: ? → +
Assignee: nobody → alive
Assignee: alive → rexboy
Oops.  I should have the page refreshed before taking.  Assigning back to Alive.
Assignee: rexboy → alive
AFAIK, some android devices would shut down at 2% and some are 1%.
Let's do 2% first and don't consider the charging status according to description.
(In reply to Alive Kuo [:alive] from comment #3)
> AFAIK, some android devices would shut down at 2% and some are 1%.
> Let's do 2% first and don't consider the charging status according to
> description.

don't consider the charging status? i am trying to understand what this mean.
Does it mean that if your battery is 0% ~ 1% and you are charging your device while booting up the device (and if the battery is not yet 2% after boot into the OS), it shuts down again?
(In reply to Joe Cheng [:jcheng] from comment #4)
> don't consider the charging status? i am trying to understand what this mean.
> Does it mean that if your battery is 0% ~ 1% and you are charging your
> device while booting up the device (and if the battery is not yet 2% after
> boot into the OS), it shuts down again?

My S3 does so. According to :m1 this is reasonable because we don't know if the charging currency is enough for the device to consume. The user should keep charging for a while to restart the phone.
(In reply to Alive Kuo [:alive] from comment #5)
> 
> My S3 does so. According to :m1 this is reasonable because we don't know if
> the charging currency is enough for the device to consume. The user should
> keep charging for a while to restart the phone.

Ok got it! sound good
Patch v1:
1. Shutdown after booting if battery.level <= 0.02
2. Shutdown after level changing if battery.level <= 0.02

How do I test:
Modify the value to 0.82 and play a video to see what happened.
Attachment #697348 - Flags: review?(timdream+bugs)
Comment on attachment 697348 [details]
https://github.com/mozilla-b2g/gaia/pull/7277

r=me.

I am not sure if the power off code should be put into it's own file or be moved to somewhere else, but let's not dealing that here.
Attachment #697348 - Flags: review?(timdream+bugs) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: