We're trying to benchmark an app on our DNA Droid and want to forcibly enable/disable CPU cores. We've done this on other devices, but it appears the Krait/Qualcomm stuff has another layer that disables CPU cores after we enable them through /sys/devices/system/cpu/cpu#/online = 1. I'm guessing a power save level. We also normally switch to userspace governor to force the CPU to run at a certain frequency.
We could use an app if that is the only way, but we would prefer scriptable (command line) solutions. And we're running a basically stock kernel + the writable system area patch (from here).
Thanks in advance.
Using the shell, try killing mpdecision.
Sounds like a good target after my quick Google search for what that is. I'll let you know what we figure out (the other guy is at lunch right now ).
---------------------------------------
"adb shell stop mpdecision" seems to block it until the screen goes off. Then if you disable the screen sleeping while connected (in developer options usually) we hope to be golden for now. Would be nice to be able to just disable it all together, but this is at least a workable crutch.
Apparently killing the process just triggers a re-run of the it.
Related
Hello,
I would like to know if its possible to change the power mode via shell commands.
I want achieve that tasker switches to power saving mode when the display is off.
Anyone knows how to do that?
Regards,
Brantje
you could probably make something with gscript or scriptmanager to accomplish that. the files you meed to make the script point to is in /system/etc I believe.
on another note, I think it doesn't matter what power mode you in when display is off. all modes will go into low powersavings then kick into deep sleep. no advantage over the other, as far as display being off goes. I would think. you can get a free app, here in xda, called better batter stats to see how your device performing with display off and you could also get free app called CPU spy to see how long your device stays in different speed frequencies.
Hi, all!
Some people, like me, may have downloaded a cpu-monitor app like System Tuner then notice their second cpu (cpu1) always appears offline.
First off, I recently realized that that is often inacurate. Using another app like SystemPanel would show both cpus being online, and more importantly, checking sys/devices/system/cpu/cpu1/online would show it's "1" indicating online. Many cpu app's inability to read cpu1's info is because "cpufreq" folder is missing from cpu1 folder (if you check cpu0's cpufreq folder it's always there).
K, now also, some poeple like me, thought cpu1 was really offline, and used System Tuner's "Force all cpus online" option, and viola, after reboot the second cpu showed up. But why? Cuz a "cpufreq" folder is found in cpu1 again.
What is interesting is both files "affected_cpus" and "related_cpus" would show "0 1" meaning core 0 and core 1 are in sync and both coordinated simultaneously. if you change settings(freq,governor,etc) for one core it automatically changes the other.
Now here's the tricky part, however after the tablet goes to sleep, when I wake it, cpu1's "cpufreq" folder would disappear again, meaning Sytem Tuner would show cpu1 agains as "offline". But if you chekc "online" file in folder you'll see it's still online ("1") and SystemPanes still shows cpu1 activity. However "affected_cpus" and "realated_cpus" will show only "0" meaning only cpu 0 is in this categoty and cores are no longer in sync.
Conclusion: so far what I deduced is my tablet in its default state has both cores online, but are off-sync. After turning on "Force all cpus online" and rebooting, they are both online and in-sync. After the device goes to sleep and wake, the two cores are still online but now off-sync.
The important thing about this investigation is how much it affects 3D performance. I was always confused why my device lags with a aged-game like Counter Strike portable but is perfectly smooth in a consol-quality game like Mass Effect Infiltrator. My current thought is Mass Effect acttively tweaks your cpu while most other games leave cpus as they are.
Benchmarking (using market benchmark apps):
(First off, the FPS difference may seem small but in running the actual games for some reason it made a enormous difference, often the difference between crashing and not crashing/playable or unplayable in Nova3/Shadowgun)
Default, newly flashed rom: FPS :33 (Some games fail to load graphics properly for some unknown reason)
Turn on "Force all cpus online" with Sys Tuner: FPS 39-40 (All games are silky smooth, no errors, tablet temp hotter)
"Force cpus online", then after wake from sleep: FPS: 33-34 (not as smooth before sleep, but games generally load properly)
**Switching my cpu0 gonernor to the same governor I think cpu1 is using: FPS 35-37 (no errors, almost as smooth as "Force cpus online")
Here's a crappy surprise --Cpu1 off (turn off dual core): FPS: 39. (Completely smooth, zero errors, hottest tablet temp)
**after cpufreq folder disappears from cpu1 I cannot be sure which governor cpu1 is using, but checked with Kernel Tuner and believe the system switch it back to "performance2" which is a governor foudn in my tablet.(it it not like "performance" governor) upthresh 60 downthresh 30 freqstep 5.
Conclusion:
This leads me to the conclusion that having both cpus online does not necessarily improve performance, but if the two cpus are off-sync it definitely BUTCHERS performance. It does so so badly that running one core is actually better. Having both cores run the same governor also seems to help somewhat.
Need help:
I hope the info so far may helped some people, but the help I also really need is someone to tell me how are "affected_cpus" and "related_cpus" controled by the system? So far I had no sccucess modding their values and forcing cpus to "sync". I enter "0 1" but it doesn't go through. Since having the cpus in sync seems to give good performance and lower temp (single core was good but temp was noticeably high), I want my cpu cores to remain in sync, but currently it undoes the sync after waking from sleep. I need to understand how and why the system somtimes decides to coordinate both cpus synchronously so both cpus appear under "affected_cpus" and "related_cpus"?
Thanks to anyone for reading!
Hello everybody, today I present my guide or actually the procedure of modifications presently installed on my Xperia U.
1. Grab your Xperia U (I presume it is bootloader unlocked, rooted and installed Stock ICS based firmware)
2. Battery Supercharging-
a. Let your battery charge to 100%
b. Unplug charger and Reboot into CWM and wipe battery stats
c. Reboot into system and use phone as normal until battery is exhausted. (Now your battery is calibrated)
d. For maintenance of life of battery pack thereafter, let battery drain to not below 10%
e. Always charge battery short of 100% i.e. 85-95%
f. Once in a month, shut down your phone at 30-60% charge, remove your battery, and just leave it outside the phone for an hour or so.
Be compassionate, as Gandhiji had said
g. If you want to recalibrate your battery, follow steps 2a-2c. Recalibration for Li-poly is not that essential, since it has no memory but you can do it once a month or after flashing a new ROM.
h. Never leave your battery discharged for very long. Your Li-Poly battery will suffer a deep discharge.
3. CPU Control
a. Download BrainsKernel or Munjeni's Kernel
b. Install it using flashtool or fastboot (i presume you know how to do so)
c. Download your favourite CPU Control App (setCPU, noFrills CPU Control etc.)
I recommend CPU Tweaks as it gives you info on both cores at the same time and also has the time graph for when CPU is asleep (setCPU lacks that)
d. My recommended governor setup-
[Try to use a governor with inbuilt hotplug technology (hotplug means ability to control cores i.e. turn of second core when not required and turn it on when required) Eg. Hotplug, Lulzactive, PegasusQ, Hotplug etc.]
For normal use-
LulzactiveQ 800/200 MHz
For Music(Screen Off)
OndemandAX 800/200 MHz
For Gaming(Dead Trigger etc.)
Ondemand/Hotplug 1000/200 MHz
TIPS-
Remember that most governors with a screen off profile(Smartass, LulzactiveQ, OndemandAX) built in have a wake frequency (CPU immediately jumps to that frequency when screen on) is around 500-700 MHz, so try too keep your Max CPU limit at 800 MHz to prevent screen on delay. This is required as Xperia U has no 600 MHz intermediate CPU step, it has only 400 and 800. 400 is below the wake frequency so capping CPU at 400 MHz will cause lag during wakeup.
For me, using LulzactiveQ saves more power than SmartassV2 or Powersave. This is due to the fact that LulzactiveQ shuts off my second core much faster and much more dynamically than SmartassV2 of Powersave.
LulzactiveQ has a screen off profile of setting CPU speed to around 200-400 MHz while OndemandAX caps it at 500 MHz.
So OndemandAX is better for music as there is no tearing in playback when screen is turned off.
e. If you want to forcibly keep one core off (NOT RECOMMENDED. USE A HOTPLUGGING GOVERNOR INSTEAD) use XCore. It works on Xperia U and Xperia P. Check out the Play Store for further details.
4. RAM Management (Android does this on its own, usually. But you can help it)
a. NEVER use a Task Killer. Android kills tasks much more dynamically than your brain does
b. Delete all bloatware you do not need. This will prevent some background processes from being run and it will save some RAM.
c. Do not use a separate app for Facebook unless absolutely needed. (XDA App is fine )
d. That widget, sitting on your homescreen, which hasn't been touched for the past 1 week can be trashed.
5. GPS Superiority (You'll never use AGPS anymore)
a. Download an app called FasterGPS from the Play Store.(needs root)
b. Open the app and choose you continent and region. If your region isn't there, choose the closest region.
c. Get your ass out in the open and get a lock in less than a minute only on pure integrated GPS.
6. General Tweaks
a. Go to developer options in settings and set Animation Scale to 0.5x
b. Get a good statusbar mod (I recommend Xperia Tab n Grid Jelly Bean).
Why? So that you turn off the WiFi and BT and Packet Data when not required. I wouldn't do that earlier as I was too lazy to go all the way to settings to do so. Now I use the notification toggles and save some power
c. Turn OFF your phone and then charge it.
d. Use Lux Dash, an app to control your brightness. At night, set it to sub-zero to save power.
7. Physical Tips
a. Get a case for your phone. Incase you drop it, it will protect your phone.
b. I know you're tempted to take your phone to the pot and have fun but NO. People have lost phones like that.
c. Every week, clean your phone with a spectacle cloth.
d. Do not overstress your phone, or else you risk your hardware. I know they are designed to face all this but as Gandhiji said, compassion.
Hope these tips help you and your phone
Hi, as title says, i would like to replace screen off mode on my N9005 with app NoLED. App has option to always show clock when screen is off and its jumping on the screen, so (i guess) it won't burn my pixels. Turned off LockScreen (keygard), so after pressing power it turns off screen and few seconds after that it shows jumping clock (if enyone knows how to remove that few second delay it would be great, tried to launch every single NoLED app activity with Tasker and Secure Settings plugin and no luck). App also shows app icons when there is notifications. Long tap on icons opens their app, also, triple-tapping screen "unlocks device" (closes app). App can be also closed with single physical button click, so i plan to change that with Xposed Additions to double or triple tap (for security reasons).
Battery saving part:
Using FauxClock app set performance profile for NoLED with:
-min and max cpu freq: 300MHz
-cpu governor: powersave
-gpu max freq: 200MHz
-gpu governor: msm-adreno-tz (haven't changed, don't know which is the best, other options are: performace, simple_ondemand)
-Eco mod enabled
Is there more things to tweak for battery save?
I keep wifi and gps always on, and turn on bluetooth, data and nfc just when i need them. Plan to change wifi scan interval with tasker, also, use Intelli3G to turn 3G on just when data is enabled. Used System Monitor and noticed that, when NoLED screen is active, processor, most of the time, runs on 1 core (300MHz as set) and on 60% and up, is that ok?. Note 3 has AMOLED screen, so, i hope it won't drain my battery. Screen Brightness is set in app on 20%.
Most important question is: will these settings damage my phone in any way if i use them for a longer time?
Also would like to hear your suggestion for battery saving.
Thanks in advance.
From my understanding, Kernels that have schedutil governor has a CPU frequency boosting feature which gives the CPU a push from the back to do a job faster than it was supposed to.
It does make the phone notably faster and smoother but if not configured properly the battery takes a hit.
Enabling schedtune.prefer_idle turns off that frequency boost of a running core and forces the workload on an idle core. But there seem to be 4 separate options to enable schedtune.prefer_idle and I have no idea what they are and how they are gonna affect the kernel after enabling/disabling
Those 4 options are :
• Foreground
• Background
• Real-Time
• Top App
Here are the pictures if you want to take a look.
https://imgur.com/a/sxuBvWR
https://imgur.com/a/8e4nuxj
Can someone tell me what each function does? Thanks in advance
@TrenchFullOfSlime can you help me out one more time if possible?
schedtune.prefer_idle appears to influence only one thing: whether a process will share time on an already-active core or wake up an idle core. The latter uses more power but gives the process more resources. CPU frequencies are determined by the _boost toggles, with schedtune.boost determining how aggressively the frequency is changed (accepted values are 0-100, so I guess it's an abstract scale hiding the actual size of the frequency steps). This apparently works by lying to the governor about how heavy a process is: https://lwn.net/Articles/706374/
https://forum.xda-developers.com/t/...-pixel-xl-and-eas-even-more-smoother.3528807/ suggests not going over 10.
https://forum.xda-developers.com/t/screen-on-time.3923963/page-9 suggests "turning off prefer.idle and enabling stune.boost reduced power use by 15% without affecting responsiveness" (paraphrased). Turning both on could increase responsiveness at the cost of greater power use, turning both off would do the opposite.
As for the different categories, they determine what triggers this behavior. You might prioritize performance for foreground apps, but battery efficiency for background apps. It can also be used to increase boot times: https://source.android.com/devices/tech/perf/boot-times
More information: https://www.fatalerrors.org/a/schedtune-learning-notes.html
TrenchFullOfSlime said:
schedtune.prefer_idle appears to influence only one thing: whether a process will share time on an already-active core or wake up an idle core. The latter uses more power but gives the process more resources. CPU frequencies are determined by the _boost toggles, with schedtune.boost determining how aggressively the frequency is changed (accepted values are 0-100, so I guess it's an abstract scale hiding the actual size of the frequency steps). This apparently works by lying to the governor about how heavy a process is: https://lwn.net/Articles/706374/
https://forum.xda-developers.com/t/...-pixel-xl-and-eas-even-more-smoother.3528807/ suggests not going over 10.
https://forum.xda-developers.com/t/screen-on-time.3923963/page-9 suggests "turning off prefer.idle and enabling stune.boost reduced power use by 15% without affecting responsiveness" (paraphrased). Turning both on could increase responsiveness at the cost of greater power use, turning both off would do the opposite.
As for the different categories, they determine what triggers this behavior. You might prioritize performance for foreground apps, but battery efficiency for background apps. It can also be used to increase boot times: https://source.android.com/devices/tech/perf/boot-times
More information: https://www.fatalerrors.org/a/schedtune-learning-notes.html
Click to expand...
Click to collapse
I don't know who you are, I don't know what you do but I feel like you are an angel! You went through all the troubles to get those links only to answer me which made me so happy.
If I'm being honest, the way you describe things is incredible. I didn't have to read a sentence twice. You can be a good writer or a teacher if you try.
Thank you so much