Repowerd

repowerd is Ubuntu Touch’s power management daemon and handler for common functionality like Double-Tap-To-Wake. Like many other components of the Operating System it can be configured for the device in its deviceinfo.yaml configuration, including quirks that are specific to a certain set of devices, SoCs, etc.

Script-based performance booster

repowerd features an interesting performance boost mechanism called the ScriptPerformanceBooster. This performance booster allows a port maintainer to set CPU and GPU frequency scaling, adjust suspension behavior on devices without Opportunistic Autosuspend, and further kernel tweaks based on screen-on state and interactivity. This allows a device maintainer to implement sophisticated performance boosting strategies, enable suspension of user processes and services, and more. For example, this is also used on the JingPad A1 to implement freezing and thawing of user processes when the device is supposed to go into suspension, which it cannot natively do on its kernel with vendor-provided drivers.

Vista general de totes les claus reactivades:

<devicename>:
  BacklightSysfsPath: </path/to/the/device>
  DoubleTapToWake:
    - </path/to/node>|<enable>|<disable>
    - ...

Dispositiu

Clau

Descripció

Valor(s)

Retroil·luminacióSysfsPath

Camí del fitxer al dispositiu de retroil·luminació

Camí del fitxer

DoubleTapToWake

Configuració per a commutar DT2W

Llista de cadenes amb format: <camí><activa> <desactiva>

RepowerdScriptPerfBoostLowPower

Command to execute when going into suspension

A regular binary or script executed via system(value), like: /opt/halium-overlay/boost-script.sh --low-power

RepowerdScriptPerfBoostScreenOff

Command to execute when turning screen off

Similar, like: /opt/halium-overlay/boost-script.sh --screen-off

RepowerdScriptPerfBoostSustained

Command to execute for setting screen-on policy

Similar, like /opt/halium-overlay/boost-script.sh --sustained

RepowerdScriptPerfBoostInteractive

Command to execute for user input/interactivity pulses

Similar, like /opt/halium-overlay/boost-script.sh --interactive

Exemples

Dispositiu sample utilitzant:

  • Camí personalitzat del sysfs per a desactivar la detecció automàtica del camí que controla la retroil·luminació

  • Configuració de doble toc a despertar (DT2W) per permetre el doble toc per despertar el dispositiu, especificant dos camins potencials
    • Es permet especificar múltiples entrades, s’eliminaran camins no vàlids o no existents

  • ScriptPerformanceBooster set up to run scripts on screen-on and -off events

Fitxer de configuració:

$ cat /etc/deviceinfo/devices/sample.yaml
sample:
  BacklightSysfsPath: /sys/class/backlight/panel0-backlight
  DoubleTapToWake:
    - /proc/touchpanel/double_tap_enable|1|0
    - /sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input1/wake_gesture|on|off
  RepowerdScriptPerfBoostScreenOff:
    - /opt/halium-overlay/perf-scripts/screen-off
  RepowerdScriptPerfBoostSustained:
    - /opt/halium-overlay/perf-scripts/sustained