UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Battery saving tip

    Scheduled Pinned Locked Moved OS
    battery
    1 Posts 1 Posters 318 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • ikozI Offline
        ikoz
        last edited by

        Battery life is usually less than expected due to unoptimized software and processors clocking too high. On my devices, I set the CPU governor to 'powersave', which reduces power usage but also performance.
        There are multiple scaling governor settings which might not be available on all devices (depends on kernel configuration)

        • performance : high frequency; slightly increased performance and battery consumption
        • powersave : low frequency; reduced performance and superior batter life
        • schedutil : changes according to the scheduler (default on my device)

        This command list the available governors to set for each core (should be more than those I listed above)
        sudo cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
        Report which governors are currently selected for each core:
        sudo cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
        Set the scaling governor to powersave to every core:
        echo "powersave" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

        The commands above do not need mounting root as read-write, any change is reverted on reboot.
        I tried to make an app for configuring these (a while ago) but I had trouble with sudo.

        May the source be with you

        1 Reply Last reply Reply Quote 6
        • First post
          Last post