User:Magick777/Opportunistic Power Saving

(Maintain phone in GSM mode by default when on battery)
(Disable WiFi when not needed)
 
(19 intermediate revisions not shown)
Line 1: Line 1:
= Opportunistic Power Saving =
= Opportunistic Power Saving =
 +
 +
This page aims to set forth a design for opportunistic power saving on the Nokia N900. Existing power-saver scripts and applets allow the user to toggle settings manually and much has been written about automation of certain events through DBUS. This page is an attempt to tie it all together.
 +
 +
== CPU frequency scaling / underclocking ==
 +
 +
This is already documented on the [[Overclocking]] page and is my starting point for building an opportunistic power saving script, based on phone lock / unlock. Credits and thanks to Fecn for getting us this far.
== Maintain phone in GSM mode by default when on battery ==
== Maintain phone in GSM mode by default when on battery ==
 +
 +
=== Status ===
 +
 +
* Switch to 2G on lock done, works for me, needs review for more blockers
 +
* Switch back to 3G works for browser but needs some work
 +
** Move from detecting browser launch to a generic application launch handler
 +
 +
=== Function specification ===
* Switch to GSM mode opportunistically when all seems to be quiet
* Switch to GSM mode opportunistically when all seems to be quiet
-
** trigger on phone locked
+
** trigger analysis on phone locked
-
** check for blockers
+
** first check for blockers, most common first
-
*** don't change anything if we're on a call
+
*** don't change anything if we're in the desired radio mode
-
*** don't change anything if we're in the target radio mode
+
*** don't change anything if we're on charge and not saving battery
-
*** don't change anything if the user may still want 3G
+
*** don't change anything if we're on a GSM call
-
*** don't change if we have blocker applications, connections or traffic
+
*** don't change anything if we have blocker applications or connections running
-
**** but blocker applications or traffic not applicable if we're on WiFi
+
**** but blockers don't apply if we're on WiFi
-
** cooling off period during which a device unlock cancels radio switch
+
**** if we're on 3G then check for following blockers
-
** perform final sanity checks
+
***** location-daemon active (GPS in use) NOT DONE YET
 +
***** SIP / Skype / GTalk calls (VoIP in use) NOT DONE YET
 +
*** don't change anything if the user didn't want the phone to lock anyway
 +
**** cooling off period during which device unlock cancels radio switch
 +
** perform any final sanity checks
*** recheck that we're still not on a call after our cooling off period
*** recheck that we're still not on a call after our cooling off period
** then make the switch to GSM mode
** then make the switch to GSM mode
-
* Switch to dual mode or explicit 3G when something requires it
+
 
-
** trigger on events
+
* Switch automatically to 3G or dual mode (which?) when something requires it
-
*** launch browser
+
** no sense in triggering on device unlock, wait until needed
-
*** open e-mail account
+
** check for blockers
-
*** launch other application
+
-
** but test the following
+
-
*** don't change anything if we're on a voice call
+
-
*** don't change anything if we're already using WiFi
+
*** don't change anything if we're already in the target radio mode
*** don't change anything if we're already in the target radio mode
 +
*** don't change anything if we're already using WiFi
 +
*** don't change anything if we're on a voice call
 +
** trigger on events that may require a data connection i.e.
 +
*** launch pplication (via hildon desktop) - which apps?
 +
**** browser
 +
**** SIP client
 +
**** maps
 +
*** set presence to Online
 +
*** open Modest e-mail account
 +
*** access Internet radio stream
 +
 +
== Disable WiFi when not needed ==
 +
 +
=== Take down WiFi when not needed ===
 +
 +
 +
 +
=== Restore WiFi ===
 +
 +
There are few circumstances in which I want the phone to decide for itself to reenable WiFi, however it would be helpful to do so when I arrive home and put it on charge.
 +
 +
So we need to
 +
 +
* trigger when the phone is placed on charge
 +
* enable WiFi interface
 +
* attempt autoconnect to home wireless network
 +
* consider whether to disable WiFi if not successful in reaching home network

Latest revision as of 00:57, 21 July 2010

Contents

[edit] Opportunistic Power Saving

This page aims to set forth a design for opportunistic power saving on the Nokia N900. Existing power-saver scripts and applets allow the user to toggle settings manually and much has been written about automation of certain events through DBUS. This page is an attempt to tie it all together.

[edit] CPU frequency scaling / underclocking

This is already documented on the Overclocking page and is my starting point for building an opportunistic power saving script, based on phone lock / unlock. Credits and thanks to Fecn for getting us this far.

[edit] Maintain phone in GSM mode by default when on battery

[edit] Status

  • Switch to 2G on lock done, works for me, needs review for more blockers
  • Switch back to 3G works for browser but needs some work
    • Move from detecting browser launch to a generic application launch handler

[edit] Function specification

  • Switch to GSM mode opportunistically when all seems to be quiet
    • trigger analysis on phone locked
    • first check for blockers, most common first
      • don't change anything if we're in the desired radio mode
      • don't change anything if we're on charge and not saving battery
      • don't change anything if we're on a GSM call
      • don't change anything if we have blocker applications or connections running
        • but blockers don't apply if we're on WiFi
        • if we're on 3G then check for following blockers
          • location-daemon active (GPS in use) NOT DONE YET
          • SIP / Skype / GTalk calls (VoIP in use) NOT DONE YET
      • don't change anything if the user didn't want the phone to lock anyway
        • cooling off period during which device unlock cancels radio switch
    • perform any final sanity checks
      • recheck that we're still not on a call after our cooling off period
    • then make the switch to GSM mode


  • Switch automatically to 3G or dual mode (which?) when something requires it
    • no sense in triggering on device unlock, wait until needed
    • check for blockers
      • don't change anything if we're already in the target radio mode
      • don't change anything if we're already using WiFi
      • don't change anything if we're on a voice call
    • trigger on events that may require a data connection i.e.
      • launch pplication (via hildon desktop) - which apps?
        • browser
        • SIP client
        • maps
      • set presence to Online
      • open Modest e-mail account
      • access Internet radio stream

[edit] Disable WiFi when not needed

[edit] Take down WiFi when not needed

[edit] Restore WiFi

There are few circumstances in which I want the phone to decide for itself to reenable WiFi, however it would be helpful to do so when I arrive home and put it on charge.

So we need to

  • trigger when the phone is placed on charge
  • enable WiFi interface
  • attempt autoconnect to home wireless network
  • consider whether to disable WiFi if not successful in reaching home network