I created a CPU control app to save battery power, created using a K5 with ROM 6.0 - Lenovo Vibe K5 Plus Themes, Apps, and Mods

I created a CPU control app to save battery power, and I created it using a K5 with ROM 6.0 Stock ..
need ROOT
theoretically works on any Snapdragon octacore, perhaps in quad core and hexa core ..
you control in system notification ..
there's a free version that works for 48 hours to test compatibility and see how app works,
......................
Mod Edit: link removed
Mod Edit: Removed app name
you choose real-time CPU power in the notification bar
Mod Edit: Removed link
Designed for Snapdragon octa core CPU, maybe run on quadcore and hexacore
works only with ROOT !!
With screen off CPU + GPU + frequency are limited for more battery
there is an option to switch the system's power save mode when the screen is off
4 operating modes with connected display:
ECO ++
4-core CPU and frequency limit + limited GPU + power saving mode
ECO
Limit 4 CPU cores
MAX
All CPU cores connected with maximum frequency + GPU at the maximum frequency for a limited time determined by the user
* After selecting MAX, the popup appears and select the time limit in minutes (up to 3 minutes)
NORMAL
CPU + GPU + Frequency running in system default mode
* Normal standard phone mode, only after reboot
* 1 tested on snapdragon 615 with Kernel Stock
* 2 this will not damage your device if it does not work well on your device, just uninstall and restart the device and everything returns as before the application was installed
Mod Edit: Images removed

No promotions here

apps have been updated:
Lite version now works for 7 days for testing
update bug and Fixed bugs

Thread closed.
11. Don’t post with the intention of selling something.
•Do not post press releases, announcements, links to trial software or commercial services, unless you’re posting an exclusive release for XDA-Developers.com.

Related

Testing free CPU tuners

Hi,
I've been meaning to try some free CPU tuners/boosters for a while and a finally found the time. Please bare in mind that these are just very VERY basic tests, nothing fancy and far from bullet proof (for instance, I have not tested battery impact).
Important note: I'm using ninphetamine-2.1.3-release at the moment and usually get benchmark values around 3400
CPU Master Free (https://market.android.com/details?id=com.antutu.CpuMasterFree&feature=search_result)
- Settings: Scaling on demand with min frequency 500 and max 1400 (it goes up to 1600). Enabled to start the app on boot.
- Quadrant results (ran it 4 times): 3780, 4124, 3585, 4245
- Note: this app doesn't allow you to schedule settings (for instance, to lower the CPU usage during sleep and so on)
No-Frills CPU Control (https://market.android.com/details?id=it.sineo.android.noFrillsCPU&feature=search_result)
- Settings: Scaling on demand with min frequency 500 and max 1400 (it goes up to 1600). Enabled to start the app on boot.
- Quadrant results: 4003, 3526, 4479, 3465
- Notes: even though I set the app to start on boot I always get a "value not applied" message when I reboot.
CPU Tuner (https://market.android.com/details?id=ch.amana.android.cputuner&feature=search_result)
- Settings: Scaling on demand with min frequency 500 and max 1400 (it goes up to 1600). Enabled to start the app on boot.
- Quadrant results: 3829, 4333, 4153, 4369
- Notes: even though I set the app to start on boot when I reboot the values go back to stock. This app doesn't allow you to schedule settings (for instance, to lower the CPU usage during sleep and so on)
And now the best part...real speed gains during usage? None that I can notice, but then again other than watching a lot of videos, taking photos and editing photos I don't use any hardcore CPU apps. But then again the SGS2 is a beast by it's own and I have never used any app that made me feel that I needed more speed. I think it's awesome that these apps exist though and I will certainly install CPU Master on my wife's Milestone (I've chosen this one because it's the only one that seems to work on boot).
There's absolutely no reason why any of those would even touch performance. They don't tune anything, you're the one controlling the frequencies. So as far as that goes there's no reason to use anything else than SetCPU as that has proper voltage control too.
This would be the only alternative that would really change anything.

[DEV][KERNEL] Tegra3 power management notes and tricks

This thread contains findings on how to view and set kernel parameters related to power management. Although there is no kernel source for One X, some information can be obtained from Transformer Prime kernel sources (also a Tegra 3 device), and from the device itself via sysfs interface.
sysfs files related to CPU power management:
/sys/kernel/debug/tegra_hotplug/max_cpus - maximum CPUs to use. User-configurable, default 4. This is not touched by the Android OS, and will remain in whatever state we set until reboot.
Set this to "1" to make the phone a lot less power-hungry and overheating.
At the cost of performance, of course.
*NOTE: second core will activate sometimes if this is set to "1", but 3rd and 4th cores are disabled for sure.
/sys/kernel/debug/tegra_hotplug/min_cpus - minimum number of CPUs to use.
This _is_ touched by the OS, and can not be set reliably.
/sys/kernel/debug/tegra_hotplug/stats - time each core spent active. Including 5-th "low-power" core.
e.g.:
Code:
cpu: G0 G1 G2 G3 LP
transitions: 26 12 0 0 25
time plugged: 3110 1222 0 0 95122
time-stamp: 4296183486
/sys/kernel/debug/cpuidle/lp2 - another stats interface.
/sys/module/cpu_tegra/parameters/cpu_user_cap - Max frequency cap for all cores. Default 1500000 (1.5GHz), can be set to any lower value to underclock.
But it is often set by the OS different values (most frequently, back to it's maximum). Maybe, changing this string in libhtc-opt2.so via hex editor can prevent system from changing it?
/sys/kernel/cluster/active - currently active CPU cluster. "LP" for low-power core, "G" for generic (normal) cores.
Can be changed manually, but is also modified by the system at will.
All above values can be changed from root shell via "echo 'value' > /sys/path/to/file"
Maybe, this will come handy to some ROM or CPU-monitoring app developers.
References:
Asus Transformer kernel source
[DEV] Enable 2D GPU rendering in HTC One X & about build.prop tweaks
some findings by phirenz
is there any way to request more use of the companion core?
In case anyone's wondering, I just found out that /sys/kernel/cluster/active must be opened as root even for reading; opening the file as any other user will not succeed.
The other files seem to allow reading as a standard user, however.
It woulod be great is someone created an app for setting number of CPUs. It is useful sometimes to set it to 1 when you are traveling and want to get max possible battery.
It would be even better if it was possible to disable all 4 cores and force system to use LP core only. It would be brilliant max power saving mode.
I've modified OS Monitor to support Tegra 3's stuff (temperature, number of cores and determining whether it is low power/general CPU in use) and my experience is that there's no or very little battery gains to be had because the other 3 cores are off most of the time anyway (when idle)
I'm using stock 1.28. The low power core doesn't seem to like being activated for more than a few seconds at a time, too.
I've modified OS Monitor to support Tegra 3's stuff
Click to expand...
Click to collapse
Can u share the apk here...xD???
thanks to the OP.....I don't have a One X but this info helped me to force all 4 cores of my Asus TF300T go online and offline as i wish.
schriss said:
It woulod be great is someone created an app for setting number of CPUs. It is useful sometimes to set it to 1 when you are traveling and want to get max possible battery.
It would be even better if it was possible to disable all 4 cores and force system to use LP core only. It would be brilliant max power saving mode.
Click to expand...
Click to collapse
use core control or francos kernel updater works for every custom kernel also stock kernel and you can choose how many cores...but battery life is not better with deactivated cores and soemetimes even worser -.-
I used to be able to do this, but now I'm using n3o kernel and I can't find the tegra_hotplug folder inside sys/kernel/debug. Help?
joeystar said:
I used to be able to do this, but now I'm using n3o kernel and I can't find the tegra_hotplug folder inside sys/kernel/debug. Help?
Click to expand...
Click to collapse
Man ask this in kernel thread not here....-.-
Sent from my HTC One X using xda app-developers app

Fix for heating issue without performance drop [Root Required]

Redmi 1s Indian version has some worst heating problem. During gaming or video recording the external device temperature gets to around 45-50 degree Celsius which makes it difficult to even hold the device and is also dangerous. The reason behind this is poor heat management and its a shame Xiaomi could not still fix it after many updates. They further made a mess with MIUI 5 v45 by killing the performance still having the heating issue.
After experimenting with the device for about one month, I noticed that hot plugging decreases the battery backup and performance. It consumes more current for low performance. [Tested manually with 3C Cpu Manager and Cpu Temp Apps.] So I concluded Cpu Performance, Battery Performance and Hotplugging should be used optimally to extract the maximum out of this device without any sacrifice.
It is possible to have Good Performance with almost No Heating by enabling the default qualcomm MP decision, Core Control and Thermal Driver and a modified thermal config.
We can fix this in two simple steps [Make sure you have root access]
First Fixing Heating Issue
Download Device Control App from Play Store
Open the app and grant root permissions
1. Go to Extras in the Performance menu and select Thermal Driver and enable Core Control and MSM-Thermal.
2. Now go to Cpu Setting in the menu and enable MPdecision.
3. Goto Preferences >> Reapply on boot and choose Cpu settings and Extras.
4. Close the app and go to Security App >> Permission >> Auto-start management >> Add auto-start apps and choose Device Control
Second Restoring Performance
Go to this Thread by ravinder0003and download either Balanced Config or Gaming Config
Flash it in recovery or extract the thermal-engine-8226.conf file and move to /system/etc manually (Don't forget the permissions).
Now your device can be used at its full potential without any heat issue
This will work almost in every kernel with qualcomm thermal drivers and is found to the most efficient way of fixing Redmi 1s Performance without affecting battery backup.
If the thermal-engine-8226.conf file is deleted once and rebooted in the past then heating issue will occur even after above settings- try after installing the firmware again through recovery.
Other Settings
Go to Extras >> Powersaving >> Power Scheduler >> 2 - Aggressive in Device control App. It forces the tasks into 2 cores and doesn't wake the other two cores for simpler tasks improves battery backup.
Set the CPU Maximum frequency to 1344Mhz using Device Control if you don't want any heat on the device and get maximum battery backup.
If you want to use the device while plugged in to mains while watching movies or use youtube set the CPU Maximum Frequency to 600Mhz or 998Mhz. [Its highly recommended not to use the device while charging via mains].
Heating Issue for Redmi 1s
I have two questions ?
1. Whether the phone has to be rooted.
2. Whether it will work for the latest update of MIUI V50 for Redmi 1s
Thermal Patch by ravinder.
dangerjaison said:
Redmi 1s Indian version has some worst heating problem. During gaming or video recording the external device temperature gets to around 45-50 degree Celsius which makes it difficult to even hold the device and is also dangerous. The reason behind this is poor heat management and its a shame Xiaomi could not still fix it after many updates. They further made a mess with MIUI 5 v45 by killing the performance still having the heating issue.
After experimenting with the device for about one month, I noticed that hot plugging decreases the battery backup and performance. It consumes more current for low performance. [Tested manually with 3C Cpu Manager and Cpu Temp Apps.] So I concluded Cpu Performance, Battery Performance and Hotplugging should be used optimally to extract the maximum out of this device without any sacrifice.
It is possible to have Good Performance with almost No Heating by enabling the default qualcomm MP decision, Core Control and Thermal Driver and a modified thermal config.
We can fix this in two simple steps [Make sure you have root access]
First Fixing Heating Issue
Download Device Control App from Play Store
Open the app and grant root permissions
1. Go to Extras in the Performance menu and select Thermal Driver and enable Core Control and MSM-Thermal.
2. Now go to Cpu Setting in the menu and enable MPdecision.
3. Goto Preferences >> Reapply on boot and choose Cpu settings and Extras.
4. Close the app and go to Security App >> Permission >> Auto-start management >> Add auto-start apps and choose Device Control
Second Restoring Performance
Go to this Thread by ravinder0003and download either Balanced Config or Gaming Config
Flash it in recovery or extract the thermal-engine-8226.conf file and move to /system/etc manually (Don't forget the permissions).
Now your device can be used at its full potential without any heat issue
This will work almost in every kernel with qualcomm thermal drivers and is found to the most efficient way of fixing Redmi 1s Performance without affecting battery backup.
If the thermal-engine-8226.conf file is deleted once and rebooted in the past then heating issue will occur even after above settings- try after installing the firmware again through recovery.
Other Settings
Go to Extras >> Powersaving >> Power Scheduler >> 2 - Aggressive in Device control App. It forces the tasks into 2 cores and doesn't wake the other two cores for simpler tasks improves battery backup.
Set the CPU Maximum frequency to 1344Mhz using Device Control if you don't want any heat on the device and get maximum battery backup.
If you want to use the device while plugged in to mains while watching movies or use youtube set the CPU Maximum Frequency to 600Mhz or 998Mhz. [Its highly recommended not to use the device while charging via mains].
Click to expand...
Click to collapse
As above thread asked.. Will this work on V50 on latest release of Stable MiUI ???
Sent from my HM 1SW using XDA Free mobile app
It should work fine for all the version. I lost the device and moved to android one. Rooting is required and warranty is not lost if rooted for XIAOMI device. Make a full backup using philz recovery and try it
Sorry for late and incomplete reply.
The Power scheduler which forces apps to use 2 comes always resets after some time to its default configuration. Any fix?
Sent from my HM 1SW using XDA Free mobile app
[Its highly recommended not to use the device while charging via mains
Click to expand...
Click to collapse
Facepalm
So how to navigate in car on 8 hour trip? Phone downlock to 300MHz from 600MHz. I can't even answer phone call (it's hanging)
Suprb..thanx bro
I just want to know that is there any drawbacks of using core control and msm thermal at same time?
Do they conflict?

mpdecision for mi max helium

It is reportedly not working on the hydrogen model
Dear Friends i saw online one mod which will be of benefit to all of
Mpdecision is watching the load on your device! When you´re only doing simple stuff like browsing, texting or listening to music, the mpdecision service will completely shutdown single cpu cores to reduce power consumption. When you start games or other heavy processes, mpdecision will bring back online all your cores!
You can download Apps like CPU-Z to monitor your CPU Core Status! With mpdecision Service enabled, you can see that some of the CPU Cores go on- and offline. Without mpdecision all Cores are allways online.
It has been developed by the developers at mi-globe com and you can download the mod there
http://mi-globe.com/index.php/2016/...-mpdecision-for-all-xiaomi-snapdragon-phones/
I am using it on my helium and it is working.
seking said:
Dear Friends i saw online one mod which will be of benefit to all of
Mpdecision is watching the load on your device! When you´re only doing simple stuff like browsing, texting or listening to music, the mpdecision service will completely shutdown single cpu cores to reduce power consumption. When you start games or other heavy processes, mpdecision will bring back online all your cores!
You can download Apps like CPU-Z to monitor your CPU Core Status! With mpdecision Service enabled, you can see that some of the CPU Cores go on- and offline. Without mpdecision all Cores are allways online.
It has been developed by the developers at mi-globe com and you can download the mod there
http://mi-globe.com/index.php/2016/...-mpdecision-for-all-xiaomi-snapdragon-phones/
I am using it on my helium and it is working.
Click to expand...
Click to collapse
Thank you !
Sent from my MI MAX using Tapatalk
seking said:
Dear Friends i saw online one mod which will be of benefit to all of
Mpdecision is watching the load on your device! When you´re only doing simple stuff like browsing, texting or listening to music, the mpdecision service will completely shutdown single cpu cores to reduce power consumption. When you start games or other heavy processes, mpdecision will bring back online all your cores!
You can download Apps like CPU-Z to monitor your CPU Core Status! With mpdecision Service enabled, you can see that some of the CPU Cores go on- and offline. Without mpdecision all Cores are allways online.
It has been developed by the developers at mi-globe com and you can download the mod there
http://mi-globe.com/index.php/2016/...-mpdecision-for-all-xiaomi-snapdragon-phones/
I am using it on my helium and it is working.
Click to expand...
Click to collapse
Can i know are you using GlobeRom for it to work and the same Rom version....does flash this will change anything with the rom...
That I am not sure. I am using the Globe rom and it is inbuilt mod in that rom. I dont know if you flash this mod on other roms. May be you can contact the developers.
Hmm.never heard of this ROM. Is it any good? Like what do they mean by battery tweaks..the info is a little vague...
netusername said:
Hmm.never heard of this ROM. Is it any good? Like what do they mean by battery tweaks..the info is a little vague...
Click to expand...
Click to collapse
If you go the link i have given you will be clear
On a cleanly installed globeROM Helium with nothing else on it except cpu-z, after several minutes, the governor changes suddenly to performance mode and sets all online cores to the highest clock speed and sometimes stays there for good even after several reboots. It shuts down some cores but the over-all cpu load becomes so high that it drains the battery so fast and heats up the phone a little while even idle. If the governor changes to performance mode, the govtuner mod becomes useless and incompatible and can never be run unless governor goes back to interactive mode. I use Kernel Adiutor to control cpu problems a little but I have to check once in a while because it still happens and I have to manually set governor back to interactive mode again through Kernel Adiutor. So it is useless for now. I hope they fix it as mpdecision is dong wonders on other snapdragon 650-652 phones like the Samsung A9 Pro.
seking said:
Dear Friends i saw online one mod which will be of benefit to all of
Mpdecision is watching the load on your device! When you´re only doing simple stuff like browsing, texting or listening to music, the mpdecision service will completely shutdown single cpu cores to reduce power consumption. When you start games or other heavy processes, mpdecision will bring back online all your cores!
You can download Apps like CPU-Z to monitor your CPU Core Status! With mpdecision Service enabled, you can see that some of the CPU Cores go on- and offline. Without mpdecision all Cores are allways online.
It has been developed by the developers at mi-globe com and you can download the mod there
http://mi-globe.com/index.php/2016/...-mpdecision-for-all-xiaomi-snapdragon-phones/
I am using it on my helium and it is working.
Click to expand...
Click to collapse
Not Working on hydrogen ROM:- xiaomi.EU 6.11.17
Help me
See the screenshots
I am attaching some screen shots. Obviously it is working as two cores stopped. As soon as I wake up the device I could see for a brief second all cores stopped and they start as the device is woken up.
aaryan45 said:
Not Working on hydrogen ROM:- xiaomi.EU 6.11.17
Help me
Click to expand...
Click to collapse
confirmed on GlobeROM web that mpdecision is not supported on Hydrogen. Maybe OP can edit the title to avoid confusion and error
alf0 said:
confirmed on GlobeROM web that mpdecision is not supported on Hydrogen. Maybe OP can edit the title to avoid confusion and error
Click to expand...
Click to collapse
So Now?
Guys, I tried it on my helium, but didn't work. If you would turn off 2 cores, you can download ex kernel manager and tap on "esacore mode"
Davide__97 said:
Guys, I tried it on my helium, but didn't work. If you would turn off 2 cores, you can download ex kernel manager and tap on "esacore mode"
Click to expand...
Click to collapse
Click Option on left menu -> CPU -> choose Hexacore mode (Disable CPU6 and CPU7).
That's it!

Red Magic 5G MOD Kernel GPUOC 900/940mhz +battery 1.4 STABLE!

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
*** NOTE THAT 3.16 NA OR 4.13 Red Magic 5G SPECIFIC ROMS SHOULD BE USED WITH THIS KERNEL! THE COMBINED ROM (WITH RM5S) HAS UPDATED KERNEL CODE THAT IS NOT FULLY COMPATIBLE AND NUBIA HAS NOT UPDATED THEIR SOURCE CODE ***
*** Please click Thanks (Thumbs up icon) on my post here if you like my kernel and rate the thread 5 stars, then just use it and enjoy - if you want to send me a beer or two feel free - you don't have to use PayPal - Revolut and Amazon.com (USA) gift cards avoid fees. I like to hear from happy users I hope you are glad that you have the fastest phone in the world currently. The active cooling in this device is utilized to the extreme with MOD kernel, meanwhile your battery usage will be much improved at the same time. How? Well, that's all in the source code, free for all to fork it on GitHub and modify to your liking. Just don't forget to credit me and the many great devs that made the improvements possible... without them, there would be no MOD kernel. This is just a hobby of mine and I like to produce a nice product that all can enjoy. I'm also quite friendly and although I may tell you no I won't add that feature (such as network hacking tools), I won't hold anything against you for asking. I have not been compensated other than by some generous folks on my Telegram channel, so this whole project is basically self funded. Red Magic will not support it, unfortunately, but you can if you feel the improvements are worth it. I believe they are, but I come from a biased point of view as the sole developer for RM5G ***
********************************************************************************************************************************************************************************************************************************
NOTICE: YOU ASSUME FULL LIABILITY FOR ANYTHING THAT MAY HAPPEN TO YOUR PHONE USING THIS KERNEL. ALTHOUGH IT WORKS 100% ON MY PHONE, IT MAY NOT WORK THE SAME ON YOURS. THE PROCESS OF ROOTING A PHONE AND INSTALLING A CUSTOM KERNEL ALWAYS HAS RISKS, SO IF YOU ARE NOT COMFORTABLE ASSUMING THOSE RISKS, DON'T INSTALL THE KERNEL! THIS IS A TYPICAL DISCLAIMER FOR CUSTOM KERNELS I HAVE FOUND NO BUGS WITH IT AT ALL. USERS ON CN, GLOBAL, AND NA ALSO HAVE NOT FOUND ANY PERFORMANCE ISSUES OR BUGS (DO NOT USE V7.14 or V8.11) IF YOU DON'T KNOW WHAT YOU ARE DOING, IT'S BEST TO REMAIN STOCK. OR JOIN THE TELEGRAM GROUP, AND GET SOME REAL HELP.
********************************************************************************************************************************************************************************************************************************
Easy root method: https://forum.xda-developers.com/nu...nner-tutorial-unlock-bootloader-t4131585/amp/ although I suggest still using Magisk 20.4 for root.
Note: if you've already rooted and want to upgrade, people have had success saving the kernel as boot.img and TWRP as recovery.img in SmartPack, vbmeta skip as vbmeta.img and placing into the ROM update.zip using MT Manager (a root browser) and saving the updated file. Then do a Settings / System Update / click the 3 dots / local update and select your modified file. In fact I upgraded from 3.13 to 3.16 NA ROM without losing anything this way. Now for normal installation:
Custom kernels require root and Magisk to be installed. This is due to the signature not being signed by Red Magic (the company) itself. Following the above method you will still pass SafetyNet and most apps will work without trouble. If you have a specific app that detects root, well, Magisk Hide the app from Magisk Manager and see if that fixes it. You should also Hide Magisk Manager from various forms of detection (under Settings). Last case is to move the installation of Magisk under a random directory (which I have not had to do and all my banking apps still work), only if the root detection methods used by your app providers are more picky.
MOD KERNEL 1.4 STABLE:
RELEASE NOTES:
Block mode I/O has been changed to Multi-Queue from Single-Queue so your default scheduler is now MQ-deadline (credits to PappaSmurf, excellent kernel dev). You can choose between mq-deadline, kyber, and none in a kernel manager under I/O scheduler. From my benching with Androbench, it doesn't make much difference which one you use. Some have parameters you can tweak. None literally means no scheduler which is fine on an SSD, and has no overhead if you want to select it in a kernel manager. I always recommend SmartPack. To get settings to stick you Toggle "Apply on Boot" and it will go to what you've selected after 5-10 seconds on the next boot.
All debugging has been turned off completely on BBRv2 - thanks to PappaSmurf (I missed a few spots), and debug can't be turned back on from the userspace now. BBRv2 is selected as the default TCP algorithm which users have explained as a "no-lag" algorithm while gaming. It's just generally a fast algorithm all around. For me it works great, but you can still choose from many different algorithms in a kernel manager if you want to.
In SmartPack / Misc / TCP Congestion Algorithm, you have many choices: reno / bbr / bbr2 / bic / cdg / cubic / dctcp / westwood / highspeed / hybla / htcp / vegas / veno / scalable / lp / yeah / illinois. A SmartPack script is included below you can add in SmartPack to show the true TCP algorithm as it will always show Reno (a bug also shared by FK kernel manager). Below it's called Check_TCP.sh just go to SmartPack / Script Manager / Import / Check_TCP.sh. Afterwards, click Execute to see the active algorithm. If you set it on boot, this is the algorithm that will run, despite what the field says in Misc.
Battery is running very well on normal usage I'm getting around 7.5% active screen on drain over 7 hours and <0.7% screen off drain over 13 hours at 90hz screen setting. This is with actively using the phone for multiple "normal" purposes, reading emails, browsing websites with Chrome, reading news, streaming videos, etc. various shopping (Amazon/eBay) and tracking, Reddit feeds and live video, and other random "daily" tasks, up to 10 apps open at a time. Gaming of course will drain more, as will 144hz. I also have dark mode enabled in Settings. To get idle drain down I disabled 3 additional wakelocks that were causing high screen off drain, and so far I haven't seen an issue with blocking them. I also removed wakelocks that no longer exist since the Boeffla WL Blocker default list was created (it was quite old) so it now should be relevant for this device, with no interaction on the users part to disable anything via a kernel manager. Still, in SmartPack you will see a Wakelocks menu in case you install an app that causes idle drain to rise, this can be used to find and block wakelocks causing the problems. It can sort by wakeups and also by time. As it states though, you should be very careful what you disable. There can be unintended consequences and most wakelocks are not well documented as to what they actually control.
Dynamic Stune Boost is entirely removed from the kernel code now, as I didn't see any benefit from using it with this kernel.
Don't forget Dynamic Fsync is hidden under Misc in SmartPack which if you turn on will speed up your SQLite speeds. AnTuTu will penalize you for this, ignore it, your phone will be faster - but I leave it off by default. Androbench will show the true memory benefit. It is significant if an app does a lot of operations on databases. Journaling for the database is held in memory until the screen is off, then it is written. Although there is a chance of a data loss or corruption with this on if the device were to crash, it is safer than just turning off fsync. If you have any unstable apps, just leave it off - better to be safe. On a solid system though, you may notice better performance.
Also remember under SmartPack / GPU there is AdrenoBoost - it is set to low. You can alter to medium or high to get faster transfer between GPU frequencies, although it has worked great for me the way I use the phone. For you another setting may suit you better. Recall RedMagic OS only allows several frequencies which I spaced out as well as possible at 305mhz, 400mhz, 525mhz, 670mhz, 800mhz, and either 900 or 940mhz depending on the version you installed.
Overall I'm very satisfied with this kernel build and don't plan on adding or subtracting anything from it for the time being. It does what it should do, gives solid performance, and good battery life. My last score on AnTuTu setup with defaults 12GB/256GB was 682K which currently is still the top performing phone out there - running at 940mhz GPU. Not all phones can handle 940mhz so use 900mhz if yours cannot. If there are enough requests for an intermediate build (say 925mhz) I can add one later off the same code base. Also note in releases there are "gaming" builds that don't keep track of CPU times at each frequency, which was a request by users to remove any potential lag while gaming. I run the non gaming version, useful if you want to tweak battery usage, but nonetheless, both versions are there for you to use.
I'm on Telegram t.me/NubiaRedMagic5G_Mods as long as I have the phone. Which will be quite a while if Red Magic / Nubia decides to fix N41 5G in the USA.
Also note that all the features of this kernel (besides ones specifically added by me) are the creation of other developers whose contributions are all notated in the kernel source code. Some of the developers that have contributions here or helped me in some fashion: Resurrect88, DD3Boh, PappaSmurf, kdrag0n, Ayrton990, Flar2, Lord Boeffla, plus many more across the globe. Without them, I wouldn't be making any kernels! And I'm sure there are many other devs I've forgotten to mention, I thank all you guys for your help and support.
MOD 1.4 Download Link:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.4
PRIOR RELEASES BELOW:
8th Release:
MOD KERNEL 1.35-BBRv2 STABLE:
RELEASE NOTES:
This is an intermediate release - I realized that the prior release was draining far more battery than it should, and I found the source was debug related code in BBRv2 from Google. So this is the updated kernel that gives you battery life like before this TCP algorithm was added.
CONFIG_CPU_FREQ_TIMES=y has also been added so you can see in a kernel manager how much time is spent in each mhz block for each set of processors. This can be useful if you set in a kernel manager (like SmartPack) a minimum CPU mhz to see how much time is actually spent at each level.
The code base also has Dynamic Stune Boost, but I haven't had time to optimize it for the device, so it's just on default settings. So there are 2 versions of this 1.35-bbr2 release. At some point it will be enabled as part of a regular release (some 17 commits squashed together into 1, Stune Assist was causing issues so I turned it off). The main idea of that set of code additions is to run the device at lower frequencies, saving battery, while still achieving the same performance level to the user of the phone. If you want to try different options for it in SmartPack or FK Kernel Manager you can.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.35-bbr2
7th Release:
MOD KERNEL 1.3-BBRv2 STABLE:
RELEASE NOTES:
Added the 31+ commits for BBRv2 from Google. Squashed the commits down to 6 by author from Google (for easy code maintenance). It's said to be the best TCP (internet congestion) algorithm so this sets it by default. You can still select from the others added in 1.3, as mentioned only EX Kernel manager properly shows them. But SmartPack if you choose the one you want under Misc, then click Apply on Boot, it actually will load the TCP algo you selected. It's just a visual defect. I also made a script for SmartPack uploaded to show you the TCP algo that's selected in my repo you can install so you can verify for yourself. Give it 10 seconds (default on boot setting) before you check.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.3-bbr2
6th Release:
MOD KERNEL 1.3 STABLE
RELEASE NOTES:
All this release adds is TCP congestion algorithms. The only kernel manager which correctly shows the algo set correctly is EX Kernel Manager. Using SmartPack or FK Kernel Manager will tell you that you're always on Reno, when in fact, you aren't. I'm not quite sure if this is bug related to 865 kernels as a fellow dev had the same experience (on an Op8 Pro). Now the default is set to BBR. Why? No reason specifically, although it is one of the better algorithms for internet usage. You can easily change in any kernel manager and set on boot which one you'd like to use (see above RELEASE NOTES if using SmartPack). But this gives you plenty of options:
BBR, BIC, CDG, CUBIC, DCTCP, WESTWOOD, HSTCP, HYBLA, HTCP, VEGAS, RENO, VENO, SCALABLE, LP, YEAH, ILLINOIS
You can Google the benefits of each and pick what you like. Or just leave it alone. The prime idea of MOD kernel is that you don't need to adjust anything it just works optimally without any intervention. Read the release notes for prior features that have been added. There are many just not summarized in a single place at the moment. All the optimization has been done for Red Magic OS.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.3
5th Release:
MOD KERNEL 1.25BETA
RELEASE NOTES:
This release is mostly about battery savings. I'm averaging around 6.5% active drain on normal tasks with this version (90hz setting), and around 0.5% screen off drain. A big improvement over the stock kernel. So I ended up with about 13 hours SOT + 24 hours screen off on 1 charge! See the picture, I stopped at 11% left. Now I didn't say anything about gaming. If you want to game and have power saving benefits, don't enable any of the built in boosting modes in the game launcher - the Red Magic OS will override everything. Let the kernel do the work for you. And if you're seeing any graphics lag, go into SmartPack kernel manager (free) and go under GPU, Adreno Boost is enabled on low, you can set it to medium or high. That will increase the speed at which the GPU throttles up and down.
1) Switch to the Energy Model for CPUs: Several subsystems (thermal and/or the task scheduler for example) can leverage information about the energy consumed by CPUs to make smarter decisions. This config option enables the framework from which subsystems can access the energy models.
2) Added CPUMASKS for the Little, Big, and Prime cores from Sultan Alsawaf Sultan: SultanXDA, prime added by Danny Lin: kdrag0n.
3) Added kernel control of the minimum frequencies for the little and big clusters by Danny Lin kdrag0n. They are set to run at their minimum running frequencies when idle 691mhz (little) and 710mhz (big) which results in nice power savings when web browsing or just under low load in general. Prime cluster min is not set as it makes the CPU scheduler function poorly.
4) Added AdrenoBoost by Aaron Segaert: Flar2, with all its changes squashed into 1 commit. Defaults to low setting. As mentioned before, you can change in SmartPack, and set on boot if you need a higher value than low: https://github.com/SmartPack/SmartPack-Kernel-Manager/releases
5) Uploaded the various GPU OC files to the repo, It still will just build off the default one, but they are here to be complete. 940mhz version again is posted, Building direct from the repo will give you 900mhz max GPU.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.25BETA
4th Release:
MOD KERNEL 1.2 BETA
RELEASE NOTES: (Note a 940mhz GPU clock edition is available, if you want to try it, a few of us have had good results on it. Likely the max an 865 GPU can run. You'll sacrifice the power savings, however):
1) Enable Power-efficient workqueues by default, add a toggle that can turn this off via a kernel manager (under CPU in SmartPack). Enabling this makes the per-cpu workqueues which were observed to contribute significantly to power consumption unbound, leading to measurably lower power usage at the cost of small performance overhead. Have also added many other power saving features to the defconfig. The phone is a beast, power savings is a good thing to implement.
2) Update the LZ4 decompressor algorithm with a much faster variant for the ZRAM swap, now version 1.8.3-9 credits Gao Xiang [email protected] and many others (check commits). Speed improvement below (should help on 8GB devices):
Compressor name Compress. Decompress. Compr. size Ratio Filename
lz4hc 1.7.3 -9 12 MB/s 653 MB/s 42203253 42.20 enwik8
lz4hc 1.8.3 -9 11 MB/s 965 MB/s 42203094 42.20 enwik8
3) Default scheduler is set to SQ deadline. Should see minimal improvements in speed until I get a MQ variant working. On the task list ahead.
Download Link:
1.2BETA: https://github.com/mrslezak/NX659J_Q_kernel/releases/download/1.2BETA/MOD-RM5G-GPUOC-Beta1.2.zip
940mhz GPU release here, it's still 1.2BETA, just with the max clock a few of us have been able to use. That doesn't mean your device can for sure handle it, but give it a try if you'd like! Note the power savings will likely not be there vs the other release at 900mhz:
https://github.com/mrslezak/NX659J_...oad/1.2BETA/MOD-RM5G-GPUOC-940mhz-Beta1.2.zip
3rd Release:
1.15BETA: https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.15BETA
This is a HEAVILY updated release of the MOD kernel 1.10BETA - I realized the phone's software will allow 6 frequency clocks, although 1 did not have a regulator defined (now patched). NOW I VERY HIGHLY suggest installing SmartPack Kernel manager. It will give you insights into the kernel and how it's performing and it's free. It also will let you adjust added options now in the kernel. Just root your phone and flash from TWRP. If you haven't already installed Magisk, then install that too. There's a guide I posted on XDA about that. Use the experimental method there is no reason to unlock your bootloader. https://forum.xda-developers.com/nu...how-to-unlock-bootloader-redmagic-5g-t4081743
RELEASE NOTES:
1) Bugfix: there was 1 missing 800mhz GPU frequency regulator clock on the prior version. This has been set to TURBO, 1 level under the 900mhz regulator of TURBO_L1.
2) Boeffla WakeLock blocker (v1.10 + tweaks) has been added to reduce battery drain when the phone is not being used, using the latest version and all patches. A default block list is included. You can access in SmartPack Kernel Manager under the new menu that will appear "Wakelocks" - especially investigate if your phone has high idle drain, you can experiment with blocking other wakelocks (which don't allow your phone to sleep). Or you can leave as is. I get just under 1% drain (screen off) and the phone sleeps quite often with this version. Take a look at the screen shot! That's just normal phone usage, not gaming.
3) All debug entries (except those required) have been stripped completely out of the kernel. This results in less wasteful debug information being generated.
4) The default algorithm for ZRAM has been changed from LZO (high compression, but slow) to LZ4 (slightly less compression, but fast). LZ4 algo was added. It still defaults to 4GB.
5) Dynamic Fsync has been added to the kernel as well. This patch allows journal entries to be written only when the screen is off. I.e. they are cached and written afterwards. This increases database performance. It is disabled by default so in SmartPack Kernel manager, if you'd like to turn it on, go under Misc, select Dynamic Fysnc, and select apply on boot. There is always a risk of data loss when delaying writes, although I've personally never have had issues - it only happens if the phone crashes, and mine has never crashed on this kernel. This won't normally increase your benchmark scores (except AndroBench), it increases SQLite database access speed. Up to you to use or not, works fine on my device.
6) Here are the updated frequencies (note there is 1 more). Will have to wait for AOSP before I can add back more. Note the 670MHz is likely the 865+ max frequency per the release notes today on the device (which I assumed by the source code anyhow pre-announcement): 900MHz / 800MHz / 670MHz / 525MHz / 400MHz / 305MHz
AS ALWAYS, USE AT YOUR OWN RISK!!!
Github Source:
https://github.com/mrslezak/NX659J_Q_kernel
Initial Release:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.0.BETA
Second release - gets over the "reset to 490mhz" bug caused by the system software, at the expense of reducing frequencies to 6 total:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.10BETA
Newest release -> will be posted on the top from now on.
Telegram:
https://t.me/NubiaRedMagic5G_Mods
And note the AnTuTu benchmark is just a first run after installing. 670K is likely a record on any 865 phone. The last bench turning off 4GB ZRAM (12gb/256gb device) I got 673K. AnTuTu doesn't equal performance, but if you've benched you'll see this is an insane improvement over the stock kernel. Only when the demand is there will it scale up to 900mhz. I've been using for a while now and notice no difference in battery life. The Adreno driver is very good at handling extra clock frequencies efficiently without modification (despite an "Adreno Boost" that is often added to kernels). The gamers using the kernel are making statements that they couldn't imagine the game play any better than it already was, but now it's even smoother.
Unfortunately the way the Nubia software behaves, it auto-resets to power level 5 (which was 490mhz) on the 1.0BETA on boot and also after boosting the frequencies up. I tried every possible way to bypass this but eventually just gave in and removed frequencies. So the BETA1.10 and above have less frequencies but will always revert to 305mhz, the base minimum frequency of the device. Hopefully once we have AOSP ready I can add more.
MattoftheDead
I.e. M.O.D. Kernel Developer
The first Red Magic 5G OC kernel.
Xiaomi Mi9 / Mi9T Pro Pie V2 and Q V1.5 Kernel Dev
Nice work. Do you notice any benefits to OCing the GPU like that? I don't think there are many games that would benefit atm.
This is amazing !!! :laugh:
Is this going to work on all roms like CN, NA or EU Roms? Im currently running NA 3.11 flash from CN rom with root and twrp
We have people using it on CN Global and NA versions no problem at all. Works fine on every model.
Kernel is fully functional no issues at all.
CN Rom to NA Rom v3.11
305mhz min to 900mhz max confirmed and using smart pack to control the frequency
Thank you for this hopefully there is more development i really appreciate ur effort
Kernel building is just a hobby of mine, I was posting a minimal kernel to get some more kernel developers on board to hopefully add more features. I usually add Boeffla Wakelock Blocker and Dynamic Fsync and call it a basic kernel. The last super kernel I made took way too long, and I don't have that kind of time anymore - boost functions and underclocking to balance out the battery life and such. Development work doesn't pay anything, I didn't get the phone free, all my donations go to other developers. And I have a full time job and family. But if anyone wants to port over my MOD Kernel Q 1.5 Mi9 features, well that would be a super kernel. It's just really, really time consuming, time I don't have at the moment. And the merging of source has to be EXACT or you end up with a really slow phone rather one that balances underclocking, boost, and overclocking.
MishaalRahman said:
Nice work. Do you notice any benefits to OCing the GPU like that? I don't think there are many games that would benefit atm.
Click to expand...
Click to collapse
All the gamers using the kernel are reporting that the games run smoother than before, which no one thought was possible. It is already a flagship device. But the GPU OC with the Adreno driver scales when needed up to the frequencies that it has in the table and has no issue on 670, 800, and 900mhz reported so far. There are gamers on NA, Global, and CN ROMs, with no bugs reported. No issues and everything works properly. I have tested myself and although I'm not a gamer, all the functions work as they should. It still connects via Bluetooth, it still takes photos and videos, etc. There is no lag whatsoever. Overall I think the frequencies are ideal for this device with it's advanced active cooling system. Other devices however, with passive cooling, are unlikely to handle the increased GPU clocks.
I found an unusual bug where the GPU Minimum Frequency will reset on its own to 490mhz even if i set the minimum frequency to 305mhz im using smart pack kernel manager that you provided and cool tool btw to monitor the gpu frequency.
I also set the battery optimization to off on smart pack so it wont turn off itself.
This also happens when i played games that actually boost to 800 to 900mhz then after i close the game it sets back the minimum frequency to 490mhz so i have to set it again to 305mhz on the kernel manager to save more battery and lower the temps.
I also notice it sets back to 490mhz minimum frequency by just watching youtube videos so i have to set it back to 305mhz again. I tried different kernel manager too like Franco Kernel Manager and Kernel Audiator and still doesnt fix the issue
I think this was a minor bug for sure
I never touch the GPU governor btw
Performance was super nice thou i scored 645k on antutu on my first run but for now im going back to stock and gonna wait for your next update
What to do to root the phone without breaking the fingerprint please. I read the article publish nothing understood someone can explain to me step by step. I am an amateur I never root a phone. I have cn 2.55 16gb.
I don't have the same issue - I just tried to recreate it by watching a YouTube video and I went back to SmartPack and it still shows 305MHz GPU frequency. Although I'm using the debloated / optimized ROM I created Black Magic 5G which has everything setup properly, Nubia apps frozen, everything moved to 3rd party apps. NETFLIX patched to 4K HDR10, YouTube Vanced, a ton of root utilities, AdAway ad blocker, etc. You can find it on the Telegram channel (I'm using the NA/Global version of Black Magic 5G). Then I watched Netflix, still at 305mhz. As I have no idea how you've setup your phone, I just can't recreate it.
shaifabra5 said:
I found an unusual bug where the GPU Minimum Frequency will reset on its own to 490mhz even if i set the minimum frequency to 305mhz im using smart pack kernel manager that you provided and cool tool btw to monitor the gpu frequency.
I also set the battery optimization to off on smart pack so it wont turn off itself.
This also happens when i played games that actually boost to 800 to 900mhz then after i close the game it sets back the minimum frequency to 490mhz so i have to set it again to 305mhz on the kernel manager to save more battery and lower the temps.
I also notice it sets back to 490mhz minimum frequency by just watching youtube videos so i have to set it back to 305mhz again. I tried different kernel manager too like Franco Kernel Manager and Kernel Audiator and still doesnt fix the issue
I think this was a minor bug for sure
I never touch the GPU governor btw
Performance was super nice thou i scored 645k on antutu on my first run but for now im going back to stock and gonna wait for your next update
Click to expand...
Click to collapse
Yeah maybe because you modified the rom.
Im currently running Flash Global V3.11 when i tested your kernel no modification made im just rooted with TWRP Installed and i posted this kernel on red magic 5g group on facebook and 3 of us having the same issues as well.
Im gonna try it again on V3.13
UPDATE:
still returning to 490mhz as minimum frequency after gaming and after watching one youtube clip
kinda sad hopefully you can fix this bug on the global rom that nubia provided if you have the time, great kernel for gaming because of the 900mhz boost and the phone can sustain this boost because of the active fan
Why don't I have a roughly similar score?
Is it possible to overclock the CPU as well? They officially release the specs sheet of ROG Phone 3 it has overclocked CPU (3.091ghz) and an overclocked GPU. I know this phone can keep up with those clocks because of the cooling system but the problem is the battery life. But still, its worth it.
Blink003 said:
Is it possible to overclock the CPU as well? They officially release the specs sheet of ROG Phone 3 it has overclocked CPU (3.091ghz) and an overclocked GPU. I know this phone can keep up with those clocks because of the cooling system but the problem is the battery life. But still, its worth it.
Click to expand...
Click to collapse
I believe Qualcomm blocked overclocking of CPUs quite a while ago from SD845. Only GPUs can be overclocked.
Though I don't know if devs have gotten tools to get around it.
The 490 bug looks like it's related to the gaming mode APK resetting the min frequency. I can't decompile or recompile APKs so I don't have a way to get around the system reverting to 490 without removing 3 other frequencies. It seems hard-coded in the app that it only expects to see 5 frequencies so to have all working properly, 3 need to be removed. This is in contrast to what my buddy dev on the Op8 Pro can do, but this device is designed differently in how it boots and custom apps that increase frequency clocks. If any devs are good with APKs it's a very simple function call that sets the minimum GPU frequency. The only odd thing I see is that the minimum power level stays at 8 (minimum) which corresponds to the lowest clock speed. That number doesn't change in a kernel manager when the min GPU clock reverts to 490.
I'm off on vacation not near a PC but will try to come up with a stock # of clock frequencies that still scrolls smoothly between them and the Adreno GPU driver. May take a few tries but it's quite easy to modify. I already think 180mhz is too low from using it, it's more of a sleep frequency some suggested going this low but I think the phone design is for 300+. I prefer to use more clocks for better throttling but have to work with what we are given and do the best inside those boundaries.
No you can't raise CPU clocks on 865 devices that ROG device is supposedly using the 865+ or whatever the mid device is named between the 865 and 875. They have blocked CPU OC hardware wise for some time now.
mslezak said:
No you can't raise CPU clocks on 865 devices that ROG device is supposedly using the 865+ or whatever the mid device is named between the 865 and 875. They have blocked CPU OC hardware wise for some time now.
Click to expand...
Click to collapse
Qualcomm's Meizu’s CMO Wan Zhiqiang recently commented on Weibo saying that there won’t be a Snapdragon 865 Plus this year.
We will see!
No 865+ this year..
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
mslezak said:
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
Click to expand...
Click to collapse
Is it possible to overclock the memory clock too? I assumed that 900mhz is the core clock.
mslezak said:
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
Click to expand...
Click to collapse
You're right, that makes sense.
I'm glad they are making a refreshed chip.
On another note, do you think we will see an overclocking tool in the future?
Possibly with a custom ROM?

Categories

Resources