cpupower-gui profiles and battery life
#1
Code:
sudo apt install cpupower-gui
For most of us on most PP distros install is as easy as that, desoite being built with a PP mobile GUI scaling look in non-mobile apps for the launcher.  https://github.com/vagnum08/cpupower-gui
It makes tweaking CPU use pretty easy, back in the Nokia N900 days this was done more for performance ie:overclocking the CPU and GPU, but on Rockchip and Allwinner I feel like we are more interested in battery life.
With some experimentation I think we can come up with some great battery life saving while still having a phone awake enough to catch phone calls, you can put the GUI in favorites when mobile apps only is enabled to have quick access.  I am enabling balanced mode and will give it a week or so of trial on my Rockchip CPU PPp daily driver phone.
What is nice is with a long press from the desktop you can choose presets without launching the app.
  Reply
#2
I tried running on Optimized mode for about an hour streaming over 4G music on Shortwave app, killed WiFi and BT about 30min in, down to 25% from 90%. Needs some serious tweaking. I am sure it is partly hardware limitations vs ultra streamlined ARM CPUs with ultra refined drivers, partly not running all audio and video through a GPU or audio hardware acceleration, and partly that we are reinventing the wheel again from a desktop OS, party the modem which has its own software/firmware distro working on improvements.
(edit)
I am always shocked to find my resting phone is warm, always shocked to see my PPpro pulling between 5-6 Watts with only Powersupply app running, no WiFi no BT, struggling to charge when connected to a PinePower. Most app and functionality issues are working out for a daily driver but I am always charging.
(edit2)
Surprising, even when I kill both Cortex-A72s (CPU 4 & 5) and 2 of 4 Cortex-A53(0 & 1 of 0-3) it is still pulling 6.5W same draw as when all CPUs are running, even when I kill all RF(4g,WiFi, Bluetooth) it still is pulling 5.8W... IDK.
I feel like I must have something configured wrong or the app doesn't have the permissions to actually do anything, I also killed tor, there has to be a way to save more power than this even if it strangles the system as long as I can switch back to power mode for web and similar.
  Reply
#3
(10-16-2024, 04:53 AM)biketool Wrote: Surprising, even when I kill both Cortex-A72s (CPU 4 & 5) and 2 of 4 Cortex-A53(0 & 1 of 0-3) it is still pulling 6.5W same draw as when all CPUs are running, even when I kill all RF(4g,WiFi, Bluetooth) it still is pulling 5.8W... IDK.
I feel like I must have something configured wrong or the app doesn't have the permissions to actually do anything, I also killed tor, there has to be a way to save more power than this even if it strangles the system as long as I can switch back to power mode for web and similar.

I would assume the biggest power draw is the LCD display. The Pine64 page says the PinePhonePro uses a Himax HX8394 LCD. The Himax HX8394 data sheet, talks about how it can be driven to Low Power or High Speed mode. Makes me wonder if we (the community) can put the LCD in a low power mode. OR maybe it is already in that mode... More research is needed!
  Reply
#4
(10-16-2024, 08:26 AM)mikehenson Wrote:
(10-16-2024, 04:53 AM)biketool Wrote: Surprising, even when I kill both Cortex-A72s (CPU 4 & 5) and 2 of 4 Cortex-A53(0 & 1 of 0-3) it is still pulling 6.5W same draw as when all CPUs are running, even when I kill all RF(4g,WiFi, Bluetooth) it still is pulling 5.8W... IDK.
I feel like I must have something configured wrong or the app doesn't have the permissions to actually do anything, I also killed tor, there has to be a way to save more power than this even if it strangles the system as long as I can switch back to power mode for web and similar.

I would assume the biggest power draw is the LCD display. The Pine64 page says the PinePhonePro uses a Himax HX8394 LCD. The Himax HX8394 data sheet, talks about how it can be driven to Low Power or High Speed mode. Makes me wonder if we (the community) can put the LCD in a low power mode. OR maybe it is already in that mode... More research is needed!

I wish that Megi was still interacting with the community, form what I read his contribs became the sole source for too much of Pinephone development.  I will look for that specific device though in Megi work logs.
  Reply
#5
Since moving back to trixie I now have a working cpupower-gui installed.
I made a new profile and set the 2x A72 and 2 of 4x A53 CPU cores to off and then dialed down the last two A53 CPU cores to peak at 600mhz.

I was on the bus today and it seemed like I had finally gotten my wish of only loosing something no more than 10% battery for an hour of audiobook with the screen dark/locked over wired headphones, while also getting pretty good performance web browsing when using the phone as normal.  I can't be sure how much battery burn truly happened as the % indicator was stuck but still around 10% is massive improvement.

Now I looked at cpupower-gui to get specifics for this post and it appears my custom setting had never taken effect.
Firstly I would love to be able to load the above power settings into the sleep/lock screen script but also wonder if there has been a recent power scaling included in some of the big updates to trixie?
I feel like for the most part those A72s should only activate under serious system load and even then maybe a popup request for ultra-burn power for 30 seconds, since this is a phone not a gaming desktop.
maybe I can write up a script to (untested script no time to play now especially how to specify the 600mhz max cpu) 

ME>>>ALSO MAKE A CPU HOT/NORMAL SCRIPT

Code:
#!/bin/bash
#toggle A53 cores 0 and 1 to 600mhz max and 2-3 to off
sudo cpufreq-set -c 0 --max 600
sudo cpufreq-set -c 1 --max 600
echo 0 | sudo tee /sys/devices/system/cpu/cpu2/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online
#toggle A72 CPUs 4-5 to off
echo 0 | sudo tee /sys/devices/system/cpu/cpu4/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu5/online
toggle the A72s and 2 of 4 A53s offline(the echo 0 kills a core and echo 1 turns it on), have to look around to see how to throttle the CPU max mhz for CPU 0 and 1

If anyone can help with that and show me where the script for screen lock is s I can add these CPUhot and CPUcold scripts

(edit) leaving this for myself for later when I have time to add this to the script, if anyone wants to dump a good freq for CPUs 0 and 1 after they test ing minimum for sleep ad receiving calls, SMS, and running Cozy running a audiobook or playing music leave it in the thread

https://commandmasters.com/commands/cpufreq-set-linux/

Code:
sudo cpufreq-set -c 1 --max max_frequency

    -c 1: CPU core1(number 2 whenstarting with 0).
    --max max_frequency: Sets the upper limit of frequency for CPU 1. max_frequency should be chosen within the range provided by cpufreq-info -l.
to check current cpufreq setting use cpufreq-info.


datasheet

https://opensource.rock-chips.com/images...200323.pdf

page 8-9(when we read the datasheet we see we are missing so many power saving features included in the chipset)
Code:
Eight separate power domains for CPU core system to support internal power switch
and externally turn on/off based on different application scenario
 PD_A72_B0: 1st Cortex-A72 + Neon + FPU + L1 I/D cache of big cluster
 PD_A72_B1: 2nd Cortex-A72+ Neon + FPU + L1 I/D cache of big cluster
 PD_SCU_B: SCU + L2 Cache controller, and including PD_A72_B0, PD_A72_B1,
debug logic of big cluster
 PD_A53_L0: 1st Cortex-A53 + Neon + FPU + L1 I/D Cache of little cluster
 PD_A53_L1: 2nd Cortex-A53 + Neon + FPU + L1 I/D Cache of little cluster
 PD_A53_L2: 3rd Cortex-A53 + Neon + FPU + L1 I/D Cache of little cluster
 PD_A53_L3: 4th Cortex-A53 + Neon + FPU + L1 I/D Cache of little cluster
 PD_SCU_L: SCU + L2 Cache controller, and including PD_A53_L0, PD_A53_L1,
PD_A53_L2, PD_A53_L3, debug logic of little cluster
 Two isolated voltage domain to support DVFS for big cluster and little cluster
separately.
ME>>>read this later: Power Restrictions for Android OS: Managing Energy Efficiency and System Performance
https://ijcsitr.com/index.php/home/artic...4_05_04_01

look at linux driver for Himax HX8394
https://github.com/torvalds/linux/blob/m...x8394.yaml
datasheet Himax HX8394-A
https://datasheet4u.com/pdf-down/H/X/8/H..._Himax.pdf
  Reply
#6
I need to see what is on the repos but cant apt install cpufrequtils and cpupower so will try again later as these are standard debian pkgs.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Battery life suggestion aular2 2 1,503 08-05-2024, 09:06 PM
Last Post: aular2
  rough estimate of expected microSD installation life? andrewp907 7 5,447 06-10-2023, 07:55 PM
Last Post: Kevin Kofler
  Megi's Kernel and Battery Life biketool 3 3,208 01-09-2023, 11:33 PM
Last Post: Canyonless
  PinePhone Pro battery life Barugon 17 19,792 07-29-2022, 09:23 AM
Last Post: prog-amateur
  postmarketOS fixed battery issues Deadladyofclowntown 1 2,344 06-23-2022, 02:44 PM
Last Post: zer0sig
  Phone won't suspend, battery drains quickly nelstomlinson 12 10,342 04-05-2022, 06:11 AM
Last Post: Anna
  The modem switch affects the connection to battery? JohnDoe 2 2,968 03-30-2022, 12:02 AM
Last Post: JohnDoe
  improve battery life on pine phone beta? taoschx 0 1,465 02-28-2022, 06:24 AM
Last Post: taoschx
  Guide to power off the Pinephone on low battery Ulfnic 1 2,107 02-06-2022, 05:16 AM
Last Post: Ulfnic
Question Is there a way to increase the battery life of the PinePhone? Avisando 18 17,117 01-22-2022, 11:55 PM
Last Post: bcnaz

Forum Jump:


Users browsing this thread: 1 Guest(s)