PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Android > Android HTC Devices > HTC Thunderbolt > HTC Thunderbolt Development
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #141 (permalink)  
Old 05-20-2011, 09:58 AM
Khanam's Avatar
Lurker
Offline
Pocket PC: Htc thunderbolt
Carrier: Verizon
 
Join Date: Apr 2011
Posts: 4
Reputation: 5
Khanam is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by mchaos View Post
Word, I didn't even notice that the newest kernel has a lower, lowest setting. I am going to play it safe and set it a bit higher.

Hopefully it works well.

EDIT: Works good. Thanks a lot. I went ahead and disabled the first 2 clock speeds as they are the suspect ones. This is great, happy to run the latest.
Happy to have helped. I don't know how ziggy puts his kernels on red bull, acid etc but manages to make them sip battery like a prim lady.

Sent from my thunderbolt
Reply With Quote
  #142 (permalink)  
Old 05-22-2011, 10:57 PM
mchaos's Avatar
Lurker
Offline
Pocket PC: Thunderbolt
Carrier: verizon
 
Join Date: May 2011
Posts: 10
Reputation: 0
mchaos is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Attached Files
File Type: rar freqs.rar (200 Bytes, 4 views) Click for barcode!
File Type: rar freqs2.rar (365 Bytes, 8 views) Click for barcode!

Last edited by mchaos; 05-23-2011 at 11:16 AM.
Reply With Quote
  #143 (permalink)  
Old 05-23-2011, 02:51 PM
spyderman09's Avatar
Lurker
Offline
Pocket PC: HTC Thunderbolt
Carrier: VZW
 
Join Date: Apr 2011
Posts: 2
Reputation: 0
spyderman09 is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11

Quote:
Originally Posted by mchaos View Post
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?
In order to make the freqs changes enabled upon reboot, you have to run a script that is placed in the system/etc/init.d folder. Since you created a couple of shell scripts already, I assume you have the script part working, so I would just pop them into the init.d folder to have them take effect upon boot - I have named mine 99user_freqs, but not sure if the name makes a difference upon boot.

Hope that helps.

Last edited by spyderman09; 05-23-2011 at 02:56 PM.
Reply With Quote
  #144 (permalink)  
Old 05-23-2011, 03:10 PM
mchaos's Avatar
Lurker
Offline
Pocket PC: Thunderbolt
Carrier: verizon
 
Join Date: May 2011
Posts: 10
Reputation: 0
mchaos is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Reply With Quote
  #145 (permalink)  
Old 05-25-2011, 11:22 AM
wraithdu's Avatar
Lurker
Offline
Pocket PC: Thunderbolt
Carrier: Verizon
 
Join Date: May 2011
Posts: 3
Reputation: 0
wraithdu is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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
Reply With Quote
  #146 (permalink)  
Old 05-26-2011, 03:25 PM
mchaos's Avatar
Lurker
Offline
Pocket PC: Thunderbolt
Carrier: verizon
 
Join Date: May 2011
Posts: 10
Reputation: 0
mchaos is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11

Quote:
Originally Posted by wraithdu View Post
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
I don't think this is a bug per say. What every Ziggy did to accomplish this is some sort of program or script. When you run it with 1 it disables everything out side of the policy. When the command is introduced, it runs what ever he wrote to do the job. You are essentially running a command with a function. After that line runs, it goes to the next line without pause because it has already set what ever script or program into action. So it jumps to the line where you want to disable a particular freq and because what every is working to disable freqs outside the policy is going, it supersedes that final line.

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.
Reply With Quote
  #147 (permalink)  
Old 05-26-2011, 08:45 PM
wraithdu's Avatar
Lurker
Offline
Pocket PC: Thunderbolt
Carrier: Verizon
 
Join Date: May 2011
Posts: 3
Reputation: 0
wraithdu is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Reply With Quote
  #148 (permalink)  
Old 05-26-2011, 09:50 PM
mchaos's Avatar
Lurker
Offline
Pocket PC: Thunderbolt
Carrier: verizon
 
Join Date: May 2011
Posts: 10
Reputation: 0
mchaos is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11

Quote:
Originally Posted by wraithdu View Post
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.
I would probably have to sleep for more then 2 seconds, but I am glad you sorted it out. I just wrote multiple lines to control the freqs. I am curious tho. I might try to simulate the same issue you had out of curiosity.
Reply With Quote
  #149 (permalink)  
Old 05-28-2011, 12:22 PM
mchaos's Avatar
Lurker
Offline
Pocket PC: Thunderbolt
Carrier: verizon
 
Join Date: May 2011
Posts: 10
Reputation: 0
mchaos is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Attached Files
File Type: rar freqset.rar (1.2 KB, 1 views) Click for barcode!
File Type: zip freqset.v2.zip (1.6 KB, 1 views) Click for barcode!

Last edited by mchaos; 05-29-2011 at 04:12 PM.
Reply With Quote
  #150 (permalink)  
Old 05-28-2011, 11:15 PM
detox246's Avatar
N00b
Offline
Pocket PC: Thunderbolt, d1
Carrier: Verizon
 
Join Date: Apr 2011
Posts: 26
Reputation: 0
detox246 is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [Kernel] Ziggy471 MECHA BETA Kernel UPDATED 3 May 11

Quote:
Originally Posted by mchaos View Post
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!
Saweet! this is awesome. I didn't have a bin folder in data/local so i put it in system/bin and its working great
Reply With Quote
Reply

  PPCGeeks > Android > Android HTC Devices > HTC Thunderbolt > HTC Thunderbolt Development

Tags
kernel, mecha, ziggy471


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 02:27 PM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com