Teach me to Android - Sony Xperia S, Acro S, Ion

マスター!どのようにコーディングを教え!
So since i couldent find any guides that actualy helped me to do with C, Linux,Android, android kernels , kernel modifying CODING IN C or anything like such... i then decided ill make a thread
Almost all devs i know are strapped for time or just dont have a XS anymore if not that they just ignore me :crying:
So this was originaly posted by our Well known RaymanFX and it seems his questions are exactly what i want to ask
[Q1] How to overclock a kernel
which files are needed -> kernel source
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies need higher voltage and how high exactly ?
[Q2] Undervolting
which files are needed -> kernel source ..
what files need to be edited
is the cpufreq driver related
how to determine which frequencies can use lowered voltage and how to calculate them ?
#ifdef not RaymanFX's Questions
[Q3] how to overlock your GPU
which files are neeeded
what files need to be edited
what determines your GPU voltages/clocks
how to determine what your hardware can handle
[Q4] how to add features like fastcharge
What files i need
what files need to be edited
where are great places to learn about sutch things
[Q5 Addapting
adding features from other kernels may work but if they dont then how will i addapt them to work (wide horizon to cover but lets use display drivers for an example)
if not adding features, lets say Porting 4.4 from Sony Xperia ZU (which is a nightmare for devs (or so says one of the many gods of developing we know as letama) couldent we just use most of the coding for the drivers which was officialy release by sony?
(in short, could we use drivers from our (SXS(L)4.1.2 to port 4.4 from ZU)
If we were to use drivers from official firmware to use on a unofficial firmware, what would we have to do for them to actualy work with the firmware that we are porting
#endif
- i know some tiny bits of this already from playing around with ForzaFerrarileo and DooMLorD's Kernel Source (only enough to fix the smallest of problems)

Envious_Data said:
マスター!どのようにコーディングを教え!
So since i couldent find any guides that actualy helped me to do with C, Linux,Android, android kernels , kernel modifying CODING IN C or anything like such... i then decided ill make a thread
Almost all devs i know are strapped for time or just dont have a XS anymore if not that they just ignore me :crying:
So this was originaly posted by our Well known RaymanFX and it seems his questions are exactly what i want to ask
[Q1] How to overclock a kernel
which files are needed -> kernel source
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies need higher voltage and how high exactly ?
[Q2] Undervolting
which files are needed -> kernel source ..
what files need to be edited
is the cpufreq driver related
how to determine which frequencies can use lowered voltage and how to calculate them ?
#ifdef not RaymanFX's Questions
[Q3] how to overlock your GPU
which files are neeeded
what files need to be edited
what determines your GPU voltages/clocks
how to determine what your hardware can handle
[Q4] how to add features like fastcharge
What files i need
what files need to be edited
where are great places to learn about sutch things
[Q5 Addapting
adding features from other kernels may work but if they dont then how will i addapt them to work (wide horizon to cover but lets use display drivers for an example)
if not adding features, lets say Porting 4.4 from Sony Xperia ZU (which is a nightmare for devs (or so says one of the many gods of developing we know as letama) couldent we just use most of the coding for the drivers which was officialy release by sony?
(in short, could we use drivers from our (SXS(L)4.1.2 to port 4.4 from ZU)
If we were to use drivers from official firmware to use on a unofficial firmware, what would we have to do for them to actualy work with the firmware that we are porting
#endif
- i know some tiny bits of this already from playing around with ForzaFerrarileo and DooMLorD's Kernel Source (only enough to fix the smallest of problems)
Click to expand...
Click to collapse
Cannot answer all of your questions but i'll try to answer as many as i currently know
Every device is specific but some parts are same..For example i'll take Xperia S as an example..
Q1..
For overclocking you need. acpuclock-8x60.c for xperia S. You will find it under kernel/arch/arm/mach-msm/
You will find a few lines defined under the structure struct clkctl_acpu_speed
so lets say you wish to add frequency 1782000...
based on the pattern add:{ {1, 1}, 1782000, ACPU_SCPLL, 0, 0, 1, 0x21, L2(22), 1325000, 0x03006000},(you will recognize the pattern from the lines in the file itself.
that is just an example of changes to one line. There are many more to edit. A good place to start would be to study someone else's OC kernel's features. You can study his/her github source to see the changes added for overclocking.
is the cpufreq driver related??: Didnt understand your question. technically you can add OC to any device. Only point is if the board gets heated up badly, it will shut down. Not burn itself to death. So there is a limit to how much u can overclock a processor..Try increasing step by step and then test. If board gets heated up to the point of shutdown, you will know ur processor's limit.
higher frequencies would require a higher voltage if performance is concerned. One suggestion here is to to give a 25 V increase per line of freq you add. What you might be asking is undervolting. What if your cpu is running at a higher freq and if u give it less voltage.right? In such scenarios your phone will be at a medium state. Where it is giving a minor compromise in performance to save battery. Giving high voltage with high freq will give you the best performance but at the cost of your battery.
Q2] three files(xperia s)
avs.h,board_semc_fuji.c
vreg-fuji_nozomi.c all under mach-msm folder
which freq and use less voltage...any freq can use less voltage. you give it less voltage and cpu wont perform as well as it would if you give it more voltage. udervolting is added so that you can have a minor compromise in performance to save ur battery. Eg: you are OCing your device at 1.8 Ghz. now you give it 1.3 V...It is running very very fast with a lot of battery drain. Now you undervolt it. you give it 0.8 V..Processor doesn't run as fast as 1.8 GHZ should run but still faster than normal but your battery is preserved.
Q3] I have forgotten totally,sorry. But i had studied Doomlord's kernel sources to find out about GPU. It would be a good place for you to start as well
Q4 and Q5] I have vague knowledge about these so wont be able to help you much. By porting do you mean porting some kernel modules from a different device to your kernel??

ty, i cant realy work off of a notepad for ever
ill look into playing with things more
i know what to do for porting lets say 4.4 from the default device but not how
Sent from my LT26i using XDA Premium 4 mobile app

Envious_Data said:
ty, i cant realy work off of a notepad for ever
ill look into playing with things more
i know what to do for porting lets say 4.4 from the default device but not how
Sent from my LT26i using XDA Premium 4 mobile app
Click to expand...
Click to collapse
haha..true..Try installing virtualbox and install ubuntu...you'll learn way faster how a linux kernel based OS just like android works...

Dark Wraith said:
haha..true..Try installing virtualbox and install ubuntu...you'll learn way faster how a linux kernel based OS just like android works...
Click to expand...
Click to collapse
i allready have ubuntu
not virtualbox
i have been playing with kernels and compiling, i am able to get around some issues
same goes with my aosp 4.4 build, it boots but crashes when certain graphic modes are needed (aka openGL based games)
takes on avarage about 32hours to compile on a normal day (if im lucky 17hours)
Sent from my LT26i using XDA Premium 4 mobile app

Envious_Data said:
i allready have ubuntu
not virtualbox
i have been playing with kernels and compiling, i am able to get around some issues
same goes with my aosp 4.4 build, it boots but crashes when certain graphic modes are needed (aka openGL based games)
takes on avarage about 32hours to compile on a normal day (if im lucky 17hours)
Sent from my LT26i using XDA Premium 4 mobile app
Click to expand...
Click to collapse
hehe...takes me 2days and crashes half the time.....(on a 512 mb ram stupid laptop)

Dark Wraith said:
hehe...takes me 2days and crashes half the time.....(on a 512 mb ram stupid laptop)
Click to expand...
Click to collapse
i got 4gb but my harddrive slows down and then it just starts messsing up
got a bug where mount ntfs starts generating errors and causes its self to use 99% of my cpu
so compiling can take estimated upto a week
also a laptop
Sent from my Xperia S using XDA Premium 4 mobile app

Related

[kernel] tweaks and trix

I make this tread to show developer/user different tweak and trix in the kernel.
The goal is to make the developer/user an easy source to choose from what they want in the kernel.
Just to get the perfect kernel for them
When you post a tweak, do explain exactly what it is and what is does.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
Reserving it for future use
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
DamianGto said:
I make this tread to show developer/user different tweak and trix in the kernel.
The goal is to make the developer/user an easy source to choose from what they want in the kernel.
Just to get the perfect kernel for them
When you post a tweak, do explain exactly what it is and what is does.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
Click to expand...
Click to collapse
Maybe if you added your tweaks/script first others would join.
That's a great idea !!
well, I'm new to the Galaxy S (got mine a month ago!), but I was a Hero developer back then.
in my kernel fork I used some small tweaks like:
1- bigger steps between CPU frequencies like in line 187:
https://github.com/maxo/HeRo-2.6.29-GoDmOdE/blob/master/arch/arm/mach-msm/acpuclock-arm11.c
I read that in a Linux forum, "I dont remember where". on my laptop Ubuntu is doing the same thing, here is the content of /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies:
1733000 1333000 1067000 800000
Click to expand...
Click to collapse
in benchmarks it resulted in a liiiitle bit more numbers, but mainly it kept my ROM's quite smooth.
2- another thing is Voltage control. you can see from the table from line 128 to 160, that frequencies up to 710400 uses VDD_6 which is 1.2 Volts instead of VDD_7 which is 1.325 Volts.
I got this from a professor in our University, where I explained that we are overclocking the CPU.
he answered that higher frequencies doesn't mean the CPU needs more Voltage.
I tried that and found the same performance, with more battery life, and less overheating while heavy testing.
that's mostly it .. I don't think Samsung's kernel is any different. but I hope this helps all developers somehow.
PAGOT said:
Maybe if you added your tweaks/script first others would join.
Click to expand...
Click to collapse
Yea, I think the OP should post some of the tweaks first.
I suggest to start with how to dump a zImage and make a working initramfs and so on...
I did think it was a great idea. But I don't thinks so now.
We all do different things and focus on different stuff.
It would also take alot of time to do it.
And if you are a developer then you find the tweaks anyway.
Some stuff do we all use.
Also most of the things is on the first post on every kernel tread.
To unpack the zImage I use my z4mod system and use the program z4ziggy and RyanZA did.
But this tools need to be compiled before you can use them. But I don't remember how right now.
**DamianGTO ultimate kernel v1.3 * 600Hz * 346MB RAM * OC/UV * 1280MHZ**

Leankernel: ( JB4.2 - 7.1, JB4.3 - 8.3 - , KK 9.0 beta 11/25)

Ok guys i have got permission to bring over lean kernel and offer support for it on xda. I will keep this post up todate with all the most recent kernel updates and news. All credit goes to imoseyon as the original op and rootzwiki for original posting. I am posting this with full permission and support from imoseyon
Mod Type:: Kernel
Difficulty:: Very Easy
Mod Status:: Stable
Apply In:: CWM Recovery
Requires Root:: Yes
Exp builds are also up and includes a bunch of Android/OMAP updates not in stable.
SOURCE:
ICS
JB
This is a minimalistic Galaxy Nexus kernel. My philosophy is to keep the kernel as lean and stable as possible, at the same time to keep the kernel as modern and close to latest mainstream linux as possible. You will see that my kernels will lack some of the bells and whistles from other kernels.
sorry host4droid is still down. Mirrors:
kk4.4 LK 9.0 beta (use at ur own risk)
JB4.3 [ stable builds | exp builds ] [ change log | exp changes ]
JB4.2:Stable
Stock JRN84D kernel
Terminal Emulator not finding scripts? Read this post.
CHANGE LOG JB 4.2
FEATURES
Patched to latest in Linux 3.0.x branch.
All unnecessary kernel components removed to make kernel lean and fast!
OC to 1.65ghz. Boot speed is maxed at 1.2ghz within kernel (in addition to ramdisk) for stability.
User voltage control
InteractiveX V2 (screen-off hotplug of cpu1) added. Select it using setcpu if you want to use it.
Ramdisk tweaks (sysctl, vm, filesystem speed, etc.)
SWAP & zram (next generation compcache) support. Run "zram enable" in terminal.
init.d support in ramdisk.
lk.conf for basic kernel configuration.
HotplugX governor (Hotplug optimized and modified for screen-off suspend).
wakelock tweaks for wlan and lte modem
lkflash - script to flash latest versions of leanKernel from Terminal (type "su" without quotes, hit enter, then type "lkflash" without quotes and then hit enter)
checkv - voltage checking script (for custom undervolting) - detailed at bottom of this post.
checkt - script that displays 1) your current temp, 2) # of times you were throttled due to temp "recently", 3) CPU trim type, and 4) CPU silicon type, etc.
Fast USB charge (by chad0982) and "ffc" toggle script by me. (Open terminal, and type "ffc" without quotes then enter)
ColorControl from both CM9 and Ezekeel (compatible with all ROMs). Helpful posts: 1and 2.
TempControl - sysfs interface to control the CPU temp threshold. Read these two posts: 1 and 2.
Variable GPU OC - sysfs interface to select GPU max speed between 307MHz (stock), 384MHz and 512Mhz. The changes take effect immediately. Check FAQ for more info and how to use it.
Custom SR Tuning - override kernel default minimum voltage for SR calibration.
SoundControl
Gamma Control
ROW scheduler v4
DIRECTIONS
Uh.... flash the zip in clockworkmod.
Thanks to forum member maddler for providing file hosting
FAQ
How do i change voltage? - Use the latest version of setcpu, leantweaks, cputuner, or your ROM's built-in tools.
Do i need to wipe dalvik/cache? - in general there's no need, but it doesn't hurt so if you have time go ahead. Posted Image I don't wipe.
​Can we OC higher or add more frequency slots? - You can find the extra slots in my experimental versions.
​Will this work on GSM gnexus as well? - It should. I don't have a GSM phone to test so let me know if it stops working.
What is interactiveX V2? Read this post and thttp://rootzwiki.com/topic/13092-kernel-leankernel-minimalistic-kernel-120-123111/page__view__findpost__p__342571
Are you getting Screen-Off/Sleep-Of Death (SOD), general instability, or unusual battery drain?
Before you post here (especially if you're running the experimental version), try the following steps in order:
0) dude, disable screen-off profiles if you're running interactiveX.
1) If you're running the experimental version, do you have 180mhz/230mhz and/or 1.42ghz slots enabled? If so disable them both!
2) If the above doesn't help, do you have custom undervolting enabled? If so disable it! (keep in mind that the kernel is already undervolted by default).
3) If the above doesn't help, are you using interactiveX or hotplug governors? If so change to interactive.
4) If the above doesn't help then you should not be running the experimental version. Install the stable version and try both interactiveX and interactive without custom undervolting.
If you're still getting SOD with stable/interactive, report it here.
What about call-recording? - First the app needs to support Galaxy Nexus. Find out if it does and then find out from the author of the app what kernel changes are required and let me know.
Should i set up screen-off profile? - ICS kernels have built-in screen-off profile for all governors at 700mhz. So you don't need it unless you want to set it lower than 700mhz. In general there isn't a whole lot to gain by setting it lower.
Hotplug vs interactiveX? - Read this post. HotplugX vs interactiveX
What is zram and why do i need it?
zram basically takes a portion of your RAM (10% using my script) and turns it into a compressed swap device. So in layman's terms you're extending the size of your memory (potentially from ~700mb to close to 1000mb depending on the compression ratio).
To answer the 2nd question, no you don't really need it but if used properly (using custom LK zram script) it could help you in two different ways:
1) Android OS is based on Linux OS and the OS will try to use a growing portion of your RAM for file and inode caches and if you keep your phone up without rebooting after a while you may notice things getting a little sluggish. That's because the OS is not doing a good job in dropping the caches and freeing up memory for the apps.
2) more RAM and tweaked minfree (also handled by custom LK script) could potentially allow your apps to stay in memory longer (this may or may not be desirable based on your preference of course).
In conclusion, I'd say if you're curious it doesn't hurt to try. To revert, just type "zram disable".
What's the low-down on the GPU OC?
My kernel's GPU is now set to stock 307Mhz by default. You can adjust that by using Variable GPU OC (see a separate FAQ entry below).
When you go from say 307 to 512Mhz, you will not experience near double performance increase. Due to the factors outside the GPU module (ie. memory bandwidth limitation), you can't truly OC the GPU. In fact, most people can't tell the difference between 307, 384 and 512. Nenamark2 will roughly give you the following scores: 307/25fps, 384/28fps, and 512/31fps.
Some of you have seen the note from Colin, the Google kernel engineer, not to OC the GPU because using the OV_UV voltage slot will drain the battery. My kernel uses the same voltage for both OV and OV_UV slots. So there's no danger of battery drain there.
Why are the IO benchmark test scores lower than another kernel?
Some of the kernels out there have fsync disabled to increase benchmark scores. I believe that is unsafe and could cause data corruption. I do have hooks in my kernel to disable it but I don't use it.
In real world there will not be any user perceivable difference whether you have fsync enabled or disabled.
Is there a way to tune hotplug via sysfs?
yes. Advanced users only!
My phone doesn't seem to be deep-sleeping, what gives?
(assuming you checked in the right place like cpuspy) In terms of deep-sleep, there's not a whole lot going on in the kernel. It works or it doesn't - and I can assure you that I test every release (well almost every release) for deep-sleep before I release.
19 out of 20 times it's either 1) some sort of background process that's preventing your phone from going into deepsleep, or 2) something's misconfigured in your ROM, or both. Also connecting to USB will prevent phone from going into deepsleep.
I'm having unusual battery drain - help!
First of all, our gnex has very poor battery life while in active use. It's downright horrible while screen is on - screen is definitely the main culprit and there's not a whole lot I can do about that.
Custom undervolting can help or can hurt. This is mainly due to SmartReflex (class1.5) which auto-calibrates the ideal voltages for you. In fact, with SR you don't really need to use the custom undervolting feature for frequencies other than the 2 lowest. It does a great job calibrating higher frequencies. I personally don't touch it.
The "notrim" versions are an exception because I had to disable SR1.5 for the trim override to work. There's no auto-calibration going on there. Feel free to mess with custom undervolting on the notrim versions.
Now, if you've already accepted the horrible battery life while screen is on, but have questions about battery drain while idle - read the next question.
I'm having unusual battery drain while screen is off, or phone is sleeping - help!
First, let's find out if you're phone is going into deep-sleep. Install CPUSpy, unplug phone, turn off screen, and leave the phone alone for 5-10min. Turn the screen back on, launch CPUSpy, and see if you see an active entry for Deep Sleep. If so congratulations - read on.
If you've determined that your phone is not entering deepsleep by using the above method, read my entry above that says "My phone doesn't seem to be deep-sleeping". I've heard that removing SDM.apk helps as well as rebooting the phone. Also try turning your bluetooth on and off, and launching camera app and closing it.
If you've determined that your phone is entering deepsleep fine but still feel like battery drains, read the next question.
I'm having unusual battery drain while phone is in deep-sleep - help!
First make sure you are absolutely positive that deep sleep is working (read the previous question).
While on my kernel *and* connected to Wifi, you shouldn't drain more than 1% battery per hour *average* while in deep sleep (based on 5-8 hour continuous deep sleep). With wifi turned-off, my guess is probably no more than 1-3% per hour, depending on signal strength.
tip 1: If above is not happening for you, first charge the phone all the way and reboot. Let things settle a bit - give it a day or so. If you're using Battery Monitor Widget (which is not accurate for gnex), things should eventually settle between -2mA and -60mA per sample.
tip 2: Install BetterBatteryStats and look at which wakelocks dominate. Google search for names of the wakelocks to see how you can fix them.
tip 3: http://checkthis.com/d87t
If nothing seems to help, you can try the "notrim" version, but stick to speeds between 350 and 1350 (don't use OC slots). The notrim version has SR1.5 disabled which could help for those of you with drain issues on my other kernels.
What is tempcontrol and how do I use it?
First, read these two posts: 1 and 2.
Although tempcontrol was designed to be used with the experimental notrim builds because the cpu gets hotter in notrim frequencies, you can actually use tempcontrol to throttle lower frequencies. I haven't tried myself, but theoretically you can set your top speed at say 1.2Ghz and use tempcontrol to throttle at say 60C (instead of the stock value of 63C) resulting in slightly cooler phone. Theoretically.
What is SmartReflex?
SmartReflex performs continuous dynamic voltage scaling around the nominal operating point voltage according to silicon characteristics and operating conditions.
My stable and experimental builds will have SR Class 1.5 enabled by default.
You can disable SR via sysfs
How do I use Variable GPU OC?
You can use Lean Tweaks by Jake, or use the built-in "oc" script. Both leantweaks and my oc script will create an init.d script so the setting sticks at boot. My "checkt" script will also show the current GPU max speed. Note that 512MHz will probably not work for everyone.
307Mhz (stock) is set default by the kernel.
Open Terminal, and type for stock speed of 307Mhz: oc gpu 0
for 384MHz: oc gpu 1
for 512Mhz: oc gpu 2
What are the available sysfs options?
Check this post (thx byrong)
Which governor should I use on JB?
As usual I'd recommend trying all the governors and see which one works best for you. Stock JB, however, is optimized for interactive. The OS will automatically modify various interactive governor parameters on the fly while you're using the phone as part of "project butter". Namely, the following parameters are constantly adjusted by the OS: boostpulse, timer_rate, min_sample_time, hispeed_freq, go_hispeed_load, and above_hispeed_delay.
I hope this helps people if there is any other information you might want added just ask and i will do my best to come up with a comprehensive guide.
Donate to your favorite charity, or donate to imoseyon.
Did you ask Imoseyon before you posted this?
Thanks for bringing the thread over to XDA. Hopefully you got the necessary permissions, for the sake a peaceful thread. Its good to have most developments of the GNEX here and I finger tip away.
Sent from my Galaxy Nexus using xda premium
I've heard a lot about this kernel!
yes this is with his permisson
ajf64 said:
No i didn't ask him but i did put all due credits in it and it is in every other gnex forum but the sprint one all brought over by other people so if he has a problem with this he can feel free to pm me and i will get it removed i just figured it give us some easier access to his great kernel. In no way am i claiming this to be my work all support should be directed at the original thread op. I was just trying to make access to his kernel a bit easier for all xda users
Click to expand...
Click to collapse
That's all hunky dory but just doing things without asking the developer is just not right. Regardless if he has an issue or not. Its like you make something you work diligently on and then somebody just posts it somewhere else.
I dunno maybe its just me but its just common courtesy.
Sent From My Toro+ via SkyBlue Tapatalk
Thanks op.
#inb4close
#ReOpened
Sent from my Galaxy Nexus using Tapatalk 2
all fixed
ajf64 said:
well then sorry for posting it will a mod please delete this thread before it becomes a flame pit
Click to expand...
Click to collapse
Doesnt need to be deleted.. if just ask him if its alright.. thats fine enough
ÜBER™ said:
Doesnt need to be deleted.. if just ask him if its alright.. thats fine enough
Click to expand...
Click to collapse
Why do you always ruin the flaming? With your...good nature...and your rap music.
Thanks for linking. You can still ask dev for permission but I get what you're trying to do. I prefer xda since this is where I have gotten help with every phone since my nexus 1.
Sent from my Galaxy Nexus using XDA Premium HD app
Well i have gotten permission to post this from imoseyon and to keep this thread updated on xda sprint forums for him so it looks like we are all set he got back to me alot faster then i thought he would so every thing should be all good guys
and yes jayare313 i am so used to finding every thing i need on xda some times it s a pain having to check 3 or 4 sites to see if any of your mods for your rom are updated
Sorry. 3 issues here:
1) I need to verify permission from the developer and he needs to verify that he is going to support it here. If someone downloads it, flashes it, and somethings wrong.......who is going to give answers and support it? We have an active community who can help, sure, but the developer has to actively support it here. If he were ready to give support here, he would have posted it here already. And even then it would have to go in general unless he started the thread.
2) There is no source provided in the OP. Kernels must be GPL compliant and listed in the OP.
3) If you did not create it, do not post it in the development section.
Alrighty. Everything should be good now. I'll be keeping an eye out.
OP will be updated soon, with source and I've spoken to the developer.
Thank you guys.
---Jay--- From the GNex
Well, I will say I like having this thread here. So thanks to the op.
Sent from my Galaxy Nexus using Tapatalk 2
I will be updating the thread when i get home today and be offering any support you guys may need for this kernel
MichaelMcEntire said:
Well, I will say I like having this thread here. So thanks to the op.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I totally agree. Thanks to OP for the thread and imoseyon for the kernel
Sent from my Galaxy Nexus using xda premium
Np guys any time and if there is any thing i can help with just ask i plan to provide full support for this kernel. Also if there are things you wish to have added feel free to post them as well i have permission to compile my own versions of lean kernel with cherry picked features from his repository and to add features to it. I look forward to your feedback.
is 4.2 jb cm10 compatible
twoeleven99 said:
is 4.2 jb cm10 compatible
Click to expand...
Click to collapse
Yes
Sent from my Galaxy Nexus using xda app-developers app

[GUIDE] [STARTER] (Custom) Kernel Features Explained! - NEW FEATURES [06/30/2013]

This is a simple STARTER GUIDE to kernel features/parameters and everything you need to know about custom kernel goodies before you consider flashing them. I’d be glad if you could help me complete this guide. Thanks to @Shan89 for his fantastic guide which inspired me to collect this.
First of all I’d like to thank all kernel guys who put countless hours into this to bring us the features which I am going to explain soon. Especially: XMister, n3ocort3x, Kozmikkick, Maxwen, Showp1984, faux123, TripNRaVeR, Alex-V.
Overview:
Post 1:
A.: What you want to know about the CPU/GPU of your device
B.: Custom Kernel Features
Post 2:
C.: Built in kernel features with no user control
D.: FAQs (Frequently Asked Questions)
More coming Soon!!!
Post 3:
E. Repacking
F. Useful Tools and Guides out there
More coming Soon!!!
A: What you may want to know about the CPU/GPU of your device:
HOX is powered by nVidia Tegra 3 which is a Quad Core CPU and it is said that have a Core Frequency of 1.5GHz. Also nVidia Tegra 3 comes with ULP Geforce GPU which is at 520MHz in all custom kernels available. You may want to know that your HOX can go up to 1.5GHz of single core and 1.4GHz of 4cores active with Stock kernel (The kernel that comes with your device out of the box). However custom kernels can perform 1.5GHz for all 4 cores.
nVidia Tegra 3 is in fact a 5 core chipset. The Advertising hype was about its 4+1 cores. So what is that one extra core? That core is called LP (Low Power) core. When the phone is in idle (sleep) this core is used. It is a weak core with 475MHz of processing power. It is there to save battery life as when we are in idle we do not need a whole 1.5GHz core to be active.
B.1: CPU/GPU/IO Features which come with Custom Kernels:
•NOTE: Enabling/Disabling these features are explained in the kernel forums. Here is a very simple example to get you up and running so that you don’t feel lost.
In the kernel forum it is said:
To enable S2W:
echo ‘1’ > /sys/android_touch/sweep2wake
So what on the earth does that mean?! It means install a terminal emulator program on your device (Here’s one). And then run it. First type “su” without the quotation marks and hit enter. It will ask for Superuser privileges. Grant it. Now type in the line above echo blah blah blah and hit enter. And bam! There you go, S2W is enabled. Always be advised that ‘1’ means enable and ‘0’ means disable.
Click to expand...
Click to collapse
OC/UC (As for OverClock/UnderClock):
As you may know, CPU or any other processing unit features a clock frequency. Over/Under Clock simply means raising/decreasing the clock frequency of CPU.
Reason: Why would one need to overclock? Because one needs more processing power. For example if you want to experience smoother graphic when playing high-graphic games.
Why would we need underclock? Higher processing power demands more battery. So underclocking helps us, reserve more battery. As for HOX, searching internet and texting don’t need much of processing power. So we can limit the processing power and save battery during low use of our device.
•Note1: OC/UC is not limited to CPU. GPU is also capable of OC/UC. And the interface for that is also available in the custom kernels of HOX.
•Note2: Gamers may not use GPU UC. Limiting GPU processing power impact significantly on your gaming experience.
UV (As for Undervolt):
Every frequency of a processing unit, demands a certain amount of power to be supplied. Undervolting to put it simple means decreasing the voltage of a certain frequency (or all of them).
Reason: The more voltage CPU/GPU gets, more heat will be generated. So mainly we UV to decrease the generated heat of CPU/GPU.
•Note1: One Frequency needs a certain minimum amount of voltage to perform correctly and the system be stable. Undervolting more than a certain amount of voltage will cause system instability.
•Note2: HOX is known for getting hot soon. So UV is a great workaround for your device to be cooler.
•Note3: UV does not impact battery life (or it is not noticeable).
•Note4: For ULTIMATE guide about Undervolting and safe values visit Shan89’s great guide here.
Separate X/Y OC interface:
This probably means that the kernel has separate OC interface (interface to control OC) for operation X and operation Y. To be more exact it means you can OC different values for X and Y.
Audio Min. Freq.:
This specify the minimum frequency of the CPU when Audio is being processed. Default min in custom kernels is normally 51MHz. But Audio needs some more processing power. Anyhow, with this you can change that value.
LP Core OC:
The name explains everything. OC for LP core of T3 chipset.
Reason: LP core uses very little battery. So as long as the phone stays at LP core, more battery will be saved. If LP is OCed, it means it can handle more complex processing tasks and can hold more before letting the device to wake main cores. So battery will be preserved!
•Note: These are work in progress features and mostly in beta releases of Kernels. So using may cause system instability and other issues. So use them if you know what you are doing.
Hotplug Control - NEW:
Hotplugging dynamically activates second CPU core ON on load conditions and turns second core OFF on low load conditions. (From here).
Click to expand...
Click to collapse
- first_level: The number here specifies the amount of load on the cpu for it to turn on all the available cores (4 cores online).
- cores_on_touch: This number specifies the number of cores to come online when you touch the screen. (2 is efficient, 4 for extra smoothness on touch, and so more battery drain.)
- suspend_frequency: When screen is off, you don't expect your device to be smooth (!!!) and snappy! Because mainly nothing important is happening when screen is off. The number here specifies the maximum frequency of the CPU when the screen is off. Screen Off Max CPU can be really a very low number.
CPU Governors:
Frequency scaling is the means by which the Linux kernel dynamically adjusts the CPU frequency based on usage of the device. Governors refer to schemes which dictate to the kernel how it should do these adjustments. (From rootzwiki)
To put it simple, Governors are the way that CPU frequency is adjusted according to the demand of operating system.
Selecting a proper governor for your CPU is crucial to the performance and battery preserving of your device. For example if you are low using your device you may use a more battery friendly governor and if you want to play games you may use a more power consuming performance governor.
•Note: See Shan89’s Great Guide about Governors to be familiar with each one of them and the ones that you should use in different situations here.
I/O Schedulers (As for Input/Output):
Input/output (I/O) scheduling is the method that computer operating systems use to decide which order block I/O operations will be submitted to storage volumes. I/O Scheduling is sometimes called 'disk scheduling'. (From Wikipedia)
To put it simple, Schedulers are the way reading and writing to the SD card is managed.
The same things that is said in the Governors part is applied here, too.
•Note: See Shan89’s Great Guide about Schedulers here.
ReadAhead buffer size:
In terms of reading data from SD card, there is a cache which is used as a buffer. The size of that cache is readAhead buffer size. The size has a direct impact on your reading speed of your SD. So giving it a right amount is crucial.
•Note: Kernel guys believe that 128 is the right amount for that and it is the default in most of the kernels.
File System “X” R/W (As for Read/Write):
Android by default doesn’t support all the File Systems (What are file systems?! See here). So some kernels may add certain file system R/W. The most popular unsupported file system is NTFS.
B.2 Features of Custom Kernels (AKA Goodies!!!):
S2W (Sweep2Wake):
With S2W enabled you can wake/lock your device by sweeping your finger from left to right (or right to left) on the hardware keys of your device (Pretty Cool, hah?).
Reason: Some people just don’t like the hardware power button! Or after some time it will become less responsive. And some will use S2W because it is cool!!!???
•Note1: S2W doesn’t affect battery life that much. It almost does not use even a little bit. But be aware this stands corrected as long as you don’t touch your device. Touching the device would cause in waking the device from deep sleep.
DT2W (Double Tap 2 Wake):
It is something like S2W to wake the device. Double tap on the screen to wake the device.
•Note: The note for S2W applies here, too.
BLN (BackLight button Notification):
With BLN enabled your hardware buttons will blink when you have notifications. It is an/a alternative/support for led notification.
FastCharge:
This feature makes it possible for the phone to ask for more current from USB host. So your device would be charged faster connecting to a USB host (Or USB Battery) Be aware that enabling FastCharge would block the USB access to your Phone Storage.
UMS (USB Mass Storage):
After ICS, google only allows MTP connection to the PC. Back at ICS there was a UMS which make available your Phone Storage as a Mass Storage device in PC. The Mass Storage advantage is that you can manipulate data on it but it cannot be done using MTP. UMS feature returns that feature to your device. A system interface is also needed which is available in ViperX ROM or Lyapota’s mod.
•Note: MTP vs UMS (From here):
MTP:
1. Can copy files over (like APKs) and then access on them on the device without mounting/unmounting.
2. File transfer is available immediately when plugged in without having to mount.
Mass storage:
1. Better security since you have to get past the lock screen to mount.
2. Is actually a real drive in Windows, so you can do all operations normally.
MHL (Mobile HighDefenition Link):
It provides the feature for the miniUSB to HDMI cables to work. To output the device screen using HDMI.
SmartDimmer:
SmartDimmer can intelligently vary the backlight brightness of your device screen to help maximize battery life.
•Note: Haven’t really tried this. You may try it yourself and see how it is.
MultiCore PowerSaving:
This feature try to group up tasks in the least cores possible. To put it simple, it will focus in using least cores for your tasks to be done. This means less cores are active and so more battery life. Also this will decrease performance.
•Note: To enable use TricksterMod app. 0 for disable and 2 for the most aggressive.
Core Control/Max Active CPU Cores:
As the name suggests, this feature allows the user to set the maximum active cores of the CPU. In other words, you can completely shut down some cores. The default value is 4 as we have 4 max active cores. you can reduce this to 3, 2 or 1. But 1 is not really recommended.
Note: Core Control is the feature of ViperX ROM.
B.3 Other Features:
Pocket Protection - NEW:
Using features like S2W and/or D2TW when the phone is in your pocket (with no specific cover) occasionally causes the screen to turn on. (as a result of being close to your skin and almost touching it). This feature is there to prevent such wake ups. It uses proximity sensor to determine if the phone is in a closed position to something. If that is true, the screen won't turn on. :victory:
Swap:
Swap is a space which provides help to RAM in situation of low memory. When you are low in RAM some data will be stored in Swap space (Mostly cache). Swap is a space on Internal (and/or External Memory) so swap is not fast in comparison to RAM, but it helps multitasking, because you could cache more app data to your memory. So the results are less Force closes because of low RAM and faster switching between apps.
Swap is not really used by default, or it is used with very low space. You can boost your Swap, and also know more about this. there's a very nice MOD called Turbo Boost which allows you to add more Swap using your unused space. See this.
zRAM:
In zRAM unnecessary storage resources are compressed and then moved to a reserved area in the fixed RAM (zRAM). So in other words, zRAM is a kind of swap in memory (see swap above). As the data is compressed not much memory needs to be preserved as zRAM. However, the CPU has to work more because compressed data has to be unpacked again when it is needed). The advantage clearly lies in the speed. Since the swap partition in RAM is much faster than this is a swap partition on a hard drive.
In itself a great thing. But Android does not have a swap partition, and therefore brings Android ZRAM under no performance gain as would be the case with a normal PC. (From here with some editing.)
Click to expand...
Click to collapse
What we need to know essentially lies here:
zRAM off = Low use data will be stored the way they are in the memory. This will cause no extra load on CPU, yet need more RAM.
zRAM on = Low use data will be stored compressed in the memory. This will cause extra load in CPU as to store or restore data, yet preserve more Free RAM.
The main use of zRAM is when you are using a heavy ROM that eats up all your RAM. This will allow multitasking to be more functional. On light ROMs, or for those who don't multitask much, this is not necessary.
Init.d Support:
There are some scripts that run every time your device boot up which are located in /etc/init.d Those are called init.d scripts. One of the most popular init.d scirpts that is available for Note 10.1 is this.
DriveDroid Support:
Gives the phone the ability to use DriveDroid.
DriveDroid allows you to boot your PC from ISO/IMG files stored on your phone. This is ideal for trying Linux distributions or always having a rescue-system on the go... without the need to burn different CDs or USB pendrives.
Click to expand...
Click to collapse
Take a look here for more information.
TCP Congestion Control:
The choices in this section, address how the operating system kernel manages flows of information in and out of the kernel, which is at some level the "switchboard operator" of your handset. More info here.
Better to leave this options as is. Cubic as the default of your kernel.
Dynamic FSync:
fsync is a system call in Unix/Linux. "man fsync" says:
fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device (or other permanent storage device) so that all changed information can be retrieved even after the system crashed or was rebooted. This includes writing through or flushing a disk cache if present. The call blocks until the device reports that the transfer has completed. It also flushes metadata information associated with the file (see stat(2)).
Click to expand...
Click to collapse
So it's something embedded in programs after a related set of write operations to ensure that all data has been written to the storage device. The bolded part is what makes it interesting for some to disable it - "The call blocks" means the calling program waits until it's finished, and this may create lag. The downside is that if the system crashes, the data on the storage devices may be inconsistent, and you may lose data. (From here).
Dynamic FSync, makes it possible for fsync operation to be asynchronous when the screen is on, and synchronous when the screen is off. And what does asynchronous mean? Means OS issues fsync call, but not necessarily immediately at commit time for each transaction. It delays the FSync call for a certain amount of time. In case of a crash, the transactions not yet sync'ed in the last delay time before the crash may be rolled back, but the state of the data is always consistent. (From here).
Work in progress, will add more info soon.
C. Some built in features with no user control:
Tegra 4 Drivers - NEW:
First you may want to know what a driver is:
A driver is a small piece of software that tells the operating system and other software how to communicate with a piece of hardware.
For example, all printers come accompanied with drivers to install that tell the operating system exactly how to print information on the page. (From here).
Click to expand...
Click to collapse
So kernel guys (Trip to be exact) made it possibe to use some Tegra 4 drivers on Tegra 3 Chip of HOX so that we can enjoy the advantages of new drivers.
MPDecision:
Mpdecision decides when the second core shall be active and sets the idle and screen off freq while the governor decides when the freq should be increased / lowered.
More info at this thread.
CPU Quiet:
It's a dynamic CPU core management. More info here.
D. FAQs (Frequently Asked Questions)
MUST KNOW FACTS:​
The modifications and changing values of kernel parameters will stick until the next reboot. They will be set to default when you reboot your device. So if you want them to stick, you have to do one of the following:
1. Init.d Scripts: Here is a complete guide, how to make one. Also you can use 'CS' app. Which is explained in Useful tools part of this guide (Post 3).
2. Set on Boot: The programs like Trickster Mod, have an option named 'Set on Boot'. If you want the settings you have in Trickster to stick, you have to check that option.
---------------
And a quote from the elite developer that everyone know:
However, if you put any trust in Quadrant scores you could use them to prove that dancing naked for 5 minutes in your garden affects device performance. - Chainfire
Click to expand...
Click to collapse
Q. I'm on Stock. How can I flash a custom kernel?
A. See this complete Tutorial, here.
Q. Is it dangerous to flash a custom kernel?
A. As long as you follow the instructions step by step there shouldn't be any problems. However flashing is always at your own risk.
Q. Why would I need to flash a custom kernel?
A. Because of the goodies I described in post 1.
Q. Which Kernel is more suited for me?
A. That really depends on you. You have to try the kernels and see which one is more suited for you. In Post 3 A little description about the kernels will be provided.
Q. AOSP or Sense???!!!
A. Sense Roms can be identified by their description. Just visit the page of your desired ROM and see what is its base. If it has 'stock' as the base it's sense ROM. If it has AOSP, AOKP, CM or other things then it is an AOSP rom. So identify your base before flashing kernel.
Q. I don't like this fastboot stuff. Why HOX can't flash boot via recovery?
A. That is because something called S-ON (Security-On) by HTC which prevent flashing boot.img via recovery.
Q. Repack?! What on earth is that?
A. Repack will be elaborated in detail in Post 3.
Q. Is repack needed for Kernel X and ROM Y?
A. See Repacking in post 3.
Q. Is there a kernel with OC interface up to 1.6 or 1.7?
A. Yes. Search!
Q. I just want S2W or UMS with Stock kernel, nothing more. Is there a kernel to provide that?
A. Yes, Alex-V Kernel v.0.3 is there for you. See Post 3 when it's ready for more info.
Q. After installing custom kernel I am experiencing battery drain issues. Why is that?
A. The current custom kernels do not have drain issues. Install Better Battery Stats and/or GSam Battery Monitor to figure out what is causing the battery drains.
More Info will be added soon.
E. Repacking:
All Android roms require a boot image to work (normally named boot.img). These files contain the ramdisk necessary to run the rom, as well as the kernel. Occasionally you may want to replace the kernel to add new features or fix bugs, but you must tweak the image to be compatible with your rom (And also as the ramdisk may contain some tweaks, to preserve those tweaks and add them to the kernel of your choice). (From Here).
Click to expand...
Click to collapse
The very main question "Is it really needed?"
Well, you don't really need to repack kernels for Sense/AOSP Roms anymore (Those days are gone!) as they already contain the tweaks and ramdisk to get almost all the ROMs up and running. But sometimes you may encounter some problems like Weak signal/Wifi or such issues. In that case, it is advised to repack your kernel.
How to Repack?
Before you start repacking you need these 2:
1. Ramdisk (boot.img) of the ROM you are using (Or you wish to use). It is usually in the zip file of The ROM which you flashed (or going to flash) via recovery. Just open the zip file and extract boot.img. Some ROMs put the boot.img in their OP (First posts of the respective thread). So if the ramdisk wasn't in the zip file of the ROM, take look at the thread of the ROM.
For preventing the confusion rename the boot.img to the ROM name + ROM version for example Renovate_F4.img
2. Kernel image (boot.img) of the Kernel you wish to use. Some kernels put it for download in their thread. Sometimes modules and image is both in one archive. In that case open the zip file if the kernel and extract boot.img. Make sure you don't replace the other boot.img from step 1. For preventing the confusion rename the boot.img to the kernel name + kernel version + the kernel base(Sense/AOSP) for example XM_305_Sense.img
Click to expand...
Click to collapse
a. Using online repacker:
1. Visit this site: http://nibble.cc/repack/index.php
2. In source kernel image, choose the ramdisk of the ROM. (ex. Renovate_F4.img)
3. In New kernel image, choose the kernel image. (ex. XM_305_Sense.img)
4. Hit 'upload and repack'.
5. Download the repacked kernel.
b. Using One Click Tool:
1. Copy the ramdisk and the kernel image to "kernels" folder which is in the folder of the tool.
2. Connect your device and run the tool.
3. Select "Kernel repack".
4. Select the kernel image in "kernel" section.
5. Select the ramdisk in the "ramdisk" section.
6. Hit "perform action".
7. The repacked kernel is in the "repacked" folder which is the folder of the tool. It's name is a combination of The kernel name and the ramdisk name so that it can be identified easily.
Note: You can also choose to flash the kernel. Just check "Flash repacked kernel". The tool automatically reboots into fastboot and flashes the kernel.
Note: You can choose to repack via PC in the tool. It is much more faster. And also you can repack without connecting your phone if you choose repack via PC (This feature works from version 2.1 or 2.0 I think. Check the thread for more info).
F. Useful Tools and Guides out there:
F.1. Tools:
Trickster Mod:
A little yet powerful program. It is almost the best tool that you can have on your HOX to change certain kernel parameters like UC/OC/Voltage Control of both CPU and GPU. Schedulers, ReadAhead BufferSize, Advanced Governor control. You can change features like S2W and SmartDimmer, too. Also you can set this changes to take effect on boot. Which automatically sets the parameters on device startup (preventing the defaults values to be set, again).
Trickster Mod - Google Play
CS - Custom Settings:
This app is exclusively made for HOX, so it supports most of the features of custom kernels. This app manages to set the values you desire by generating init.d scripts. So there is no set on boot operation by the app but by the scripts.
Custom Settings - XDA
One Click Tool:
This tool is created for One X, and you use it to repack and flash kernels. And by flashing I mean no CMD and other scripting stuff. This tool automates flashing (Though the flashing process via fastboot is not that much of a hard work!).
One Click Tool - XDA
F.2. Guides:
- Battery Life and Gaming Guide + UV/UC and everything explained! by Shan89
- Boosting gaming experience and maximizing performance for gaming by hamdir
More info will be added soon.
Reserved for later reading
Sent from my HTC One X using XDA Premium App
Desaf said:
Reserved for later reading
Sent from my HTC One X using XDA Premium App
Click to expand...
Click to collapse
Yeah, sure!
Sent from my HTC One X using Tapatalk 2
Added recently to the guide:
Post 1:
- ReadAhead buffer size
- Init.d
- TCP CC
Post 2:
- FAQs.
realy helpful
thanks mate for the information.
mandrive said:
thanks mate for the information.
Click to expand...
Click to collapse
Glad to be of help!
Sent from my HTC One X using Tapatalk 2
Recent added to the OP:
- Swap (In appearance of the nice Mod TurboBoost)
- Dynamic FSync (Tricky feature)
Will be added soon:
- Repacking
Nice tut
Sent from my HTC One X using xda app-developers app
Alex-V said:
Nice tut
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
Thanks, man.
Sent from my GT-N8000 using Tapatalk HD
csec said:
Thanks, man.
Sent from my GT-N8000 using Tapatalk HD
Click to expand...
Click to collapse
Added with credits to my kernel thread..thx again
Sent from my HTC One X using xda app-developers app
Recently added:
Post 2:
- TEGRA 4
Post 3:
- Repacking
Will be added soon:
- Kernels reviews
Huuuuge guide
matt95 said:
Huuuuge guide
Click to expand...
Click to collapse
Just wanted to be a complete guide. Explaining everything.
Sent from my GT-N8000 using Tapatalk HD
csec said:
Just wanted to be a complete guide. Explaining everything.
Sent from my GT-N8000 using Tapatalk HD
Click to expand...
Click to collapse
You succeeded in it
matt95 said:
You succeeded in it
Click to expand...
Click to collapse
Thanks. Glad I could contribute to the community. :good:
Sent from my GT-N8000 using Tapatalk HD
csec said:
Audio Min. Freq.:
This specify the minimum frequency of the CPU when Audio is being processed. Default min in custom kernels is normally 51MHz. But Audio needs some more processing power. Anyhow, with this you can change that value.
Click to expand...
Click to collapse
Thanks for the guide.
I'm using CyanogenMod right now and I'm having problems with Audio over Bluetooth with the low power core of my endeavoru. I think increasing this frequency might help.
How is this called in kernel-land a.k.a. how do I find instructions regarding this? Asking Master Google was of no help, as I only found custom variants of the CyanogenMod kernel.
lordtillt said:
Thanks for the guide.
I'm using CyanogenMod right now and I'm having problems with Audio over Bluetooth with the low power core of my endeavoru. I think increasing this frequency might help.
How is this called in kernel-land a.k.a. how do I find instructions regarding this? Asking Master Google was of no help, as I only found custom variants of the CyanogenMod kernel.
Click to expand...
Click to collapse
What is your kernel and version?
What governor, what frequency?
What kind of problem are you having with your audio?
csec said:
What is your kernel and version?
What governor, what frequency?
What kind of problem are you having with your audio?
Click to expand...
Click to collapse
I'm running CyanogenMod 10.1 RC2 with the default kernel, which is the 3.1.10-cyanogenmod+inky-ghost kernel, according to About Phone.
Governor is ondemand, and the frequency is untouched - meaning, CyanogenMods defaults (51<f<1500).
The audio sometimes stutters, when I'm using my bluetooth headphones and the screen is locked - I assume, that's due to the low power kernel of the tegra chipset.
Can you help finding that setting, or recommend a good replacement kernel?

[Q] How To Fix Game Lag

Hey, i have this problem from the begining...
So i have android version 4.2.2.
I'm running phone on franco Kernel 3.0.85 with Paranoidandroid Rom 3.56, Also i use app to OC my phone to 1,6ghz.
So everything is okay expect gaming , example when i play temple run 2 and i set on the best quality it will not run smooth you can see lags ingame and i think this phone should run it easily.
I was reading forum but i didn't found any solution for my problem, i tried to find busfreq_static with following informations :
/sys/devices/system/cpu/cpu0/cpufreq/busfreq_static
but there's no busfreq_static file when i enter to cpufreq directory , i use File Explorer just to check am i able to find busfreq_static file but i can't.
Any solution , any help would be much appreciated.
Thanks
Maybe buy a N4 or HTC One!!!
Sent from my Galaxy Nexus using xda app-developers app
wisefreakz said:
Maybe buy a N4 or HTC One!!!
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
Add the Gs4 as well
wizox said:
Hey, i have this problem from the begining...
So i have android version 4.2.2.
I'm running phone on franco Kernel 3.0.85 with Paranoidandroid Rom 3.56, Also i use app to OC my phone to 1,6ghz.
So everything is okay expect gaming , example when i play temple run 2 and i set on the best quality it will not run smooth you can see lags ingame and i think this phone should run it easily.
I was reading forum but i didn't found any solution for my problem, i tried to find busfreq_static with following informations :
/sys/devices/system/cpu/cpu0/cpufreq/busfreq_static
but there's no busfreq_static file when i enter to cpufreq directory , i use File Explorer just to check am i able to find busfreq_static file but i can't.
Any solution , any help would be much appreciated.
Thanks
Click to expand...
Click to collapse
I already know you OC, but you overclock controlling voltages yourself, or rather you rely on SR to do it for you?
wisefreakz said:
Maybe buy a N4 or HTC One!!!
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
Seraz007 said:
Add the Gs4 as well
Click to expand...
Click to collapse
While it may be funny, this helps nothing to the thread. Please don't offtopic. TIA.
wizox said:
Hey, i have this problem from the begining...
So i have android version 4.2.2.
I'm running phone on franco Kernel 3.0.85 with Paranoidandroid Rom 3.56, Also i use app to OC my phone to 1,6ghz.
So everything is okay expect gaming , example when i play temple run 2 and i set on the best quality it will not run smooth you can see lags ingame and i think this phone should run it easily.
I was reading forum but i didn't found any solution for my problem, i tried to find busfreq_static with following informations :
/sys/devices/system/cpu/cpu0/cpufreq/busfreq_static
but there's no busfreq_static file when i enter to cpufreq directory , i use File Explorer just to check am i able to find busfreq_static file but i can't.
Any solution , any help would be much appreciated.
Thanks
Click to expand...
Click to collapse
first, dont OC to 1.6!! the following may help you:
go to Settings and click on Developer Options and enable Force 4x MSAA. Multisample anti-aliasing (MSAA) is a technique used to improve image quality. Since the Gnex has a GPU capable of supporting MSAA. Keep in mind this will also cause your GPU to work harder and your device may get hotter and consume more power than normal. It’s also possible that all games may not support this.
beekay201 said:
I already know you OC, but you overclock controlling voltages yourself, or rather you rely on SR to do it for you?
While it may be funny, this helps nothing to the thread. Please don't offtopic. TIA.
Click to expand...
Click to collapse
I'ts not problem about OC , even if i set to 1,2ghz there are no changes , i just dont know what could be the problem , cuz the game runs smooth on other phone which is not good as this one , thats weird , im not controlling voltages , i didn't touch anything.
samersh72 said:
first, dont OC to 1.6!! the following may help you:
go to Settings and click on Developer Options and enable Force 4x MSAA. Multisample anti-aliasing (MSAA) is a technique used to improve image quality. Since the Gnex has a GPU capable of supporting MSAA. Keep in mind this will also cause your GPU to work harder and your device may get hotter and consume more power than normal. It’s also possible that all games may not support this.
Click to expand...
Click to collapse
No , it didnt help. I already tried it before , but when i Force 4x MSAA it just makes game more lagy , maybe cuz of game , anyway i gave an example Temple Run 2 , but even other 3D games are laging , why shouldnt I OC to 1.6 , could brick phone or ?
It can blow up your cat. If it's the same with 1.2GHz... Why are you OC'ing? Go do some reading on voltage control and smartreflex on 4460.
Something tells me you're forgetting basics on how to OC on this device. If you don't supply enough voltage for all the cpu steps, device will stutter and lag, might even reboot.
a maguro wrote this.
beekay201 said:
It can blow up your cat. If it's the same with 1.2GHz... Why are you OC'ing? Go do some reading on voltage control and smartreflex on 4460.
Something tells me you're forgetting basics on how to OC on this device. If you don't supply enough voltage for all the cpu steps, device will stutter and lag, might even reboot.
a maguro wrote this.
Click to expand...
Click to collapse
Well i guess i need to put higher voltage when i am OC-ing , and how much voltage should i use for 1,2ghz , default ? Or incrase to higher voltage value ? Tell me something more about it , cuz im not well informed
wizox said:
Well i guess i need to put higher voltage when i am OC-ing , and how much voltage should i use for 1,2ghz , default ? Or incrase to higher voltage value ? Tell me something more about it , cuz im not well informed
Click to expand...
Click to collapse
first thing you need to do is disable SmartReflex® across the board, so that your user-defined voltages stick.
messing with voltages is very device-specific. increment voltage by small ammounts, stress-test and use the device for a while to make sure it's stable.
have you tried running those games while running Google's stock kernel?
beekay201 said:
first thing you need to do is disable SmartReflex® across the board, so that your user-defined voltages stick.
messing with voltages is very device-specific. increment voltage by small ammounts, stress-test and use the device for a while to make sure it's stable.
have you tried running those games while running Google's stock kernel?
Click to expand...
Click to collapse
I guess that stock kernel is : JOP40C kernel ? Am i right , i didnt try that kernel , you suggest me to flash this JOP40C kernel and to try if something will be fixed ?
wizox said:
I guess that stock kernel is : JOP40C kernel ? Am i right , i didnt try that kernel , you suggest me to flash this JOP40C kernel and to try if something will be fixed ?
Click to expand...
Click to collapse
Well when i flashed this kernel , and rebooted phone it just wont pass google logo , so i decided to flash again franco kernel to get my phone to work , dont know what's the problem with flashing stock room
wizox said:
Well when i flashed this kernel , and rebooted phone it just wont pass google logo , so i decided to flash again franco kernel to get my phone to work , dont know what's the problem with flashing stock room
Click to expand...
Click to collapse
Do you even know anything about ROMs and kernels?
When I said have you tested this on stock kernel, I meant, did you try this on stock ROM, but specified kernel because, it's like, common knowledge for someone who flashes ROMs, that custom ROMs devs often alter kernel (and ramdisk) to support features on their custom roms..
Have you for example tried reflashing PA, and just PA, nothing else? Does it lag then?
Have you for example tried fully reverting back to stock? (factory images)
Why is it that you just want your games not to lag, not even trying to gain a deeper understanding about what people are telling you.
Listen, this is the last time I'm saying this:
I told you to check your voltages, since you're OC'ing, and expecting SR to do the job for you.
Test by reflashing again PA, with no custom kernel.
Test by going back to stock, through fastboot/factory images.
Temple Run 2 on best quality lags in mine too.Probably it was designed for 1080p.Just keep the graphics a little lower, doesn't affect gameplay or quality
Sent from my maguro

[KERNEL][BETA/TEST][CM12][1/12/15] E980 Kernel+ V0.8.1

E980 Kernel+​
***I am not responsible for you bricking your device or causing any other unwanted outcomes to your device. Be careful and smart. If you don't know what you're doing you probably shouldn't be flashing this.***
This is the E980 Kernel+​The end goal here is to have a kernel with more features and potentially much better battery life. I can only guarantee it will work on E980, not sure if it will work on other devices. I also do not know what ROMs it will work on. That is up to you to share. Rule of thumb is, if it's CyanogenMod, it'll work.
Suported Devices:
E980
E988
***If you are interested in building your ROM with my kernel, you have my permission to do so. However, if you could just let me know, that'd be nice. Also a credit would be appreciated but is not necessary either.***
DOWNLOAD​[11/12/14]: E980Kernel+V0.7.3.4: http://goo.gl/yMqgrP
[11/12/14]: E980Kernel+V0.7.3.3: http://goo.gl/eUfbQY
[10/11/14] E980Kernel+V0.6: http://goo.gl/XvQg7Z
[9/29/14] E980Kernel+V0.5: http://goo.gl/tJ9JGs
[9/23/14] E980Kernel+V0.4: http://goo.gl/cxphLB
[9/15/14] E980Kernel+V0.3.1: http://goo.gl/vtmnRR
Original Kernel: https://drive.google.com/file/d/0BxhkPfIzMhriQ0pqdGN0TnFDb2c/edit?usp=sharing
CHANGES​[11/12/14] V0.7.3.4:
Removed Undervolting
Removed GPU Tweaks
No more (or at least a lot less) random reboots
[11/12/14] V0.7.3.3:
Added Intelli-Plug V3.8
Added Intelli-Thermal
Added Undervolting
Tweaked GPU a little (more to come later)
Updated Intellidemand to V5
***If you are experiencing reboots upon setting CPU governors, set the voltage higher on your CPU thru Trickster or similar Kernel Settings App!***
[10/11/14] V0.6:
Compiled with Linaro (Should notice some minor performance improvements)
Other minor changes
[9/29/14] V0.5:
Added I/O Schedulers:
SIO, VR, Zen
Fixed Faux
Updated Faux Drivers to V3
[9/23/14] V0.4:
Removed Governors:
SmartassV2, Hyper (Only in config, they are still in source)
Added Faux Sound Controls (Thanks to Faux123 for his work)
Updated to CM11 Nightly 9/23/14 boot.img
[9/15/14] V0.3.1:
Added Governors
Dancedance, Intellidemand, SmartassV2, Hyper. (Hyper seems to be buggy, same with SmartassV2)
Added TCP Congestion Control
Westwood, Highspeed, Hybla, Htcp, Vegas, Veno, Scalable, Lp, Yeah, Illinois.
Flashing Instructions:​Make sure you use Mack's TWRP or Gummy CWM.
Flash a supported ROM
Flash E980 Kernel+
Wipe Cache & Dalvik
I highly suggest you are rooted and busybox'd.
Note: If flashing fails and you are on a CM11 ROM, you may want to try flashing original kernel or earlier version before reflashing your ROM or clean installing.
To-Do List:
-Faux Sound - Done.
-Governors/IO schedulers - Done.
-More TCP congestion controllers - Done.
-Replacement for Qualcomm's MP-Decision (Intelli-Plug) - Done.
-Support for actual GPU underclocking (Maybe save battery since it always runs at top freq when it doesn't have to.) - In the works.
-Support for undervolting - Removed for now.
-Lower clock speeds than 384 MHz
-Higher clock speeds than 1728 MHz
-Intelli-Thermal - Done.
-Fast Charge - Soon.
-Battery Life eXtender - Soon.
-Knock On/DT2W (May not add due to battery drain issue that comes with)
-Keyboard USB support
-Linaro Performance Toolchain - Done.
-Support for F240 - In the works.
-Anything else?
***Make note I do not know if I can implement all of these but I will try my best***
Source: https://github.com/Snepsts/kernel_e980
Toolchain: https://github.com/Snepsts/linaro4.7gcc
HOW TO BUILD​
At this point if anybody wants to try out the kernel before I make releases, you are free to compile it yourself. I would like to ask that you do not share compilations just because I like to track how many people download and use the kernel through my goo.gl links and the afh download counter. I don't like it when people rehost my kernel since it gives me misguided numbers on how many people are following my work. It's just personal though, I'm not going to stop you. I just like it because it gives me an idea of how many people are using my work and kind of makes me want to keep working on it since I know how many people still use it.
Anyways, I'll leave instructions to compile right here:
This is assuming you're using a Linux distro (VM or not, has to be 64-bit) Pretty much everybody recommends Ubuntu, and that's fine, but if you want my suggestion Mint runs like a dream. Anyways to building!
You'll need to get the required packages. I forget these off the top of my head, but they're something like this:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 abootimg
There might be more, idk. This should get you through the build. Let me know if there's anything else.
Next we'll make a directory and grab the sources.
Go to your main directory to store the android folder in (for tidiness sake), if you have a preference you can do this differently. If you're not sure what you're doing here, just go from where you are (should be your main dir):
Code:
mkdir android
cd ~/android
git clone https://github.com/Snepsts/kernel_e980.git
This might take a while... when it's done you should have a folder called "kernel_e980" in your android directory.
While we're downloading, go get the latest M build or the latest nightly of CyanogenMod: https://download.cyanogenmod.org/?device=e980
This will be useful later.
Now we go grab a toolchain. My favorite is this one: http://www.mediafire.com/?x7lgbeprpg8gn choose the cortex A-15 one. Untar it and move the folder wherever you like. I suggest the android folder to follow the rest of the guide.
Code:
cd ~/Downloads
tar -xvf arm-cortex_a15-linux-gnueabihf-linaro_4.7.4-2014.06-build_2014_09_13.tar.xz
Now move this folder through the GUI (Graphical User Interface), much easier than more commands imo.
Now rename the folder toolchain, just because it's easier.
Now we're ready to build. The username is whatever your Linux username is.
Code:
cd ~/android/kernel_e980
export ARCH=arm
export CROSS_COMPILE=/home/username/android/toolchain/bin/arm-cortex_A15-linux-gnueabihf-
make cyanogenmod_e980_defconfig
All ready to go
One last thing, before you make it, if you are a little more advanced and need to toggle something or do anything else, use:
Code:
make menuconfig
You probably don't need that.
The # means the amount of cores in your computer's processor +1. For example, my Linux virtual machine has 4 cores allocated to it, so I assign it -j5. Now to make the kernel:
Code:
make -j#
And watch the words flyyyyy.
If anything fails, double check you didn't mess up. Also, the current Github build is never guaranteed to succeed.
Once the build is completed, you should see something like:
zImage is created!
Or something. Now go to your Downloads and get the boot.img out of the CyanogenMod build whatever way you wish to.
We'll leave it in the Downloads folder for the sake of the guide:
Code:
cd ~/Downloads
abootimg -x boot.img
Now you should have a zImage, intrid.img, and a bootimg.cfg. Ignore the zImage, move the intrid.img and bootimg.cfg to the ~/android/kernel_e980/arch/arm/boot folder.
Now we finish the kernel:
Code:
cd ~/android/kernel_e980/arch/arm/boot
abootimg --create boot.img -f bootimg.cfg -k zImage -r intrid.img
Done! Your kernel will be the boot.img file.
Replace a current kernel.zip's boot.img with this one, you can use any of the E980Kernel+ .zip folders for this. Just remove the boot.img in that one then put yours in it. I always upload my kernel to Gdrive and then download it to my phone to flash. But whatever you wanna do from here is fine.
And now you have the latest version of E980Kernel+ Unofficial. Yay you!
Click to expand...
Click to collapse
XDA:DevDB Information
E980 Kernel+, Kernel for the LG Optimus G Pro
Contributors
Snepsts
Source Code: https://github.com/Snepsts/kernel_e980
Kernel Special Features: Faux Sound, CPU Governors, TCP Congestion Controllers, I/O Schedulers, Intelli-Plug/Intelli-Thermal
Version Information
Status: Beta
Current Stable Version: V0.7.3.4
Stable Release Date: 2014-11-12
Current Beta Version: V0.8.1 TEST
Beta Release Date: 2015-1-12
Created 2014-10-19
Last Updated 2015-1-12
About E980 Kernel+
In this post we will go over some of the things in this kernel and shed some light on what they do... Let me know if you have any information to contribute or anything else
Intelli-Plug
Intelli-Plug is developed and updated by Faux123.
Intelli-Plug is a hot plug replacement for Qualcomm's proprietary MP-Decision. MP-Decision essentially decides the final factor on clock speeds, when cores go offline, how long they go offline, and they generally manage your CPU. There is a lot of discussion over whether or not Qualcomm's solution to hot plugging is efficient or not. Intelli-Plug is an open-source and updated version of MP-Decision in which anybody can contribute to and improve. It uses different methods for arguably better performance and better battery life. The current version used is optimized for MSM-8960 chipsets (like ours). It is updated and even offers convenient profiles to optimize battery life, performance, balance the two, or do a little between each option. Some of the profiles allow an eco-mode like experience. Eco-mode is a depreciated feature of Intelli-Plug that turned a quad-core processor into a dual-core, effectively optimizing the processor to run like a dual-core and save more battery power. In order to toggle the profiles option without paying 5 dollars for the Faux Clock app, you may use a root explorer (like ES File Explorer), go to sys/module/intelli-plug/parameters/nr_run_profile_sel and input a number anywhere between 0-5.
I prefer this option ON and do not currently have a profile preference. In my experience it improves the overall device (performance/battery life) with no noticeable drawbacks.
Intelli-Thermal
Intelli-Thermal is developed and updated by Faux123.
Intelli-Thermal is a thermal replacement to Qualcomm's proprietary thermal solutions. It is open-source and anybody can contribute to it. It has optimized thermal performance and is arguably more efficient than stock thermal settings. In addition to being an open-source and updated module, Intelli-Thermal offers customization such as: personal selection of cores to throttle at a self-determined value, and a similar selection for cores to offline (minus core 0, since it must be online at all times). Intelli-Thermal allows you to set your own rules (do not set the limit too high) and thermal values are in Celsius.
I prefer this option ON, and set Frequency Throttle Limit to 70 C, Core Offline Limit to 65 C, enable all cores for Frequency Throttling Cores, and enable Cores 2 & 3 for Offline Cores. Rarely do I ever experience heat, and if so it is very minimal. The device may lag or get hot depending on your settings, so please be careful or mindful of what you set. This works better on some ROMs than others.
*** Personal Note: These two are of my favorites because they are optimized and make for a better experience with little to no performance drops. This is just my preference, and it can be chosen to follow as a guideline by your discretion. ***
Multi-Core Power Saving
This is a normal kernel feature.
Multi-Core Power Saving is a basic feature that, depending on the profile selection, groups tasks to a certain amount of cores. 0 is off, so the device runs as normal. 1 is on, and will try to group tasks into single cores or multiple cores at lower frequencies to save power, but will not force it. 2 is aggressive, and depending on the user, may find that this causes a little more lag as the phone really hates using any extra CPU juice for anything, processes may be clustered and slowed down from this, but battery life is also the best at 2.
I prefer this option set to 1, as it has no noticeable lag and seems to still optimize the battery a little more. This option varies from user to user.
Faux Sound Control
Faux Sound Control is developed and updated by Faux123.
Faux Sound Control is a custom feature that enables sound manipulation on the kernel level. This feature will allow you to modify the gain (Make sound louder at the potential cost of music quality or lower for ear protection) and other various settings from a kernel level. This is completely user preference and will vary from user to user.
Intelli-Demand CPU Governor
Intelli-Demand CPU Governor is yet another feature developed and updated by Faux123.
Intelli-Demand means Intelligent On Demand. On Demand is a kernel CPU Governor that comes as the stock setting for most phones. But it tends to be a little less than optimized and such results in sub-par battery life. Intelli-Demand is a tweaked version by Faux that will allow for similar performance and better battery life. It is also popular for gaming as when the GPU 3D load gets heavy it will perform like On Demand as not to interfere with game loads.
This is my current preferred CPU Gov as it has never given me problems and works like a charm.
I/O Scheduling
I/O Schedulers are different ways of controlling the input/output stream of information in with the memory of a phone. These generally do not vary too much in performance or battery-life but everybody seems to have a preferred one. I don't have a favorite and switch between noop, row, and zen from time to time again.
My only preferred setting here is setting the read-ahead buffer to 4096, as it increases speed and performance without any real hit to the battery.
TCP Congestion Control
I am not very well versed in TCP protocol or anything in the sort, but this basically controls how your phone interacts with Wifi/Data packets.
My preference (and, from what I've read, the general consensus) points to the Westwood TCP Congestion Controller. Never had any problems with it, too lazy to benchmark them.
I will add more later, and as I add features to the kernel, I will add explanations! Also, I plan on buying the Faux Clock app soon simply to figure out which profile is which (since the information is nowhere to be found) and then I'll return it and report the numbers back here. Also, whenever Cyanogen decides we're ready for CM12 official, the kernel will be ready for CM12 too. Please bear in mind that I hate updating and am not one with the Github (nor do I have time to learn about Github). Cheers! :good:
GOOD JOB:good::good::good:
And a little cpu overclock like 2ghz plzzzz ^^
Is it possible that you can create a kernel for F240?
Name... Hmmm
2SHAYNEZ
MitoTakatori said:
Is it possible that you can create a kernel for F240?
Click to expand...
Click to collapse
Hmmm... You posted the kernel for F240 to be compatible with E980 CM11 ROMs... right? If you can give me source for that I can try and add the same things to it as I am the e980. But I am by no means a dev or anything.
Snepsts said:
Hmmm... You posted the kernel for F240 to be compatible with E980 CM11 ROMs... right? If you can give me source for that I can try and add the same things to it as I am the e980. But I am by no means a dev or anything.
Click to expand...
Click to collapse
Nice. I will check the source then pinpoint it to you. Thanks in advance.
MitoTakatori said:
Nice. I will check the source then pinpoint it to you. Thanks in advance.
Click to expand...
Click to collapse
I hope I am able to deliver a kernel to you. By the way, what is the difference between F240 and E980/E988? I know E988 is international. Is F240 Viet or something? And what are hardware differences?
Snepsts said:
I hope I am able to deliver a kernel to you. By the way, what is the difference between F240 and E980/E988? I know E988 is international. Is F240 Viet or something? And what are hardware differences?
Click to expand...
Click to collapse
That's a good question... But u did build this on vmware? What steps did u take?
Snepsts said:
I hope I am able to deliver a kernel to you. By the way, what is the difference between F240 and E980/E988? I know E988 is international. Is F240 Viet or something? And what are hardware differences?
Click to expand...
Click to collapse
F240 is korean. I really don't know the exact difference between the E98x variants and the F240x. Maybe some kernel thingy.
bountyman334 said:
That's a good question... But u did build this on vmware? What steps did u take?
Click to expand...
Click to collapse
Yes. VMware using Linux Mint 64-bit. My main machine is a Windows 7 with AMD FX-6350 (3.9 GHz) and 8 GB of RAM.
Here, read the guide mukwing gave me in this thread: http://forum.xda-developers.com/optimus-g-pro/general/making-cm11-0-kernel-e980-t2870820
That should be everything you need. Props to him he knows what he's doing!
MitoTakatori said:
F240 is korean. I really don't know the exact difference between the E98x variants and the F240x. Maybe some kernel thingy.
Click to expand...
Click to collapse
I do believe there are some slight hardware differences which is what I read. I'm guessing the kernel you posted tells it to emulate an e980 somehow with the hardware. Maybe do something a little different to behave like e980. I don't really know though, that's just my guess. But yes I'll totally give it a shot if you can give me source.
Name it "Spartan" kernel or "Taco" kernel ?
2SHAYNEZ
shayneflashindaily said:
Name it "Spartan" kernel or "Taco" kernel ?
2SHAYNEZ
Click to expand...
Click to collapse
Is the Taco kernel a reference to the flashaholic thread?
I like Spartan kernel though...
I was thinking of something like the "Ignis" kernel. Ignis is Latin for flame. Or maybe "Phoenix" kernel.
Knock on/double tap to wake please
Just tried to add some governors. Picked them right off of another kernel... I also copied and pasted the kconfig, makefile, and cpufreq.h files hoping that it would be the same... didn't work. Haha, guess I'll try typing in the config stuff myself and see where that gets me.
Adding features is the most headache things haha.
The commits from other device's kernel always not so compatible with e980 kernel.
Even commits from similar device's kernel like oppo n1 or G Pad 8.3 i still can't sucessfully incorporate them.
Without knowledge of programming, hard to find out what's wrong in the code.......
BTW, i have compiled a TWRP which can mount/read/write to F2FS formatted sdcard. But it lack the ability to format the sdcard to F2FS, need to do it in linux.(i am not sharing it because it still have chance of recovery bootloop)
mukwing said:
Adding features is the most headache things haha.
The commits from other device's kernel always not so compatible with e980 kernel.
Even commits from similar device's kernel like oppo n1 or G Pad 8.3 i still can't sucessfully incorporate them.
Without knowledge of programming, hard to find out what's wrong in the code.......
BTW, i have compiled a TWRP which can mount/read/write to F2FS formatted sdcard. But it lack the ability to format the sdcard to F2FS, need to do it in linux.(i am not sharing it because it still have chance of recovery bootloop)
Click to expand...
Click to collapse
Wow really? Damn I would have thought for sure HTC One kernels would have some similarity (Since we have identical processors).
Guess I'm learning C. I've actually made sense out of some of the programming already, but it's gonna be a ***** to get working. Thanks for the info though.
Good if you know programming language!
Waiting your kernel
But i will stay with stock lg for a while, haha.
Running this with acid and its running great, lost 2% between 11pm-6 in deepsleep:beer:
Sent from my LG-E980 using XDA Free mobile app
Snepsts said:
Is the Taco kernel a reference to the flashaholic thread?
I like Spartan kernel though...
I was thinking of something like the "Ignis" kernel. Ignis is Latin for flame. Or maybe "Phoenix" kernel.
Click to expand...
Click to collapse
Lol love tacos .... How about "La flama Blanca" The white flame lol .. Jk
2SHAYNEZ

Categories

Resources