fenix icon indicating copy to clipboard operation
fenix copied to clipboard

Enable Battery Saver settings

Open bbinto opened this issue 7 years ago • 14 comments

This is about packaging existing features that help users save battery.

User Story

As a user, I want to be able to enable battery saver mode in my browser, so I can browse for longer without having to charge my phone.

Requirements

Surface a battery saver mode that includes the following battery saving features: -Block Trackers -Disable media autoplay -Enable dark theme -Enable dark mode (webpage) -Auto Reader Mode (when available) Later: -Lower Image Quality -Throttle Streaming Bandwidth (use lower quality video streams)

Acceptance Criteria

  • I can enable battery saving mode (enabling all features)
  • I can individually toggle off each feature

image

┆Issue is synchronized with this Jira Task

bbinto avatar Jan 23 '19 15:01 bbinto

@bbinto Can we reference the ideas we previously talked about? I don't know where to find those. Maybe @shorlander knows?

st3fan avatar Jan 24 '19 00:01 st3fan

@st3fan this is the list I have of things we have discussed that could potentially create battery savings:

  • Block Ads
  • Block Trackers
  • Disable Autoplay
  • Reader Mode as Default
  • Dark Mode (Theme)
  • Lowering Image Quality
  • Throttle Streaming Bandwidth (use lower quality video streams)

There was also some discussion around things we might not being optimizing on the platform side because we haven't been thinking about them primarily from an energy saving perspective. This included some discussion around maybe more aggressively caching things to avoid using the radio.

shorlander avatar Jan 24 '19 14:01 shorlander

I guess I misunderstood the feature based on older discussions. We'd mentioned removing native apps and replacing them with PWAs or web apps. Also, we seemed to indicate we'd somehow measure the benefit of various steps, which is tremendously hard on Android.

The list you mention doesn't seem too difficult, but there's the overhead of keeping extra code branches across the app. We could probably handle this type of configuration with the component architecture we have planned-- the same way we're handling layout A/B experiments.

colintheshots avatar Jan 24 '19 15:01 colintheshots

This includes the UI to enable it, the individual functionalities should be split into different tickets

bbinto avatar Jan 25 '19 17:01 bbinto

Checklist

  • [ ] Adblocking: #96
  • [ ] Block trackers: #216 (child of this)
  • [ ] Disable autoplay: #255
  • [ ] Reader mode: #74
  • [ ] Dark mode: #208, #252
  • [ ] Lower image quality: #253
  • [ ] Throttle video: #254

sblatz avatar Jan 25 '19 17:01 sblatz

Some suggestions on power saving

  • Reduce frame rate

I think animating, scrolling and flinging use quite a lot of CPU power (GPU in the case of WebRender). You could reduce layout.frame-rate to 30 fps. (I think Firefox Desktop is talking about doing this on low power machines but to speed things up not save battery???).

IIRC my previous Sony Xperia phone had "Stamina" mode which I think downclocked the GPU and limited the frame rate, on Android native animations at least. It got quite janky.

  • Downclock CPU cores??

A guess but...

Most phone CPUs have some kind of big.LITTLE architecture. The big cores will likely use more energy for a given task than the LITTLE cores, but will do the task faster. Is it possible to force a phone to use only its LITTLE cores for page load, JS etc? Even with no big.LITTLE, energy consumption should drop somewhat with a bit of downclocking, so e.g. a CPU limited to say 1500 MHz might use a bunch less energy than clocked right up to 2000 MHz.

For example, you might see 30% longer page loads by doing this, but get but 20% power saving. Or something. No idea if it's practical.

My Galaxy S7 has a power saving mode which allegedly reduces the CPU speed.

  • Reduce screen resolution

Doubt it's possible but again GPU workload could be reduced by forcing the phone to use a lower resolution. I doubt you can do this app by app, it's probably a system wide setting. Again my Galaxy S7 has a power saving mode which reduces screen resolution to HD.

No idea if it's any help!

Cheap-Skate avatar Feb 01 '19 16:02 Cheap-Skate

@sblatz this may not have been ready for breakdown, did someone ask you to break it down?

Sdaswani avatar Feb 05 '19 18:02 Sdaswani

@Sdaswani I must have mistakenly thought this was ready when I was looking for work last week (and was directed to breakdown meta tickets). Sorry for any confusion

sblatz avatar Feb 05 '19 19:02 sblatz

No worries @sblatz ! We may want to reverse the breakdown as what we are doing here is still not clear.

Sdaswani avatar Feb 05 '19 19:02 Sdaswani

More investigation here: https://docs.google.com/spreadsheets/d/14oul9bD0cYvYUIJxWjSy6O0MsEsbirsvcA6898EP2iA/edit#gid=749105600

bbinto avatar Mar 14 '19 19:03 bbinto

We decided on March 15 that we will take individual features out of the batter context, add them individually and in the future, in "past MVP" versions, we might bundle it all back together, once we have all instrumentation in place and data gathered to make a claim how these individual features can and will save battery.

More info: https://docs.google.com/document/d/1W2eImtB_7AQQpJOaCwK3w3y0sGV_HOgesP7_k_4EP-E/edit#

bbinto avatar Mar 15 '19 19:03 bbinto

@vesta0 can this get a could or should or must. If it doesn't have a feature request label nor any of those, it gets kicked back to our triage list.

sblatz avatar Sep 24 '19 18:09 sblatz

Thanks for adding back the Feature request label. We need more investigation before building this so it's on the roadmap but not prioritized.

vesta0 avatar Sep 25 '19 02:09 vesta0

As part of https://github.com/mozilla-mobile/fenix/issues/26855 this report is closed. I think we would want to do this differently.

kbrosnan avatar Dec 16 '22 21:12 kbrosnan