Possible battery and performance improvement
#1
Dear pinebook pro users,

I have spent a certain amount of time reading about the pinebook pro cpu voltages (rk3399) in pine64 wiki overclocking and I have come up with two ideas:

1 - Improve battery by adding a slight undervolt:
The default cpu clocks and voltages for rk3399 big cores are the following (Extracted from https://github.com/torvalds/linux/blob/m...9-opp.dtsi):

Cpu clock - Cpu voltage

408Mhz - 800mV
600Mhz - 800mV
816Mhz - 825mV
1008MHz - 875mV
1200MHz - 950mV
1416MHz - 1025mV
1608Mhz - 1100mV
1800Mhz - 1200mV

As suggested by the wiki, more optimised voltages can be found in: https://github.com/torvalds/linux/blob/m...1-opp.dtsi which are the voltages used in some chromebooks with the rk3399:

Cpu clock - Cpu voltage
408Mhz - 800mV
600Mhz - 800mV
816Mhz - 825mV
1008MHz - 850mV
1200MHz - 900mV
1416MHz - 975mV
1608Mhz - 1050mV
1800Mhz - 1115mV
2016Mhz - 1250mV [last freq can be skipped as it requires a slight overclock]

1.1 - How to apply such improved voltages?

The default ones can be overrided in arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts . This has been already done by tsys in its kernel to overclock to 2000Mhz - 1300mV ( https://gitlab.manjaro.org/tsys/linux-pi...ok-pro.dts ):
Code:
&cluster1_opp {
  opp08 {
    opp-hz = /bits/ 64 <2000000000>;
    opp-microvolt = <1300000>;
  };
};

So in our case we want to change it to the following:

Code:
&cluster1_opp {
  opp03 {
    opp-hz = /bits/ 64 <1008000000>;
    opp-microvolt = <850000>;
  };
  opp04 {
    opp-hz = /bits/ 64 <1200000000>;
    opp-microvolt = <900000>;
  };
  opp05 {
    opp-hz = /bits/ 64 <1416000000>;
    opp-microvolt = <975000>;
  };
  opp06 {
    opp-hz = /bits/ 64 <1608000000>;
    opp-microvolt = <1050000>;
  };
  opp07 {
    opp-hz = /bits/ 64 <1800000000>;
    opp-microvolt = <1150000>;
  };

};
then recompile the kernel, and the new values should be in place Smile

2 - Improve CPU performance with a small overclock:

The main concern with overclocking the CPU in this laptop is that when attached to the charger, the battery will discharge when it is under a big load. My guess is that with the overclock proposed in rk3399-op1-opp.dtsi , the discharging problem can be solved as we are not exceeding the "The highest safe voltage [...] for the big cores is 1.25V" (extracted from the overclocking wiki mentioned at the beginning of the post):

2016Mhz - 1250mV

2.1 - How to apply such overclock?

Following the same guide as for the improved voltages (Section 1.1), we need to add:
Code:
  opp08{
   opp-hz = /bits/ 64 <2016000000>;
   opp-microvolt = <1250000>;
  };


As I don't own a pinebook pro, I can't test any of the proposed changes. Would anyone try them and report if they are stable?
#2
Thank you very much!

Sent from my PH-1 using Tapatalk
#3
I confirm these voltages are working for a daily driver, i even got a 2088Mhz oc@1,25v.
https://github.com/TuxThePenguin0/linux-...lock.patch
#4
(11-08-2020, 02:09 PM)rimaille Wrote: I confirm these voltages are working for a daily driver, i even got a 2088Mhz oc@1,25v.
https://github.com/TuxThePenguin0/linux-...lock.patch

Thank you for sharing it, I will add it to the wiki Smile

I have one more question, does the battery drain while you are charging it (under high workloads such as compiling stuff)?
#5
(11-08-2020, 03:34 PM)xehartnort Wrote: I have one more question, does the battery drain while you are charging it (under high workloads such as compiling stuff)?

I have a superlight desktop environnement, as much as i can built from scratch on archlinux.
Screen luminosity is set to 50%, nor nvme or sdcard.
CPU OC and UV (big 2,088Ghz@1,25V, little 1.6Ghz)

After 10 min of stress --cpu 6 , i got a peak power usage at 9,7W, with a median at 9,4W (because of wifi usage).
CPU max temp is 57 C
Battery drain from 100% to 98%, i plugged back the barel power supply, stress test always running : verdict... always a drain, slow, but still : after 15 min, battery went to 95%. Also i would say this use case does not represent the reality, when compiling, cpu have alternance of full load and average load, i/o are sometimes the bottleneck... On everyday usage, i never saw any limitation due to power drain : most of the time pbp is between 2,5W and 3,5W.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Hints on improving performance hjalfi 3 4,030 06-07-2021, 09:36 AM
Last Post: hjalfi
  Battery gauge issue (mainline kernel) lfourquaux 4 5,818 05-22-2021, 02:43 PM
Last Post: jiyong
  eMMC frequently not found by Linux kernel (especially on low battery) v-man 14 19,125 05-14-2021, 01:18 PM
Last Post: djhnsn
  Battery charge threshold xNix 1 2,527 04-17-2021, 07:13 AM
Last Post: Damon
Question Manjaro arm + sway - battery indicator broken mfashby 6 7,785 02-20-2021, 04:07 AM
Last Post: mfashby
  Manjaro - No battery info after plugged in AlecM 4 6,746 09-16-2020, 08:34 PM
Last Post: zer0sig
  get battery status on the command line rossk 2 6,116 04-04-2020, 09:25 PM
Last Post: rossk
  Manjaro w/ Panfrost Drivers vs stock Debian Video Performance decisivedove 15 19,260 03-25-2020, 12:04 AM
Last Post: decisivedove
  i3status issues reading battery status dummy 9 13,254 01-31-2020, 08:27 AM
Last Post: C_Elegans
  gvim performance in Debian sirspate 1 2,749 01-17-2020, 08:34 AM
Last Post: sirspate

Forum Jump:


Users browsing this thread: 3 Guest(s)