Closed Bug 979130 Opened 11 years ago Closed 11 years ago

[System app] Turn wifi into power save mode while screen off with wifi lock held.

Categories

(Firefox OS Graveyard :: Gaia, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S6 (25apr)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: chucklee, Assigned: chucklee)

References

Details

(Keywords: perf, Whiteboard: [caf priority: p1][c=power p= s=2014.04.25 u=] [cr 589304])

Attachments

(1 file)

Currently holding wifi lock by |navigator.requestWakeLock('wifi')| will keep wifi up while screen is off, which might consume much battery.
Keep wifi up and turn into power save mode by |wifiManager.setPowerSavingMode()| could save more pattery.
Also we are trying to handle the wifi lock state change while screen is off.

Note that holding wifi lock doesn't imply holding CPU lock.
Attached file Pull Request (deleted) —
1. Enable wifi power save mode instead of turning wifi off while screen is off and wifi wake lock is held. If wifi wake lock is held after wifi is turn off by screen off, it will enable wifi and turn it into power save mode.
2. Disable wifi power save mode while screen on if its power save mode is enabled by 1.
3. Add CPU lock to protect whole process.
4. Clear timeout after cpu lock is unlocked, so it won't be called again.
Attachment #8385923 - Flags: feedback?(alive)
Comment on attachment 8385923 [details]
Pull Request

Please add unit test for what you added,
especially to make sure all cpu wake lock is unlocked.
Attachment #8385923 - Flags: feedback?(alive) → feedback+
Comment on attachment 8385923 [details]
Pull Request

1. Fix unit test error.
2. Add unit test for wifi wake lock.
Attachment #8385923 - Flags: review?(alive)
Comment on attachment 8385923 [details]
Pull Request

Let's land on master next week.
Attachment #8385923 - Flags: review?(alive) → review+
Master: https://github.com/mozilla-b2g/gaia/commit/9e1b16f8a313bbdc2e9441ba07f620716e5fdd58
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.5 S1 (9may)
Keywords: perf
OS: Windows 7 → Gonk (Firefox OS)
Priority: -- → P2
Hardware: x86_64 → ARM
Whiteboard: [c=power p= s=2014.04.25 u=]
Can we uplift this to v1.4 please.  This has been raised as a significant Wifi power issue by test folks since v1.3.  Now that we have a fix, we shouldn't wait for the next train given that we have test folks engaged now to validate the fix.
blocking-b2g: --- → 1.4?
Whiteboard: [c=power p= s=2014.04.25 u=] → [c=power p= s=2014.04.25 u=] [cr 589304]
1.4+ for Wifi betterness
blocking-b2g: 1.4? → 1.4+
Target Milestone: 2.0 S1 (9may) → 1.4 S6 (25apr)
Whiteboard: [c=power p= s=2014.04.25 u=] [cr 589304] → [caf priority: p1][c=power p= s=2014.04.25 u=] [cr 589304]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: