cpufreq malfunction? - Xiaomi Mi A2 Lite Questions & Answers

I have a rooted Mi A2 lite with updated stock Oreo (5 sept). I tried to change cpu governor with an terminal app but only performance seems to work. For example when I changed to powersave governor, actually the cpu is scalled to other frequencies too.

The kernel may override external CPU governor settings, you could try to fine-tune settings with tools like Kernel Adiutor.

thorin0815 said:
The kernel may override external CPU governor settings, you could try to fine-tune settings with tools like Kernel Adiutor.
Click to expand...
Click to collapse
Exactly this app I have installed to check total time spent to different frequencies. Before installing this app I configured through Terminal app powersave governor. After that, Kernel auditor show me that maximum fequency that one core can reach is 652800 mhz, which is correct because I have configured powersave cpu governor. Than I reset time history in Kernel Auditor and after few minutes when I checked time spent on different frequencies I have noticed that other frequencies where used too (in special the last one, 2 ghz). Even if the phone have very little load the last frequency is used a lot. I think this issue have nothing to do whith fingerprint sensor because I have this with and without fingerprint checking active. Maybe cpufreq scalling driver msm have something to do.

Related

System or Kernel chages cpu frequencies itself!!?

Hey guys,
i got a problem adjusting the cpu frequencies on my Galaxy S4 mini GT9195.
For example, i change it to 162mhz minimum and 1026mhz maximum and the smartassV2 govenor. Then that changes ramdomly to some weird frequencies automaticly and out of a sudden. Like 1458mhz minimum and maximum.
I use the cyanogenmod11 M7 rom and the f4ktion 1.5.0 Kernel (the cyanogen kernel does the same btw)
As App for adjusting i use the Kernel Tweaker, but even if i do it in the System settings its doing the same...
I did some undervolting, this stays as i set it.
I hope you guys can help me its annoying to check it every houre and see that it changed again and drains my battery
Sebastian
Devices using a modern qualcomm cpu, relies on two userspace daemons (mpdecision and thermald) to manage frequency and thermal throttling. So mpdecision takes care of the frequencies and cpu hot-plugging (when to engage additional cores or not), and thermald lowers the frequency if the temperature gets too high, in order to protect the cpu from overheating. This is not compatible with the frequency settings in CM or any third party app with similar functionality, as they will always override whatever you set there.
arco68 said:
Devices using a modern qualcomm cpu, relies on two userspace daemons (mpdecision and thermald) to manage frequency and thermal throttling. So mpdecision takes care of the frequencies and cpu hot-plugging (when to engage additional cores or not), and thermald lowers the frequency if the temperature gets too high, in order to protect the cpu from overheating. This is not compatible with the frequency settings in CM or any third party app with similar functionality, as they will always override whatever you set there.
Click to expand...
Click to collapse
I see.. Thanks for the answer mate, so there's no way to save battery like this? It just seems sometimes that it's stuck at some frequencies...
Well, you could make a custom boot image that disables those daemons, but it could cause more harm than good.
Sebastianm1989 said:
Hey guys,
i got a problem adjusting the cpu frequencies on my Galaxy S4 mini GT9195.
For example, i change it to 162mhz minimum and 1026mhz maximum and the smartassV2 govenor. Then that changes ramdomly to some weird frequencies automaticly and out of a sudden. Like 1458mhz minimum and maximum.
I use the cyanogenmod11 M7 rom and the f4ktion 1.5.0 Kernel (the cyanogen kernel does the same btw)
As App for adjusting i use the Kernel Tweaker, but even if i do it in the System settings its doing the same...
I did some undervolting, this stays as i set it.
I hope you guys can help me its annoying to check it every houre and see that it changed again and drains my battery
Sebastian
Click to expand...
Click to collapse
f4ktion kernel 1.5.0 is not designed for M7. For M7 use 1.4.5.
I'm right now with nightly 0703, kernel 1.5.0, mpdecision disable and MSM Hotplug enable (performance control). With this settings that bug disapeared. 162 mhz - 1728 mhz; smartassh3; ROW.
In M7, and 1.4.5 kernel, the only governor that works with 162 mhz and don't change to 1458 mhz is the Ondemand.

[LG D855] CPU Frequency doesn't stick

Why doesn't the max cpu remain constant in kernel audiutor??
I have cm 13 and I have tried flashing the Nebula kernel, used their modded kernel audiutor app and max frequency doesn't stick, after I put it at 2457 MHz and try out a benchmark I would get sh**ty scores and go back to Kernel Audiutor app to find out that my new max frequency was 800 MHz (or another, max frequency was totally random) , why??? I tried flashing the 777 Kernel (maybe the kernel was the issue?) and got the same result! Cpu frequency changes after a while, am I doing something wrong? I have disabled hotplug cpu and the thermal to see if it was the case, didnt work... Any solution?
Settings > Battery > Set mode to performance - you can set this in kernel audiutor i believe (sorry my spelling is crap) but i'm not sure what section it's in.
Still doesn't work
I just tried your suggestion after a little bit of googling and finding this thread. What else could I try? I see my CPU change instantly after applying the changes ..... My phone is really lagging so that's why I need to change this stupid setting.

Disabling touchboost feature from kernel

Hi there!
So I flashed a custom ROM for my device and everything is fast and stable. However, the battery life isn't that good. An xda member me that it was because the ROM's kernel has a feature called touchboost, wherein the CPU would run at the highest frequency every time I touched the screen of the phone. Interestingly enough, there is no option within Kernel Adiutor to disable the said feature.
Can you guys help me disable touchboost?
you need a kernel or governor tuner/manager/editor to edit the Touch boost frequency for the currently selected CPU scheduler.
xevolution said:
you need a kernel or governor tuner/manager/editor to edit the Touch boost frequency for the currently selected CPU scheduler.
Click to expand...
Click to collapse
I already have Kernel Adiutor and L Speed installed but there is no option to disable touch boost frequency.
Bronze shovel- I am looking for some touchboost disabling instructions too

[KERNEL][7.1.1][NX591J] LPST kernel for Nubia Z17 Lite [v0.1.62][2018-07-16]

If anybody is interested, I build my first own kernel for Nubia Z17 Lite (NX591J). It is based on stock Nubia kernel published HERE and compiled using Linaro toolchain (from verison 0.1.62 up).
It is compatible with Global (Geekbuying) stock ROM and Chinese stock ROM and NubiaPixel. It is not compatible with LineageOS.
I added multiple features into the kernel, but settings (like governor tunables) are mostly stock, so it is up to you to customize them to your needs using tools like Kernel Adiutor.
FEATURES:
based on stock NX591J kernel
built using Linaro 6.4 toolchain (stock was GNU 4.9) - improved speed and smoothness
added governors (blu-active, interactivex, conservative)
added schedulers (zen, fiops, sioplus)
disabled MSM_PERFORMANCE (stock hotplugging driver)
added 3rd party CPU hotplug drivers (msm_hotplug, Intelliplug) - msm_hotplug enabled by default, but it can be disabled to get more smoothness at cost of some battery life
enabled cpuboost with support for input, wakeup and hotplug boost
USB fast charge support (0.9A on USB data link instead of just 0.5A, disabled by default)
added westwood network TCP congestion angorithm
reading CPU voltages
state notifier support
some minor tweaks
INSTALLATION:
Copy the kernel IMG file to internal memory
Reboot to TWRP recovery
(Optional) Backup your Boot partition
Select Install - Install Image - select the IMG file and check Boot
If you had magisk installed, you need to re-install it again
Reboot
Factory reset should not be needed.
DOWNLOAD:
Version 0.1.62 at Mega
Version 0.1.36 at Mega
TWEAKING:
You can use Kernel Adiutor or any other tool to tweak the settings. Personally, I am using the following values:
CPU governor for all CPUs: blu_acttive
CPU hotplug: disabled
IO scheduler: zen, read-ahead 256kB, rotational/IO Stats/Add Random: disabled
governor settings for little cores:
go_highspeed_load 92
hispeed_freq 1017600
target_loads 92
above_hispeed_delay 30000
fastlane 0
governor settings for big cores:
go_highspeed_load 95
hispeed_freq 1190400
target_loads 95
above_hispeed_delay 40000
fastlane 0
CPU boost:
interval: 40ms
input interval: 300ms
sync treshold: disabled
input boost core 1-4: 806 MHz
input boost core 5-8: 883 MHz
Wakep boost: enabled
Hotplug boost: disabled
big cores 7 and 8 disabled (if I don't need top performance)
Thermal:
Core Control: Enabled
VDD Restriction, Temperature Throttle: Disabled
Virtual memory:
dirty_ratio: 40
dirty_background_ratio: 15
swappiness: 0
vfs_cache_pressure: 10
Z-RAM: 0 + Magisk module Swap Torpedo to get rid of ZRAM (we don't need to compress RAM and use swap when we have 6 GB of it)
With those, I am getting smooth performance and no heating, up to 2 days of battery life. Antutu still scores at 105k (geekbuying stock had only 85k).
Click to expand...
Click to collapse
Note: I am not responsible about any damage of any kind that this kernel may cause.
If you are looking for the latest stock ROM for this phone, Global version can be found HERE (1.05) and Chinese ROM HERE (2.06) (version numbering is different than global ROM; tip - if the download speed is too slow from China, try a VPN extension...I used Hoxx VPN into Singapore and the download speed went from 30 KB/s to 5 MB/s)
KERNEL?
Zjh0094 said:
KERNEL?
Click to expand...
Click to collapse
Yes. What exactly are you asking for?
Great job. Installed on the global firmware 1.05. Thanks again.
lapist said:
Yes. What exactly are you asking for?
Click to expand...
Click to collapse
There is no requirement that I am different from your device. I can't try this wonderful thing.
If you need anything else to be added to the kernel, like your favorite governor of f2fs support, just let me know and I can add it
Zjh0094: I have no idea what are you talking about....
lapist said:
If you need anything else to be added to the kernel, like your favorite governor of f2fs support, just let me know and I can add it
Zjh0094: I have no idea what are you talking about....
Click to expand...
Click to collapse
My device is NX563J can brush into this kernel
F2FS is a good suggestion but he doesn't make much difference in ufs2.1
Zjh0094 said:
My device is NX563J can brush into this kernel
F2FS is a good suggestion but he doesn't make much difference in ufs2.1
Click to expand...
Click to collapse
Yes, I see...this is not kernel for NX563J
Actually our Z17 Lite has eMMC 5.1 storage, not UFS like regular Z17, so F2FS could make sense.
lapist said:
Yes, I see...this is not kernel for NX563J
Actually our Z17 Lite has eMMC 5.1 storage, not UFS like regular Z17, so F2FS could make sense.
Click to expand...
Click to collapse
Yes, eMMC5.1 needs F2FS very much.
@lapist does these kernel also includes the tweeks from here?
Nikolaosf said:
@lapist does these kernel also includes the tweeks from here?
Click to expand...
Click to collapse
No, the file init.qcom.post_boot.sh is in system partition (not in the kernel) and it overrides the CPU settings, so it can't be included in kernel. But you can change the CPU settings also thru Kernel Adiutor.
For example switching to blu-active governor and ensuring that CPU min/max frequencies are set properly should be enough for the beginning.
lapist said:
No, the file init.qcom.post_boot.sh is in system partition (not in the kernel) and it overrides the CPU settings, so it can't be included in kernel. But you can change the CPU settings also thru Kernel Adiutor.
For example switching to blu-active governor and ensuring that CPU min/max frequencies are set properly should be enough for the beginning.
Click to expand...
Click to collapse
Oh i see! Simply i download the adiutor and try to find the blue active! I will try to...what about battery life after the new kernel?
Nikolaosf said:
Oh i see! Simply i download the adiutor and try to find the blue active! I will try to...what about battery life after the new kernel?
Click to expand...
Click to collapse
Battery life depends mainly on your governor and hotplug settings ? With my values, I still have around 50% of the battery left in the evening after light to medium use. I am using Blu-active governor and I am still experimenting with msm-hotplug settings - too much power saving brings lags, so I am looking for balance between smoothness and battery efficiency.
In general, I think that this kernel has a bit shorter battery life than stock with the same governor settings, but it feels considerably smoother.
If you want to have your changes made in Kernel Adiutor permanent, don't forget to enable applying them on boot. For me applying on boot sometimes didn't happen, but it would help if you convert Kernel Adiutor to system app. I am using App Systemizer module from Magisk for that.
Is there any news about the kernel for Lineage from HighwayStar_ru?
KomatoZZZnik said:
Is there any news about the kernel for Lineage from HighwayStar_ru?
Click to expand...
Click to collapse
No, no reply from him. I see in his profile that he was active today, but he didn't answer...
Hey @lapist ! I am using the kernel but I would like to go back to the international rom settings as far as cpu and thermal throttling. I couldn't find the stock files, can you please share them ?
Crisvendetta said:
Hey @lapist ! I am using the kernel but I would like to go back to the international rom settings as far as cpu and thermal throttling. I couldn't find the stock files, can you please share them ?
Click to expand...
Click to collapse
Why would you want to go back to Geekbuying's settings? Isn't it better to tweak the settings in blu_active or interactive governor according to your needs?
lapist said:
Why would you want to go back to Geekbuying's settings? Isn't it better to tweak the settings in blu_active or interactive governor according to your needs?
Click to expand...
Click to collapse
I just don't want my phone overheating, can't find some proper settings, the ones from the global rom were good enough. Thanks
Crisvendetta said:
I just don't want my phone overheating, can't find some proper settings, the ones from the global rom were good enough. Thanks
Click to expand...
Click to collapse
When does the overheating happen? I am personally using blu_active governor with the following values:
governor settings for little cores:
go_highspeed_load 92
hispeed_freq 1017600
target_loads 92
above_hispeed_delay 30000
fastlane 0
governor settings for big cores:
go_highspeed_load 95
hispeed_freq 1190400
target_loads 95
above_hispeed_delay 40000
fastlane 0
CPU boost:
interval: 40ms
input interval: 300ms
sync treshold: disabled
input boost core 1-4: 806 MHz
input boost core 5-8: 883 MHz
Wakep boost: enabled
Hotplug boost: disabled
CPU hotplug disabled
big cores 7 and 8 disabled (if I don't need top performance)
With those, I am getting smooth performance and no heating, up to 2 days of battery life. Antutu still scores at 105k (geekbuying stock had only 85k).
If your phone overheats during gaming, you can just try lowering max frequency for big cores, although the phone throttles the CPU on high temperature automatically...
To get back to stock values, you would need to restore them from backup...
EDIT: I added my settings into the first post.
Hi, I am interested in increase in frequency of GPU. It would be desirable to learn whether there is any opportunity for increase in frequency of GPU approximately to ~ 800MHz (for Geekbuying 1.05)?

Is there a kernel for cpu underclock on oreo?

Is there an oreo-based kernel to perform cpu underclocking? Or maybe a way to be able to do the underclock on android 8? Because most of them are only on android nougat, but on oreo no one has developed anything yet ...
AntoKemz said:
Is there an oreo-based kernel to perform cpu underclocking? Or maybe a way to be able to do the underclock on android 8? Because most of them are only on android nougat, but on oreo no one has developed anything yet ...
Click to expand...
Click to collapse
There is an app I used on my old phone: https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
Sent from my Samsung SM-A520W using XDA Labs
AntoKemz said:
Is there an oreo-based kernel to perform cpu underclocking? Or maybe a way to be able to do the underclock on android 8? Because most of them are only on android nougat, but on oreo no one has developed anything yet ...
Click to expand...
Click to collapse
You can underclock with stock kernel if I know correctly.
The stock oreo kernel of a520f supports these features and it should apply to (Exynos) most custom kernels, all devices across A 2017, and most related devices.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - Max clock of cluster 0, reduce to underclock the CPU.
/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq - Max clock of cluster 1, reduce to underclock the CPU.
/sys/power/cpufreq_max_limit - Max clock of both clusters, more forced once permissions are set, watch device temperatures.
/sys/power/cpuhotplug/max_online_cpu - write a number 1 to 8, it is the CPU cores that are online.
Maybe relevant:
/sys/class/misc/mali0/device/dvfs_max_lock - GPU clock, more forced once permissions are set, watch device temperatures.
/sys/class/misc/mali0/device/core_mask - The GPU core combination in use, write a number 1 to 7.
/sys/class/misc/mali0/device/dvfs_governor - GPU governor, write a number 1 to 3.
/sys/class/devfreq/17000010.devfreq_mif/max_freq - could affect cellular and wifi
/sys/class/devfreq/17000020.devfreq_int/max_freq
/sys/class/devfreq/17000030.devfreq_disp/max_freq
/sys/class/devfreq/17000040.devfreq_cam/max_freq
The CPU governor is with scaling_max_freq though only userspace performance interactive.
Reboot to undo changes.
Edit:
/sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster0_max_freq
/sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster1_max_freq
Though this should not exceed the max clock, in addition to the governor's settings(/sys/devices/system/cpu/cpu[0-7]/cpufreq/interactive/...), the CPU clock is boosted temporarily when the screen is touched, the activity is changed, etc, even when it might not be needed. It's often "touchboost", and could be disabled by enabling medium power saving, or,
/sys/power/cpufreq_min_limit (home, gesture, scroll, app change, unlock)
"644 permissions" - disabled
"664 permissions" - default
check its contents after changing, should be the CPU min clock.
/sys/class/input_booster/level (touch, long touch, multiple fingers, etc)
0 - disabled touchboost
1 - low
2 - default
3 - high
might need the permissions being 464
CPU 4-7 needs to be powered on before cpufreq becomes available in its folder.
sheepkill15 said:
You can underclock with stock kernel if I know correctly.
Click to expand...
Click to collapse
Instead of what I understand, with the normal app type cpu master, or no frills cpu you can not change the clock of the CPU and the governor, but with the app Kernel Adiutor, recommended by @iloveoreos is possible, it is very strange this thing. However, despite the underclock of the CPU you can not then earn so much battery, it seems void
AntoKemz said:
Instead of what I understand, with the normal app type cpu master, or no frills cpu you can not change the clock of the CPU and the governor, but with the app Kernel Adiutor, recommended by @iloveoreos is possible, it is very strange this thing. However, despite the underclock of the CPU you can not then earn so much battery, it seems void
Click to expand...
Click to collapse
It doesn't count that much because you rarely use the cpu max freq. Maybe try underclocking the gpu too, if you can but probably not and there's not much else to do
AntoKemz said:
Instead of what I understand, with the normal app type cpu master, or no frills cpu you can not change the clock of the CPU and the governor, but with the app Kernel Adiutor, recommended by @iloveoreos is possible, it is very strange this thing. However, despite the underclock of the CPU you can not then earn so much battery, it seems void
Click to expand...
Click to collapse
The cpu and gpu are managed by the OS and its resepective governor settings. Little will be gained by reducing cpu cylcles unless it's correctly managed.
The single biggest battery user is the screen. Either reduce the brightness to the lowest you can stand and limit its on time or use powersave mode which will reduce both screen and cpu/gpu frequency.
Also selecting a more suitable governor helps.
If you frequently use high cpu usage apps its pointless using a conservative governor as you'll just lag the device. An ondemand governor would be better suited.
You can also set apps to be killed the moment you leave them in the developer settings.
ashyx said:
The cpu and gpu are managed by the OS and its resepective governor settings. Little will be gained by reducing cpu cylcles unless it's correctly managed.
The single biggest battery user is the screen. Either reduce the brightness to the lowest you can stand and limit its on time or use powersave mode which will reduce both screen and cpu/gpu frequency.
Also selecting a more suitable governor helps.
If you frequently use high cpu usage apps its pointless using a conservative governor as you'll just lag the device. An ondemand governor would be better suited.
You can also set apps to be killed the moment you leave them in the developer settings.
Click to expand...
Click to collapse
The problem is that with the only governors we have in stock are interactive, performance and userspace. The kernel allows me to just adjust the cpu, and on android oreo we do not have custom kernels that allow me to do anything. So in addition to lowering the brightness, really there is nothing that thanks to xposed and the root that allows me to do at least 5 hours of screen? The upgrade to oreo ruined everything, Nougat was too perfect

Categories

Resources