Hey all - hopefuly this is the correct place for this question. I am developing a custom kernel for the Samsung Replenish baseod off of samsungs open source code. I have thus far gotten the kernel to compile and run just fine on the phone. I have also added the SmartassV2 and Interactive governors. No matter which one i set as default through the phonemodel_defconfig, each time I recompile and load the new kernel, it always default back to OnDemand governor.
I have no problem selecting either of the 2 new governors through SetCPU (and the setting does stick from boot to boot as long as I select "Set at Boot") so I know the governors are properly linked into the kernel. I thought that the kernel would start with the default one I selected, but it does not. Is this how thigs are supposed to operate, or am I missing something. I did update the cpufreq.h file in the include directory.
Any suggestions - is this even the correct place for a post that is this low level.
Thanks!
dmrlook said:
Hey all - hopefuly this is the correct place for this question. I am developing a custom kernel for the Samsung Replenish baseod off of samsungs open source code. I have thus far gotten the kernel to compile and run just fine on the phone. I have also added the SmartassV2 and Interactive governors. No matter which one i set as default through the phonemodel_defconfig, each time I recompile and load the new kernel, it always default back to OnDemand governor.
I have no problem selecting either of the 2 new governors through SetCPU (and the setting does stick from boot to boot as long as I select "Set at Boot") so I know the governors are properly linked into the kernel. I thought that the kernel would start with the default one I selected, but it does not. Is this how thigs are supposed to operate, or am I missing something. I did update the cpufreq.h file in the include directory.
Any suggestions - is this even the correct place for a post that is this low level.
Thanks!
Click to expand...
Click to collapse
As far as i know, cpu scaling governor can also be set by init script in ramdisk and /etc/init.d other than default setting in kernel config. You might need to check if there's any init script that contain a line like :
'write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand '
or
'echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'
Those lines will set the cpu scaling governor everytime the phone reboots.
In my device (xperia mini pro), that first line is in init.semc.rc in root folder of ramdisk. It should be different in your device
The second line is usually in a script in init.d folder, but stock rom usually doesn't support init.d, so afaik it only exists in custom rom.
greenAlgae said:
As far as i know, cpu scaling governor can also be set by init script in ramdisk and /etc/init.d other than default setting in kernel config. You might need to check if there's any init script that contain a line like :
'write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand '
or
'echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'
Those lines will set the cpu scaling governor everytime the phone reboots.
In my device (xperia mini pro), that first line is in init.semc.rc in root folder of ramdisk. It should be different in your device
The second line is usually in a script in init.d folder, but stock rom usually doesn't support init.d, so afaik it only exists in custom rom.
Click to expand...
Click to collapse
Thanks for the response. the kernel does support init.d (now, stock did not) but there are not scripts in there as of yet. I also went through all the other startup *.rc scriipts and found one that was echoing ondemand into the scaling_governor file. I tried both comment the line out and reflashing new ramdisk, and chaning it to echo smartassV2 and reflashing new ramdisk. In all cases, Ondemand still comes up.
I've also added a script to init.d that echos governors other than ondemand to scaling_givernors, and still, when the phone is booted, ondemand it is. Note that if I echo some other governor to the file at this point, it does change (I imagine this is what setcpu does in the background anyway).
Could the android system system itself be changing it to ondemand?
Thanks for the help!
dmrlook said:
Thanks for the response. the kernel does support init.d (now, stock did not) but there are not scripts in there as of yet. I also went through all the other startup *.rc scriipts and found one that was echoing ondemand into the scaling_governor file. I tried both comment the line out and reflashing new ramdisk, and chaning it to echo smartassV2 and reflashing new ramdisk. In all cases, Ondemand still comes up.
I've also added a script to init.d that echos governors other than ondemand to scaling_givernors, and still, when the phone is booted, ondemand it is. Note that if I echo some other governor to the file at this point, it does change (I imagine this is what setcpu does in the background anyway).
Could the android system system itself be changing it to ondemand?
Thanks for the help!
Click to expand...
Click to collapse
Well, actually I never try to change the default governor from ondemand before. Partly because I compiled my kernel using official/stock kernel source, so there's only those stock governor options and ondemand seems to be the best option. My phone is SE Xperia Mini Pro / sk17i and currently running Freexperia CM7 rom. The kernel provided has very good performance but seems to cause the battery draining too fast for me, so I compiled a 'stock' kernel to use with it.
After your post above, I tried to add more governor options from freexperia kernel source, recompiled the kernel, edit the init script in ramdisk, and flashed it to my phone.
Here's my result:
- the script in init.d doesn't seems to change the default governor. I don't know exactly why. Other script in init.d seems to run just fine, I can set scaling_min_freq and scaling_max_freq with it. I also check the permission, it's rwxr-x-r-x, but it doesn't seem to be executed at boot.
- in every startup, the rom executes the script in /data/local/userinit.sh too, but setting default governor from that script also doesn't succeed.
- only thing that can change the default governor is adding the line 'write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor smartassV2' in 'on boot' section of the init.semc.rc file.
I'm not a developer and i know every rom might be different. So you might need to ask in your rom specific thread, one of the devs might be able to help you there.
Otherwise, you can always set the default governor at boot using app like 'setcpu' or ' No-frills CPU Control'
dmrlook said:
Hey all - hopefuly this is the correct place for this question. I am developing a custom kernel for the Samsung Replenish baseod off of samsungs open source code. I have thus far gotten the kernel to compile and run just fine on the phone. I have also added the SmartassV2 and Interactive governors. No matter which one i set as default through the phonemodel_defconfig, each time I recompile and load the new kernel, it always default back to OnDemand governor.
I have no problem selecting either of the 2 new governors through SetCPU (and the setting does stick from boot to boot as long as I select "Set at Boot") so I know the governors are properly linked into the kernel. I thought that the kernel would start with the default one I selected, but it does not. Is this how thigs are supposed to operate, or am I missing something. I did update the cpufreq.h file in the include directory.
Any suggestions - is this even the correct place for a post that is this low level.
Thanks!
Click to expand...
Click to collapse
today i was looking for a solution like you and watched this post,finally i could solve the problem.Look at the scripts on /system/etc folder, in my case there was a script located there that changed the governor to ondemand,its name init.qcom.post_boot.sh maybe on your device it has other name.
old thread, i know, but im attempting to root a samsung replenish thats running 2.3.6. can anyone help? nothing is working.
EDIT: LOL. i was thinking "this phone is that old...? this is ridiculous that its running a higher form of gingerbread than my 4 month old phone is......" but i was looking at the join date not the post date, and i thought the thread was 3 years old. LOL
Related
Ok..
I can push the modules into the appropriate folder on the phone and I can run the commands which add it to the cpu governer selection (it took me awhile to realise I had to run 'su' command first ooops!).
However, upon rebooting the smartass governer dissappears from the selection tab and returns to 'ondemand' even if restore upon boot is selected. I assume the module is only temporarily loaded via the 'insmod' and 'echo' commands.
So I pulled the hw_config.sh and added the commands to the end under a new #tag (for ease of keeping things seperate). The same commands listed in the smartass thread. Pushed in back to the phone, But... smartass still wouldn't load and the cpu governer switched permanantly to 'performance' - even when I removed the commands from the config file
Had to restore my cwm backup to fix the issue.
I noticed that the config file makes reference to the ondemand module so wondered if this causes conflict with the smartass one??
I'm fairly new to modding stuff. Anyone got smartass working on gintonic1.3? Can they tell me the proceedure they used?
Sent from my U20i using Tapatalk
sory,i u use minicm7 v7 u can use it w/o problem..just edit hw config.sh
#x8smartass
insmod /system/lib/modules/x8_smartass.ko
azadtaufiq said:
sory,i u use minicm7 v7 u can use it w/o problem..just edit hw config.sh
#x8smartass
insmod /system/lib/modules/x8_smartass.ko
Click to expand...
Click to collapse
I'll give it a go. Thank you very much!
Sent from my U20i using Tapatalk
Hello.
I'm having a problem changing CPU scaling governor.
I'm using Jokersax's CM9 build (from 16/2/12) with the 1.3 kernel (stock), had the same problem with CM7 weeklies and any kernel I tried.
SetCPU doesn't allow me to change the governor at all, can't even select it.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors lists only performance and powersave.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor is an empty file.
Doing "modprobe cpufreq_ondemand" in a terminal as root says that the module can't be found.
Can any one point me in the right direction please?
masmddr said:
Hello.
I'm having a problem changing CPU scaling governor.
I'm using Jokersax's CM9 build (from 16/2/12) with the 1.3 kernel (stock), had the same problem with CM7 weeklies and any kernel I tried.
SetCPU doesn't allow me to change the governor at all, can't even select it.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors lists only performance and powersave.
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor is an empty file.
Doing "modprobe cpufreq_ondemand" in a terminal as root says that the module can't be found.
Can any one point me in the right direction please?
Click to expand...
Click to collapse
I think those are the defaults on most custom Atrix kernels. Clemsyn is the only one who uses interactive instead of performance(that I know of).
If you look in /sys/device/system/cpu/cpu0/cpufreq/scaling_driver you'll notice it says "tegra cpufreq". I think this then uses the Tegra DVFS to scale frequencies using the two governors in scaling_available_governors. Hopefully someone else can jump in and clarify a bit better.
The reason ondemand can't be found is because the kernel probably wasn't compiled with that governor.
Try System Tuner if you want to be able to select between the two available governors (this worked for me when using Clemsyn's kernel on CM7), but I'm not sure what difference it will make. After using System Tuner, it also seemed to "unlock" the governor selection in SetCPU as well.
Thank you.
I didn't realize ondemand wasn't built in because modprobe-ing the other two modules also returned a not found error so I figured something must be wrong.
System tuner did enable me to change the governor in SetCPU, though selecting either of them changes nothing as you said.
Oh well, if there is no ondemand governor then I'll let it do its thing how ever it wants.
Again, thank you for the replay.
Hi, I've got a Xperia Neo V with locked bootloader, I had Gingerbread (compilation 0.42) but yesterday, I decided to install the oficial ICS update. I had installed Setcpu with these values: min245Mhz, max1024Mhz (governor: ondemand) , I updated to ICS and I noticed it was very slow, then I downloaded "Antutu cpu master", and the values were the same I used to use in GB, so I installed Gingerbread again, rooted it, installed setcpu and set these speeds, min1024Mhz, max1024Mhz (governor: performance) and that way I should have those values in ICS, but the problem is when I restart the phone, those values dissapear, and set 245,1024 and governor ondemand. When I select "Set on boot", it still being slow. I updated from GB to ICS (and vice versa) but there is no way to change those values (245,1024) and the governor(ondemand). Is there any way to modify cpu speed? For example modifying a specific configuration file without using setcpu or any other app?
I hope you understand me, and help if you can
Thanks!
Maybe a problem with the stock kernel.
You can try using terminal emulator if you can install the proper scripts.
But acc. to me it needs unlocked bootloader.
Sent from my MT11i
criscracker said:
For example modifying a specific configuration file without using setcpu or any other app?
[/COLOR]
I hope you understand me, and help if you can
Thanks!
Click to expand...
Click to collapse
You could write a script to be run at boot (init.d) that changes CPU speed, however (this might be an obvious question) which kernel are you running??, because AFAIK Sony stock kernel doesn't allow OC/UV, meaning that no matter what you do you won't be able to change CPU speed or governor.
Hi,
I am running CheckROM RevoHD V6 and Siyah 2.6.14 (GB) on my I9100, using lulzactive governor in SetCPU, running on boot.
I have read the thread by droidphile on kernel tweaks (http://forum.xda-developers.com/showthread.php?t=1369817) and downloaded the app 'lulzactive' from market to set the tweak parameters (as in first screenshot) and checked the 'Set on Boot' flag as you can see.
The problem is that after a reboot, the parameters in the app are getting reverted to the default values. (2nd scrshot).
And then I tried init.d scripts, following the instructions I have created a file 'Stest' and made sure that there are no spaces, set appropriate permissions etc. I have tested the script with script manager app from market and ran as su to find there are no errors and exit code 0.(3rd scrshot).
Immediately after this script run from script manager, I went back to lulzactive app and found the settings are intact. (like in 1st scrshot). However, again after reboot (with the script in init.d folder) when I check in lulzactive app, the parameters are back to default.
Can you guys pls help me out, am I missing something here??
Thanks!!
Try using extweaks from the market, and set the governor from there, then try to reboot
Worked like charm! Thanks so much!!!!
I now got it.. Infact I already have ExTweaks installed. Though SetCPU has lulzactive as main profile governor, ExTweaks is having ondemand as the default one and hence the conflict! Hehe..
You're welcome!!
I have managed to port new governors into the kernel for to our project here: h**p://samsungi8320.freeforums.org/portal.php
The kernel is version 2.6.35.7
Even though the governors seem to be working and are available via Cyanogenmod performance settings, there seems to a problem. Randomly the phone will just reboot. I have tried, interactive, interactivex, smartass, smartass2, savagedzen all have the same problem. Even if none of these governors are selected and just the default onedemand is used, the same thing happens.
Also it seems dependent on which rom I use as on one particular rom the phone won't wake from deep sleep.
It seems the problem stems from deep sleep because while the phone is active everything is fine, even when monitoring the phone via logcat I experience no reboots as the cpu doesn't go into deep sleep and simply stays at min frequency which is 250mhz.
Maybe theres is a problem with the way I have ported the governors? I have made required entries to KCONFIG and MAKEFILE in DRIVERS/CPUFREQ and where required to CPUFREQ.H in INCLUDE/LINUX
To compile I then do make menuconfig and select the governors then do make uImage, everything compiles fine.
Has anybody experienced this when adding governors or got any ideas?
ashyx said:
I have managed to port new governors into the kernel for to our project here: h**p://samsungi8320.freeforums.org/portal.php
The kernel is version 2.6.35.7
Even though the governors seem to be working and are available via Cyanogenmod performance settings, there seems to a problem. Randomly the phone will just reboot. I have tried, interactive, interactivex, smartass, smartass2, savagedzen all have the same problem. Even if none of these governors are selected and just the default onedemand is used, the same thing happens.
Also it seems dependent on which rom I use as on one particular rom the phone won't wake from deep sleep.
It seems the problem stems from deep sleep because while the phone is active everything is fine, even when monitoring the phone via logcat I experience no reboots as the cpu doesn't go into deep sleep and simply stays at min frequency which is 250mhz.
Maybe theres is a problem with the way I have ported the governors? I have made required entries to KCONFIG and MAKEFILE in DRIVERS/CPUFREQ and where required to CPUFREQ.H in INCLUDE/LINUX
To compile I then do make menuconfig and select the governors then do make uImage, everything compiles fine.
Has anybody experienced this when adding governors or got any ideas?
Click to expand...
Click to collapse
anyone?