Hi,
I've been recently playing some Dungeon Defenders on my SGS and well it is still sort of choppy when under stress. What bugs me is the fact that some people (with the same phone) claim to be having a clear lag-less game experience.
I've tried to switch ROMs and went from 2.1 stock eclair, trough 2.2.1 stock EU to latest Darkys 8.0 (with voodoo enabled). I have to say that there was some improvment, but it still has a long way to go.
Now, as Im looking for better gaming experience, I would like to ask if there is better ROM (not that I wouldn't be satisfied with this one though ) gaming-wise.
I also noticed, when running Quadrant Advanced (now getting 1350-1650 which is wierd. I mean 300 difference between two runs ??) that my CPU was, at the time, running at 400MHz with minimum frequency set as low as 100MHz, which seems ridiculous to me. I mean I know that CPU frequency changes in accordance with how much stress are we putting on it, but isn't it possible that even under stress my CPU runs "slower" ?
I would love to somehow improve my phone but as I already have voodoo in place, the only way to do so would be to overclock CPU right ? Or am I missing some other way to improve my phone ?
If Im not, than how safe is the overclocking ?
what would you suggest ?
Thanks everyone for your answers !!!
btw, Im sorry if I misplaced this message !
Uhmm, I can't advice you about the lag. I don't find it choppy playing Dungeon Defenders. Everything is smooth sailing. But it is safe to overclock. There might or might not be stability issues with your phone. Every phone varies. Like mine, I could get max OC to 1.3GHZ and then the phone freezes but I have friends who can OC to 1.6GHZ.
I don't recommend you to overclock though, I have some freezes in game (gameloft games especially) when OCed to 1.2GHZ.
My last effort of improving the ondemand governor by implementing a dynamic sampling rate did not work out as I hoped. Thus I did switch back to ondemand and, with a sampling_rate of 40000 and an up_threshold of 80, XviD playback with MobyPlayer was fine and also FLAC playback with MortPlayer was ok. However, as Morfic and others have noted the GUI feels a bit sluggish with these settings and suggested to try a sampling_rate of 15000. I tried this before, however with a lower rate, playback with MobyPlayer has serious problems with cracks and stuttering sound. Exactly this was the motivation to try and implement this dynamic sampling rate in the first place.
So the question is, why does a lower sampling rate lead to these problems? Since a smaller sampling rate means a greater flexibility and responsiveness, missing the point in time when the frequency should be increase cannot be the cause. Also the polling function which determines the frequency change is relatively light-weight, thus the extra CPU load for calling this function more often should also not be the problem. The only reason I could think of was that maybe switching the CPU frequency at these fast rates might be the root of the problem.
Thus I took the ondemand governor and implemented an additional parameter 'min_timeinstate' defining a minimum time the CPU will stay in a certain frequency state before it will be allowed to switch frequencies again. This way one can have a fine grained polling by setting the sampling_rate to a low value without running into problems with these fast frequency changes.
I did some extensive testing with a sampling_rate of 10000, min_timeinstate of 40000 and up_threshold of 90 and FLAC, mp3 and video playback all seem to work flawlessly. So it seems the root of the problem was indeed that the CPU does not handle fast frequency changes well.
I tested several apps and games and so far I have not found anything that this governor cannot handle. Thus I dare to say that it seems to be the superior choice over ondemand.
Test it, torture it, try to break it - I am looking forward to your feedback.
Changes to the source: http://www.pastie.org/2586936
BUGFIX:
Fixed compilation error with 'lazy' chosen as default CPUfreq governor.
Bug fix: http://www.pastie.org/2587040
BUGFIX #2:
Added sysfs parameter 'screenoff_maxfreq' which when enabled will cause lazy to always select the maximum frequency while the screen is off.
Bugfix: http://www.pastie.org/2775900
No further patches will be published here. I have set up a git repo for all my tweaks. Each mod has its own branch to keep the tweaks cleanly separated and one can simply pull the latest patches from the corresponding branch.
https://github.com/Ezekeel/GLaDOS-nexus-s/tree/lazy
now this sounds interesting
Did you try building with lazy as default?
EDIT: builds fine as option, but not default. Too eager to try it to go fix code.
Oh, you are right. That does not work. I will fix it.
Bug fix: http://www.pastie.org/2587040
do we have to wait for this to be implemented in netarchy etc to use it .. ?
theallian said:
do we have to wait for this to be implemented in netarchy etc to use it .. ?
Click to expand...
Click to collapse
Yes, unless you can compile a kernel yourself you will have to wait. I do believe that there's a testing Trinity TEUV kernel by Morfic in his thread with the new governor as an option if you want it now.
theallian said:
do we have to wait for this to be implemented in netarchy etc to use it .. ?
Click to expand...
Click to collapse
Check trinity thread, there are 2 kernels with it and cooler colors, closer to voodoo punchy (if not exactly punchy)
Sent from my Nexus S using Tapatalk
awesome work ezekeel!
its running great here with the teuv kernel and the lazy governor. no complaints as of yet.
youll have to wait for it to be compiled into netarchy, or compile it yourself. you can try it already compiled into the trinity teuv kernel found here http://forum.xda-developers.com/showpost.php?p=17839805&postcount=4304
Yep it's working awesome so far. Using morfic's teuv with lazy gov.
Code:
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 2c00088..b03d1e1 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -357,6 +357,9 @@ extern struct cpufreq_governor cpufreq_gov_performance;
#endif
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_performance)
+#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_LAZY)
+extern struct cpufreq_governor cpufreq_gov_lazy;
+#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_lazy)
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE)
extern struct cpufreq_governor cpufreq_gov_powersave;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_powersave)
seems to do the trick
Hi Ezekeel, an observation in the trinity thread mentioned that some games lagged really badly, i think it could be with too slow changes, due to your time delay feature. I'm not sure if it's feasible, but maybe a solution to this could be a dynamic time delay, longer for the lower frequencies (suited for music while screen off) and shorter for the higher frequency (for these intensive games).
Now I'm not a kernel guy, although I do wish to learn at some stage in the near future. This is just the product of some quick thinking, I have no idea if it is a workable theory or if it would just cause overhead and create more lag. Please let me know what you think though!
Sent from my Nexus S
Been running the TEUV kernel with the lazy governor on since last night and here are a few of my observations:
1) Amazing battery performance. During heavy use with pretty much everything on and the screen at maximum brightness, I lost a mere 6% over a 30 minute period. Turn the screen down and back to normal use? 1% over 2 hours. Not to mention the fact that for the first time in a very long time my phone charged to 99% and when pulled off the charger stayed there for a good amount of time.
2) Upon booting, things stutter a bit. Most likely due to the fact that a lot of things are trying to start fighting for resources and since its a UV kernel, there isn't as much power to go around. Its not horrible like using my MT3G was but its noticeable. Also, there is, again just after boot, about a .25 or .5 second delay between pressing icons and the subsequent action happening.
3) After that initial slowness, it runs extremely smoothly. Like buttah, as mike myers would say.
All in all, I'm quite fond of this governor. I've tried UV kernels before on my phone and it tends to dislike them. Like random reboots and random bootloop, dislike them. Perhaps its the rom, perhaps its morfic's coding, or perhaps its just the governor. Whatever it is the collaboration is absolutely phenomenal. Kudos.
Jonathon Grigg said:
Hi Ezekeel, an observation in the trinity thread mentioned that some games lagged really badly, i think it could be with too slow changes, due to your time delay feature. I'm not sure if it's feasible, but maybe a solution to this could be a dynamic time delay, longer for the lower frequencies (suited for music while screen off) and shorter for the higher frequency (for these intensive games).
Now I'm not a kernel guy, although I do wish to learn at some stage in the near future. This is just the product of some quick thinking, I have no idea if it is a workable theory or if it would just cause overhead and create more lag. Please let me know what you think though!
Sent from my Nexus S
Click to expand...
Click to collapse
I just downloaded and tried the two games which were mentioned in the Trinity thread, Fruit Ninja and Air Attack, and I am experiencing no problems at all with the reference kernel from my sig set to 100/800. So until more people report such problems I am inclined to believe that these are not directly related to the governor.
kenvan19 said:
2) Upon booting, things stutter a bit. Most likely due to the fact that a lot of things are trying to start fighting for resources and since its a UV kernel, there isn't as much power to go around. Its not horrible like using my MT3G was but its noticeable. Also, there is, again just after boot, about a .25 or .5 second delay between pressing icons and the subsequent action happening.
Click to expand...
Click to collapse
I think that is normal. The GUI starts up before all programs and settings are properly loaded. For example if I open the app drawer directly after boot, only the stock apps are visible and after some seconds all my apps appear one after another. It takes about 10s after the GUI has started until everything is setup.
Ezekeel said:
I just downloaded and tried the two games which were mentioned in the Trinity thread, Fruit Ninja and Air Attack, and I am experiencing no problems at all with the reference kernel from my sig set to 100/800. So until more people report such problems I am inclined to believe that these are not directly related to the governor.
I think that is normal. The GUI starts up before all programs and settings are properly loaded. For example if I open the app drawer directly after boot, only the stock apps are visible and after some seconds all my apps appear one after another. It takes about 10s after the GUI has started until everything is setup.
Click to expand...
Click to collapse
I personally think your new governor is working great. Only time will tell if its better on the battery. I really hope so. I'm hoping for at least another hour of use. is it possible?
Sent from my Nexus S using xda premium
dsellers2 said:
I personally think your new governor is working great. Only time will tell if its better on the battery. I really hope so. I'm hoping for at least another hour of use. is it possible?
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
I expect the battery runtime to be similar to ondemand. On the other hand, I have made the experience that modifying governors is a delicate business and seemingly small changes can have an unexpectedly large impact. So as you said, only time will tell.
If the sampling rate is 10000 and the min_timeinstate is 15000, will the governor not consider load changes until min time is over, but at the normal sampling intervals? Which would mean an essential 20000 in this state?
I was looking through the patch on pastie right now, but opera closed twice, so I figured I ask you instead.
Sent from my A501 using Tapatalk
morfic said:
If the sampling rate is 10000 and the min_timeinstate is 15000, will the governor not consider load changes until min time is over, but at the normal sampling intervals? Which would mean an essential 20000 in this state?
I was looking through the patch on pastie right now, but opera closed twice, so I figured I ask you instead.
Sent from my A501 using Tapatalk
Click to expand...
Click to collapse
When the frequency is changed the next sampling will be performed min_timeinstate µs later, after that sampling with the normal rate is resumed. So in your example, the first sampling after a frequency change will be performed after 15000 µs, after that every 10000 µs.
Hi EZkeel your governor implemented the latest TEUV kernel has helped improved my battery life by close to 20!, was getting around 10hrs of battery with heavy use. About 3+hrs of screen time, display set to auto. Was able to run for 13hrs today.
One day of testing so far but I haven't seen my phone charge to 99% or last over 13hrs until I put the latest TEUV kernel with lazy in. Will continue testing throughout the week. No compatibility issues with the apps so far. Was running on demand governor previously and with the previous version of TEUV
Thanks for your work on the governor development.
robin_77 said:
Hi EZkeel your governor implemented the latest TEUV kernel has helped improved my battery life by close to 20!, was getting around 10hrs of battery with heavy use. About 3+hrs of screen time, display set to auto. Was able to run for 13hrs today.
One day of testing so far but I haven't seen my phone charge to 99% or last over 13hrs until I put the latest TEUV kernel with lazy in. Will continue testing throughout the week. No compatibility issues with the apps so far. Was running on demand governor previously and with the previous version of TEUV
Thanks for your work on the governor development.
Click to expand...
Click to collapse
Looking at your screen shots vs what mine is and my 2nd most is gallery. Very confused as to why this is
Sent from my Nexus S 4G using xda premium
you may have a corrupt media file , so everytime your device syncs it gets stuck. clear your files.
turn off device, remove battery for 2mins.; try again
possibly flag the directories you don't want scanned with .nomedia file (there's an app to do this)
anyways excellent job Ezekeel, 2nd day and lets see what happens with battery life.
Hi I'm on a JPY+voodoo. Pretty happy but one complaint about lag. Even with voodoo on when I open several apps and then go back to contacts, or SMS, it takes several seconds to open them (black window). I guess it is just the time spent to empty and refill RAM with new app. My question is: Is there the stock SGS GB free from this lag/delay? JVS, JVQ or JVR I mean... Are there CM7/MIUI free from it? Just to make sure that it is worthwile to change now without waiting a more stable version...
It's a bit riskier, but removing journal from ext4 made my phone a lot faster (on jvr and now jvs). booting the phone and loading apps especially seems faster.
Secondly, talon and galaxian are the best kernels. Personally i prefer talon for voodoo color and also it seems to run smoother with the conservative governor.
Another thing you can do is to increase the minimum frequency of your phone (ie. I did mine from 100 to 200mhz using tegrak overclock). this means faster scaling due to less steps (especially on conservative governor).
Finally, bigmem kernels may also help your problem by giving you more free ram. I use the latest talon bigmem kernel (gives u an extra 10-15mb ram). You do sacrifice HD video recording but I think its worth it if u dont do much video recording (you can always temporarily flash back another kernel on the odd occasion that you need it).
Oh and one more thing. Delete all the apps you don't use from your phone (especially system/apps)
EDIT: seems i went a bit off topic. I have heard that CM7 is faster than stock, but it seems to sacrifice battery life a little (not sure if this is still the case). And I think all stock roms have a little bit of lag, at least after a while. I think JVR/JVS are significantly better than the previous gingerbread roms (i have tried a few), but rom/kernel customisation is still important for the best user experience.
oswade said:
It's a bit riskier, but removing journal from ext4 made my phone a lot faster (on jvr and now jvs). booting the phone and loading apps especially seems faster.
Secondly, talon and galaxian are the best kernels. Personally i prefer talon for voodoo color and also it seems to run smoother with the conservative governor.
Another thing you can do is to increase the minimum frequency of your phone (ie. I did mine from 100 to 200mhz using tegrak overclock). this means faster scaling due to less steps (especially on conservative governor).
Finally, bigmem kernels may also help your problem by giving you more free ram. I use the latest talon bigmem kernel (gives u an extra 10-15mb ram). You do sacrifice HD video recording but I think its worth it if u dont do much video recording (you can always temporarily flash back another kernel on the odd occasion that you need it).
Oh and one more thing. Delete all the apps you don't use from your phone (especially system/apps)
EDIT: seems i went a bit off topic. I have heard that CM7 is faster than stock, but it seems to sacrifice battery life a little (not sure if this is still the case). And I think all stock roms have a little bit of lag, at least after a while. I think JVR/JVS are significantly better than the previous gingerbread roms (i have tried a few), but rom/kernel customisation is still important for the best user experience.
Click to expand...
Click to collapse
It's really weird how you said "stock roms lag". As far as I know, no other ROM besides samsung and iOS has smooth web browser scrolling
Hi !
I have a question. I finally decided to unlock bootloader and install custom ROM to have longer battery life + less lags. I've decided to flash CyanogenMod 10.1 (from 2.06) and kholk's kernel 3.4.37. I did a hard reset before and after flashing ROM and kernel. But I was quite surprised:
-now this phone just feels heavy to use - lags almost everywhere (in launcher, when browsing apps, when choosing apps, everywhere)
- games like GTA became unplayable due to low framerate (very low)
- even simple games (like Hill Climb Racing) became quite laggy (on stock they were running perfectly
I yet to check battery life.
Is it normal for this MOD + kernel to be quite laggy? Or did I do something wrong? Or maybe i should just change to another ROM?
Thanks for advance !
Kontal said:
Hi !
I have a question. I finally decided to unlock bootloader and install custom ROM to have longer battery life + less lags. I've decided to flash CyanogenMod 10.1 (from 2.06) and kholk's kernel 3.4.37. I did a hard reset before and after flashing ROM and kernel. But I was quite surprised:
-now this phone just feels heavy to use - lags almost everywhere (in launcher, when browsing apps, when choosing apps, everywhere)
- games like GTA became unplayable due to low framerate (very low)
- even simple games (like Hill Climb Racing) became quite laggy (on stock they were running perfectly
I yet to check battery life.
Is it normal for this MOD + kernel to be quite laggy? Or did I do something wrong? Or maybe i should just change to another ROM?
Thanks for advance !
Click to expand...
Click to collapse
change to another kernel. test out which rom/kernel combinations work best for you.
Kontal said:
Hi !
I have a question. I finally decided to unlock bootloader and install custom ROM to have longer battery life + less lags. I've decided to flash CyanogenMod 10.1 (from 2.06) and kholk's kernel 3.4.37. I did a hard reset before and after flashing ROM and kernel. But I was quite surprised:
-now this phone just feels heavy to use - lags almost everywhere (in launcher, when browsing apps, when choosing apps, everywhere)
- games like GTA became unplayable due to low framerate (very low)
- even simple games (like Hill Climb Racing) became quite laggy (on stock they were running perfectly
I yet to check battery life.
Is it normal for this MOD + kernel to be quite laggy? Or did I do something wrong? Or maybe i should just change to another ROM?
Thanks for advance !
Click to expand...
Click to collapse
Change your cpu governor to INTERACTIVE and you will see the difference
Check your kernel setting
Check your kernel setting : min/max freq and governor.