Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
BlaY0
Old
(Last edited by BlaY0; 31st August 2010 at 03:34 PM.)
#1  
BlaY0's Avatar
Recognized Developer - OP
Thanks Meter 553
Posts: 1,551
Join Date: Sep 2007
Location: Medvode
Default [MOD] Disable perflock for stock kernel (2.03.405.3)

Here I put together perflock_disable update package for Legend stock kernel 2.6.29-5f084974. It is ment to disable perflock on every boot. This package consists of perflock_disable module (now licensed under GPL) from SetCPU app and boot script that loads this module.

Background:

Stock Legend's kernel has performance lock turned on. This means that (unless you recompiled your own kernel) CPU frequency scaling is somehow limited. Default limits are set from 480 to 600 MHz while screen is on and to 246 MHz while screen is off. Furthermore ondemand CPU scaling governor is limited from 246 to 600 MHz. This means you can not underclock you Legend with SetCPU unless you use perflock disable option which you have to set manually after every reboot. And here this "update" kicks in.

Requirements:
  • rooted Legend of course
  • kernel 2.6.29-5f084974
  • busybox
  • run-parts integrated in init.rc script (/etc/init.d)

Big thanks goes to coolbho3000 who now offers this module under GPL so we can use it outside his cool app.
Attached Files
File Type: zip legend_perflock_disable.zip - [Click for QR Code] (4.0 KB, 118 views)
 
Learners Lisence
Old
#2  
Learners Lisence's Avatar
Senior Member
Thanks Meter 3
Posts: 180
Join Date: Jun 2010
Good post Blayo, wish it had come along earlier.

I hope more kernels will be coming along.
Device: HTC Legend
Status: Rooted and S-Off
Rom: Customed
OC - Yes, slightly
 
Vuska
Old
#3  
Vuska's Avatar
Senior Member
Thanks Meter 6
Posts: 122
Join Date: Jul 2010
Sorry... how to install this ?

from ROM Manager ?
 
BlaY0
Old
#4  
BlaY0's Avatar
Recognized Developer - OP
Thanks Meter 553
Posts: 1,551
Join Date: Sep 2007
Location: Medvode
Quote:
Originally Posted by Learners Lisence View Post
Good post Blayo, wish it had come along earlier.

I hope more kernels will be coming along.
Well this is for stock kernel. If you have your own kernel, you could have disabled perflok while you were compiling it and you wouldn't needed this module...

Quote:
Originally Posted by Vuska View Post
Sorry... how to install this ?

from ROM Manager ?
Install it as any other update.zip via recovery mode. But you need run-parts in your init.rc, otherwise the module won't load.

I also compiled cpufreq governor modules (conservative and powersave) for stock kernel if anyone is interested...
 
Vuska
Old
#5  
Vuska's Avatar
Senior Member
Thanks Meter 6
Posts: 122
Join Date: Jul 2010
Quote:
But you need run-parts in your init.rc, otherwise the module won't load.
How to do this ?
 
BlaY0
Old
(Last edited by BlaY0; 1st September 2010 at 03:18 PM.)
#6  
BlaY0's Avatar
Recognized Developer - OP
Thanks Meter 553
Posts: 1,551
Join Date: Sep 2007
Location: Medvode
This is beyond the scope of this tread. You can try Chef Central but to be honest, if you don't know what this is or how it is done, then this (Android Development) is perhaps not the right forum for you.
 
Learners Lisence
Old
#7  
Learners Lisence's Avatar
Senior Member
Thanks Meter 3
Posts: 180
Join Date: Jun 2010
Quote:
Originally Posted by BlaY0 View Post
Well this is for stock kernel. If you have your own kernel, you could have disabled perflok while you were compiling it and you wouldn't needed this module...
Yes, Blayo. I flashed the 806 kernel by dumfuq a week back. Im quite happy with it so far but would like to experiment with more Legend compatible kernels.
I read around a bit and then decided that underclocking and battery save could be achieved by a overclock kernel designed for 'performance' ....kinda like 'having the cake and eating it too"

Nevertheless, I appreciate the ideas associated with your present and possible future shares.
Thanks
Device: HTC Legend
Status: Rooted and S-Off
Rom: Customed
OC - Yes, slightly
 
BlaY0
Old
#8  
BlaY0's Avatar
Recognized Developer - OP
Thanks Meter 553
Posts: 1,551
Join Date: Sep 2007
Location: Medvode
Quote:
Originally Posted by Learners Lisence View Post
I read around a bit and then decided that underclocking and battery save could be achieved by a overclock kernel designed for 'performance' ....kinda like 'having the cake and eating it too"
Yes of course. Those custom kernels don't have enabled perflock so you can set speed by using SetCPU without loading perflock_disable module.

Well, if I'm frank I have never been fond of overclocking. My goal is just to extend the battery life of these "hungry" devices as much as possible without affecting user experience.

Right now I'm testing conservative governor and have some problems, because SetCPU can't handle switching between governors as it should.

Cheers,
 
Vuska
Old
#9  
Vuska's Avatar
Senior Member
Thanks Meter 6
Posts: 122
Join Date: Jul 2010
Quote:
Originally Posted by BlaY0 View Post
This is beyond the scope of this tread. You can try Chef Central but to be honest, if you don't know what this is or how it is done, then this (Android Development) is perhaps not the right forum for you.
I'll try to search about chef central and i am very new in linux OS.

but thank you...

I will learn because i have legend and i like it
 
BlaY0
Old
#10  
BlaY0's Avatar
Recognized Developer - OP
Thanks Meter 553
Posts: 1,551
Join Date: Sep 2007
Location: Medvode
Good for you

Chef Central is a subforum her on xda-developers...

 
Post Reply+
Tags
legend, perflock, setcpu
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Go to top of page...

XDA PORTAL POSTS

Nandroid Manager Receives Major Update

Do you find yourself obsessively jumping from ROM to ROM? And do you hate having to restore a full … more

Careers in Android: Recruiter Reveals How Resumes are Chosen – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

HttpClient Tutorial to Upload and Download with Your App

Developers wanting to interact with the Internet need to choose a package to do the … more

Profile Flow: A Tasker Alternative

By now, we’re all quite familiar with Tasker, the personal automation app that seems to be able to … more