tici: use powersave CPU governor while offroad (#23146)

* tici: use powersave CPU governor while offroad

* fix path
old-commit-hash: 5e20a46db6882c4f48160f7a9f98d695bcbea873
This commit is contained in:
Adeeb Shihadeh
2021-12-06 13:53:55 -08:00
committed by GitHub
parent 5b2ae31455
commit c01f1a8f31
+4
View File
@@ -303,6 +303,10 @@ class Tici(HardwareBase):
val = "0" if powersave_enabled else "1"
os.system(f"sudo su -c 'echo {val} > /sys/devices/system/cpu/cpu{i}/online'")
for n in ('0', '4'):
gov = 'powersave' if powersave_enabled else 'performance'
os.system(f"sudo su -c 'echo {gov} > /sys/devices/system/cpu/cpufreq/policy{n}/scaling_governor'")
def get_gpu_usage_percent(self):
try:
used, total = open('/sys/class/kgsl/kgsl-3d0/gpubusy').read().strip().split()