|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
I have to play around some more, but after rebooting, all of the freq's i disabled, were re enabled.
Any one have this issue? EDIT: Also... I know Ziggy said he was going to write an app for toggling the freqs, but in the mean time I wrote a quick simple shell script that will make toggling more simple. easiest way to use it is to send it to the phone, or download it. Put it on the root of the phone, chmod 777 and then ./freqs and it will ask you what you want to do. If you want it to run like a command as I have it, put it in /data/local/bin. If by chance you do not have the bin folder, you can create it. By default /data/local/bin is already in the set PATH. Might make it smarter if I get bored. One of these days I will get around to teaching my self how to write an app if I ever have time. freqs.rar is basic freqs2.rar is a little smarter. Last edited by mchaos; 05-23-2011 at 11:16 AM. |
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
Quote:
Hope that helps. Last edited by spyderman09; 05-23-2011 at 02:56 PM. |
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
I figured that out, I just had to think about it, and read some of the posts in the thread.
once upon a time I could shell script like a mad man. Its been a while and i still remember the basics well, it just takes a little time for me to remember what I have forgotten. |
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
I think I found a bit of a bug. For some reason, I can't disable a specific freq from an init.d startup script. I started using the script in place of SetCPU, but had to fall back to running the freq disable part on-demand after each boot. Here's the script that doesn't work:
Code:
#!/system/bin/sh echo "smartass" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo "122880" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq echo "1036800" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/user_freqs #this next line does nothing on boot #if i manually run this script post-boot, it works correctly #and disables the 184320 freq echo 184320 > /sys/devices/system/cpu/cpu0/cpufreq/user_freqs |
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
Quote:
Normally this wouldn't be a problem because the initial command would be completed quickly, but because its running at start up and under load, things are multitasking very quickly and things slow down and they overlap. IMO you have 2 solutions. Ad a sleep in there for a second or 2, or you can disable each freq individually as opposed to using the 1 switch to automatically do it for you. I wouldn't call it a bug. I would call it a timing issue. For the heck of it, make it sleep for 2 seconds before running that last string and see if the problem goes away. But honestly, weather you use the 1 switch or you write a line for each freq you would like to disable its going to take the same amount of time. Using the 1 switch probably runs some code that does the same thing as writing each line in a script. You might as well just write a line for each freq. You would never notice a time difference, and you would never have to see it after unless you would like to change it. I just wrote out each line in mine. At the time I was toying with a script that would do it for you. Still have it on the back burner. But what it would do is ask you what you want to set your min and max, and then if you wanted to disable all other freqs, and if there were any other freqs you would like to disable, and then it would automatically generate the script and dump it into the init.d folder for you. Was really just doing it for fun. If I ever do write it I will post it up. the previous script I tossed up is great for quick toggling of freqs when you are trying to figure out where you want to run your TB. Last edited by mchaos; 05-26-2011 at 03:31 PM. |
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
Actually, I did try to sleep for about 2 seconds I think... still didn't work. I considered your same reasoning
Ultimately, I think it is a kernel or OS initialization thing. I installed Script Manager and set the entire script to run on boot, removing the init.d script. For this app, on-boot scripts don't run until external storage is mounted, which obviously doesn't happen until later in the boot process. By this point, the script works just fine as intended. So bug or timing problem? I can't say for sure. |
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
Quote:
|
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
I got bored this morning so I hammered out a shell script that will ask you what you want you min and max frequency, also it will ask you if you will like to set the scaling manager and if you would like to disable all frequencies out side of that policy. Then it will generate a script and put it in the init.d folder so it will set everything upon boot.
Put it in /data/local/bin and chmod it to executable, then just run freqset from any directory in a shell, and it will run. You can run it when ever you want to change it. It will overwrite the script in init.d. It works well. If I get bored again the next thing I am going write some functions that will check your inputs after you enter a frequency to make sure it is one of the available frequencies. Right now, if you miss type a freq or enter something that is not available it will put it into the script, and it will not set that parameter at boot. You have to re run freqset. You can type list and it will tell you all of the freqs you can choose from. For setting the scaling governor, I started making a function that would list all of the available governors, but I did not finish or implement it. So if you are checking out the script, you will see a function that is not finished. It will set the governor, it just will not list available ones. enjoy! EDIT: Tweaked the script a bit. v2 has a few more functions, and a bit more information while running. Last edited by mchaos; 05-29-2011 at 04:12 PM. |
|
||||
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11
Quote:
|
|
Tags |
kernel, mecha, ziggy471 |
|
|