[Galaxy S 4 i9505 Android Development] mattiadj:
STOP! THIS MOD IS ONLY FOR SAMSUNG ROM! NOT WORKING ON ASOP, CM OR OTHER SINCE THESE ROM NOT NEEDED IT!​

Hello folks,

finally after 1 month of research, tests and sleepless nights i have made a fix for the cpu cap problem caused by crappy samsung's DVFS system.

For people who don't know what is DVFS please refer wikipedia.

In short terms: samsung added this system to boost benchamark like antutu and he tells us that in KK the system was trashed so benchmark result are not falsified. THIS IS NOT REAL AT ALL!!!

I have discovered after a lot of time that samsung has added DVFS system in other way, more in kernel but disabling it in kernel is not enought! Rom controls the DVFS system!

THE PROBLEM

After heavy playing games for 5/10 minutes the performance became very very low! Game starts to lag a lot and in few minutes became not really playable! The phone is quite hot in the upper part but not really really hot! Exiting game can fix the problem but not always. Only a complete reboot can fix completely the problem!

So i have decide to investigate and i have installed app like KtMonitor (included in kt kernel) or perfmon (http://xdaforums.com/showthread.php?t=1933284) and i have noticed a very strange thing!!!

When game starts for the first time the cpu speed is max at 1890mhz

After a while the cpu goes to 1458mhz and stays at this freq for a while

After some minutes it scales down to 1242, then to 1134, then to 1026 then to 918 mhz!!!

*When 1134 mhz is reached gpu goes down to 304 mhz and when cpu is at 1026 freq the gpu is at 128/200

In this way the game is not playable anymore!

The only way to see again values upper 1242/1458 is to reboot or wait a long time.

THE SOLUTION

The solution is to disable DVFS system from changing cpu and gpu freq table!

After that DVFS is completely disabled! Kernel can handle totally the power of cpu so the up/down scaling! Cpu and Gpu freq are not blocked anymore! The cpu and gpu are used based on tasks and not limited by crap samsung behaviour! Scores in benchmark now are real! In a nutshell phone will fly :)

WHAT YOU NEED

International galaxy s4 with root and Xposed Framework

Samsung DVFS Disabler

THE GUIDE

First of all make a nandroid backup!! I'm not responsable for any problem! You make this procedure at your risk!!!

Install Xposed Installer (http://dl.xposed.info/latest.apk)

Install Xposed Framework through Xposed Installer App

Download Samsung DVFS Disabler

Enable it on the Xposed Installer modules

Reboot your device

IMPORTANT NOTES:

Phone will be very hot and drain battery during heavy session such as games but this isn't a problem. With [MENTION=4325945]ktoonsez[/MENTION] kernel i have set 90C for start throttle and 80C for end i can use the phone without burn my hands or burn it self :D but make attention!

This fix not delete thermal throttle! So the cpu and gpu can throttle without any problem and you can be use it on heavy tasks without fear!

Anyway I'm not responsable for any problem! You make this procedure at your risk!!!

IF YOU HAVE ISSUES

First of all follow the app thread here and then report in the app thread or here:

Rom (version also)

Kernel (version also)

Kernel settings (if available)

Bootlaoder version

Particular apps installed

Particular mod flashed

CREDITS

I have to say thank you to two wonderful devs here:

[MENTION=4325945]ktoonsez[/MENTION] since with his kernel i can find this bizzarre behaviour

[MENTION=3562083]wanam[/MENTION] and his ability with xposed framework! I have made a fix but it was too drastic LoL. With his xposed module the problem is fixed without touching any system files!!! Wonderful! Thank you very much my friend!

The last but not the least the app catLog! Only with this app i was able to find the real problem! The crappy samsung DVFS system!!!!

If you like my job, buy me a beer :)

Now....feedback, feedback and feedback! :)