PowerSaverKernel - Usb battery drain bugs solved [UPDATED 2011/08/07]

Search This thread

farmatito

Senior Member
Apr 28, 2009
567
130
Oppo Find 7a
In this thread you will find a set a patches I've applied to pershoot's
kernel2635 source (https://github.com/pershoot/kernel-2635.git) in a
attempt to compile my own kernels and to fix the long standing and not cared of usb
battery drain bug (able to eat your battery in less than 2hrs).
A (outdated) list of the applied patches is:

  • 001-fix_msm_clock_warning.patch
  • 002_fix_msm_nand_warning.patch
  • 003-2.6.35.13-sched-bfs-404.patch this is by Con Kolivas http://ck.kolivas.org/patches/bfs/2.6.35/
  • 004-bfs_fix.patch
  • 006-msm_evlog_fix.patch
  • 007-hw3d_refdata.fix
  • 008-htc_pwrsink_refdata.patch
  • 009-board_trout_sapphire_fix.patch
  • 010-eventpoll_fix.patch
  • 011-dm-crypt_fix.patch
  • 012-mt9t013_fix.patch
  • 013-msm_smd_fix.patch
  • 014-pm_fix.patch
  • 016-mddi_refdata_fix.patch
  • 017-lowmemorykiller_fix.patch
  • 022-adb_2.6.29_forward_porting.patch
  • 023-htc_battery.patch
  • 024-msm72k_udc.patch
  • 025-patch-2.6.35.11-12
  • 026-BFQ-v2.patch
  • 027-BFQ-v2-r1.patch
  • 028-smd_rpcrouter.patch
  • 029-audpp_missed_DMA.patch
  • 030-msm_serial_hs.patch
  • 031-irq_pm.patch
  • 032-smd_tty.patch
  • 033-linux-2.6.38.y.git-524429c31b486c05449666b94613f59f729c0a84.patch
  • 034-10mb_32A.patch (MT1.2/Old 32a memory map)
  • 035-9aa258a27b6183e8e80241e4820883eaed23139f.patch (Magic Plus (32a) extra 10MB ram)
  • 036-kmalloc_b0937124b376946a5c93504f34ac932dffb23e3e.patch
  • 037-2.6.36_lowmemorykiller+fudgeswap.patch
  • 038-minfree_stats-bb4a7baa64d9a56124e1f13510e9688aeed0cc10.patch
  • 039-msm72k_udc_fix_msm.git-1aa53ebd36088a60fcf4a498f763358598a477b9.patch
  • 040-synaptics_warning_fix.patch
  • 041-BFS-401-2388fb7aee855019c4a7560efb54cc7550a09743.patch
  • 042-BFS-rr_interval_335f482a0274a640ae6ab1a0036a3b263de575b6.patch
  • 043-i2c_msm_a146e17dd81a2e4eaf67928c945038f521409384.patch
  • 044-BFS-1000Hz.patch
  • 045-patch-2.6.35.12-13
  • 046-zram.patch
  • 047-vzalloc_for_zram_linux-2.6.38.y.git-e1ca7788dec6773b1a2bce51b7141948f2b8bccf.patch
  • 049-pmem_c21c461ce3e32d26abebe6243039824839748dc5.patch
  • 050-gingerbread_gadget_update.patch
  • 051-adb_2.6.29_forward_porting.patch
  • 052-msm72k_udc.patch
  • 053_msm72k_udc_warning_fix.patch
  • 054-ae9bd4d574b7b8480aee162273d58d0c3840510a.patch
  • 055-ARM-zImage.patch
  • 056-wifi-3e6f7025178699b354e0e9fd94331f47ebb82763.patch
  • 057-arm-mm-cache-ecce0382ee54a765abcdc982e01a5fd30099f52d.patch
  • 058-autogroup patches
  • 059-patch-2.6.35.13-14
  • 060-cpufreq_stat_fix.patch
  • configs for 2708, ebi0 and ebi1
Please refer to the attached patches.zip files for the latest
patch series.

Main features of this kernel are:
  • BFS (in the BFS versions)
  • BFQv2r1
  • Overclocking
  • various fixes and minor enhancements
  • autogroup patches (in the autogroup versions)
BUG 1 (adb):
Patches 1-2, 4-17 are rather trivial stuff as they just silence some warnings.
Patch 22 is the one that seems to fix or reduce the "usb battery drain bug"
in the sense that after applying this patch I was not able to trigger the bug
again and I've tried several times the last days. The same result was reported
by a few courageous testers that risked to install one of my precompiled kernels
and whom I would like to thank for their collaborative effort.
The steps used to trigger the bug were:

  1. plug in usb
  2. start adb session
  3. remove usb plug
  4. check if a sticky android os entry is in the battery stats (a sure sign of incipient drain)
The patch reverts f_adb.c to be more similar to how it was in kernel 2.6.29-msm.
Similar code could also be found in HTC's 2.6.35 sources for the Incredible S
at http://dl4.htc.com/RomCode/Source_and_Binaries/vivo-2.6.35-g89aa373.tar.gz
so it could also be a alternative to use this code base for future G1 kernels.

Attached you'll find also the config I used to build the kernels posted
in the ezGingerbread thread and in Enomther's thread.

I hope this patch fixes this bug also for you as it did for me
making me a happy G1 user again.

I would thank to all who collaborated to this effort with facts
or with their wise words and advices.

BUG 2 (drain after reboot with usb connected):
After studying more and more bug N°2 and thanks to the comments of the posters who sent me in the right direction
I've made a good progress. It is very early to call it a conclusive solution yet, but I was able to reboot my phone
with usb connected and after 3 hrs it is fully charged.
What did the trick was to disable:

CONFIG_SERIAL_MSM

in the kernel. I don't know what it was there for but at least
on my G1 I've tested all basic functions:


  • phone call
  • sms
  • data
  • wifi
  • BT
  • adb
  • music
  • GPS

and every thing seems to work. More test are needed tough,
there are also some minor leftovers to fix (more on this
in the next days).
For the bold a new kernel to test (tested on enomther's rom,
so I don't know if it will work on other roms).

You'll also find a VERY EXPERIMENTAL
anykernel/autokernel flashable zip archive with
EBI0/EBI1/2708+ kernels. Use it AT YOUR OWN RISK
and kindly report success or failure while flashing.
I cannot test it on all device/ROM combinations
so it may or may not work for you.
MAKE A BACKUP BEFORE USING IT so if something
goes wrong you can restore your previous rom.
I can give you very limited support due to missing
free time nonetheless patches are welcome!

Autokernel with BFS v0.401 and 1000Hz Kernel timer resolution for Froyo (discontinued):
auto-boot-2.6.35.13-farmatito-pershoot-ds-BFS+-20110428.zip
http://www.multiupload.com/8CKICMRK6B
MD5SUM 999770a413cbe93be75e00b1529f2300

Autokernel with BFS v0.404 for Gingerbread (experimental):
auto-boot-2.6.35.13-farmatito-pershoot-ds-BFS+-20110518.zip
http://www.multiupload.com/YRXWMK1AY3
MD5SUM c1373c915c8bfe3ebb470e839756a735

Standard Autokernel for Froyo (discontinued):

auto-boot-2.6.35.13-farmatito-pershoot-ds+-20110428.zip
http://www.multiupload.com/LLMKG4TRTO
MD5SUM ee3f5c53b4871076f123491c9dc388e2

Standard Autokernel for Gingerbread (stable):
auto-boot-2.6.35.13-farmatito-pershoot-ds+-20110505.zip
http://www.multiupload.com/0SJ77OM4HA
MD5SUM61a8bb913ca43a355e1eef3152b008db

Standard Autokernel for Gingerbread
with autogroup patches and memory compaction (experimental):
auto-boot-2.6.35.14-farmatito-pershoot-ds+-20110802.zip
http://www.multiupload.com/3NJ7Q0Y4TN
MD5SUM 27536ef42348dd92bb006cd8511df5d9

This kernels are unsupported they worked for me and I hope
they work for you, feel free to report problems and I will try to
fix them depending on my free time and skills.

USE AT YOUR OWN RISK. NO WARRANTY.

Enjoy


Changelog
v 20110425:

  • fixes to the installer automagic.
v 20110428:

  • BFS v0.401 + 1000Hz kernel timer resolution (BFS-version only) + rr_interval tuning.
  • i2c_msm HTC update
  • updated to 2.6.35.13
V 20110505:

  • revert kernel timer resolution to 100Hz
  • revert rr_interval tuning (BFS version)
  • update android gadget to gingerbread version.
V 20110518:

  • BFS v0.404 in the BFS versions
V 20110612

  • Compensate for rounding on odd-frequency clocksources
  • zImage fixes
  • Enable Memory Compaction
  • wifi - Don't make disabled irqs wake the device
  • cache-l2x0: Correct l2x0 initialization
  • autogroup patches
V 20110802

  • update to 2.6.35.14 (autogroup version only)
 

Attachments

  • 2.6.35.13-froyo-patches-20110505.zip
    339.3 KB · Views: 2,221
  • 2.6.35.13-ginger-patches-20110505.zip
    500.1 KB · Views: 995
  • 2.6.35.13-ginger-patches-20110518.zip
    498.7 KB · Views: 1,845
  • 2.6.35.14-ginger-autogroup-patches-20110807.zip
    569.7 KB · Views: 2,656
Last edited:

Jurai

Senior Member
May 26, 2010
209
20
I'm glad to see someone working to fix the USB bug, I hope it will be squashed in pershoots official builds eventually as well
 

pardus

Senior Member
Apr 11, 2007
410
42
Johannesburg
Good work! Will try it out.

A while back everything on my screen froze (time and battery level not updated) but otherwise the phone worked 100%, however the battery lasted 2 days and 20 hours (68hrs with wifi on, 3G on, 614 overclock, browsing and gmail, etc). Weird
 

dilwaladoctor

Senior Member
Nov 20, 2010
184
21
Midwest
Forgive me if my question feels like a noob but exactly how should we apply this zip file.....should I flash it?.... OR....it has to be installed through adb (or terminal emulator?)
I read the OP but couldnt make about the methos of installing it....(kinda stupid of me I know...:confused:
Is it OK to use your kernel instead of this patch?....do they have same effect?
 
Last edited:

farmatito

Senior Member
Apr 28, 2009
567
130
Oppo Find 7a
Forgive me if my question feels like a noob but exactly how should we apply this zip file.....should I flash it?.... OR....it has to be installed through adb (or terminal emulator?)
I read the OP but couldnt make about the methos of installing it....(kinda stupid of me I know...:confused:
Is it OK to use your kernel instead of this patch?....do they have same effect?

The patches in the zip need to be applied to the kernel sources, built and then
a anykernel zip installer must be created. Then you can flash it.
You can try also a precompiled kernel if it is compatible with your rom.
So best is to take a nandroid backup in case things go bad.
I suggest you to wait that it is included by the devs of the rom you use
if they see it fit.
 
Last edited:
  • Like
Reactions: dilwaladoctor

ezterry

Retired Recognized Developer
Jan 16, 2010
1,829
968
Asheville, NC
My testing is as follows

Using the ezGingerbread binary on a clean ezGingerbread install with gapps+facebook but no wifi or sim:

The USB connection in use is just a wire to my macbook.

0) battery validation: boot system from battery only and leave for extended time.. I was at 83% after 13h.. this indicates no particular extra drain thus this test passed

1) basic test: boot while phone charging on macbook, after system is fully loaded unplug from USB, replug, unplug again.. this case the phone was drained in under 13h thus indicates the USB drain is present test failed

2) adv. test: boot phone on batter such as test 0, after test 0 drained to say 79% charge with usb slightly, the unplug usb again and leave.. hours later indicated no significant drain test passed.

3) adv. test 2: now at 60% after test2 plug into usb reboot and unplug after fully loaded.. such as in test1 drain quickly continued test failed.

Thus we seem to have a form of USB drain that is not in the 2.6.34.* kernels, however it may be possible on this kernel to avoid it by booting the phone on its own power (I did not test booting the phone on the A/C adapter, least not yet and more testing is needed to be sure there is no other oddities)
 
Last edited:
  • Like
Reactions: dilwaladoctor

farmatito

Senior Member
Apr 28, 2009
567
130
Oppo Find 7a
@ezterry :

so if understand it correctly it is booting/rebooting with
usb plugged in that still fails?

Do you see the same stuck "android os" entry in battery stats?
If not, than maybe it is a different bug, so more patching is needed.

UPDATE:

test:

plug in usb
reboot
wait a little while phone is charging
unplug usb
go to battery stats:
there you'll see "android os" entry
hit a few times refresh
"android os" %value decreases and after a few more refresh hits it disappears.

I think that if there is battery drain in this case it is not the same bug.
Will check the phone later to see how it behaves:

  • 16.59 84%
  • 18.18 77%
  • 20.42 68%
16 % / 4hrs = 4% /1hrs (in idle state)

Looks not so bad to me... but definitely would not last
48+ hours as my battery usually lasts.
In my opinion this is not the same bug tough, because
what I and other users were experiencing was a very
fast battery drain after disconnecting from a adb
session. The latter bug is indeed fixed.
 
Last edited:

farmatito

Senior Member
Apr 28, 2009
567
130
Oppo Find 7a
After more testing with this bug N° 2 triggered the power
consumption with my extended battery is stable at about
4%/hr. I've looked at the most likely candidates

htc_battery.c
msm72k_udc.c

but I've not spotted differences between 2.6.34.8 and 2.6.35.11
that could explain the different behaviour.
Hints and help is welcome.
 

VAMCAVALO

Senior Member
Apr 9, 2009
60
0
Can some one explain that USB drain problem?

I already had change my battery but it hasn't make any difference...
My G1 can only work for 4h and them the battery is over.

That patch can fix it?
How do I flash it?
 

crypticc

Senior Member
Aug 22, 2009
1,164
139
London
Can some one explain that USB drain problem?

I already had change my battery but it hasn't make any difference...
My G1 can only work for 4h and them the battery is over.

That patch can fix it?
How do I flash it?

Check out post for and five on this page.
Sheesh

Lol

Sent from my Dream/Sapphire using XDA App
 

Dukenukemx

Senior Member
Jul 24, 2008
1,115
50
Jersey
Can some one explain that USB drain problem?

I already had change my battery but it hasn't make any difference...
My G1 can only work for 4h and them the battery is over.

That patch can fix it?
How do I flash it?

There's a few ways to improve you battery life. I went crazy myself, and finally got it working great.

#1 If you're still using the original battery in your G1, it's probably time to replace it.

#2 Some roms do better with battery life, some don't.

#3 Be careful what radio you use. The radio 2.22.27.08 is probably better for USA users, while 2.22.28.25 is better for other countries.

#4 Trying disabling stuff you don't use. Turn off Auto-sync, if you don't need constant updates for E-Mail and contacts backup. You most likely don't. Disabling background data helps, but you'll need to enable it to use any data. Disabling Data under network settings has no effect in how your phone functions, but does decrease battery drain.

#5 Try changing the clock speed of your phone. Most good roms come with built in overclock, and you can change the min CPU frequency to lower then 245 Mhz. Be careful in how much you lower it, cause anything that happens on your phone will kick in the Max CPU frequency, and suck battery power.

#6 Make sure everything is working, like the camera. For months I was going crazy on my battery drain, and just recently discovered my camera wasn't working. Turns out, the camera cable was slightly disconnected. This can easily happen, since the cable sits right under the battery. Took phone apart, plugged it back in, and now battery lasts for 2 days.

#7 Of course, make sure no services are running in the background. Running applications in the background can force your hones CPU to run at max speed.

As for the USB drain bug, basically when you plug your phone in to your PC, it can drain the crap out of your battery. So charging your phone with your PC is a bad idea, and you'll have to reset it to avoid it draining so fast.
 
Last edited:

VAMCAVALO

Senior Member
Apr 9, 2009
60
0
There's a few ways to improve you battery life. I went crazy myself, and finally got it working great.

#1 If you're still using the original battery in your G1, it's probably time to replace it.

#2 Some roms do better with battery life, some don't.

#3 Be careful what radio you use. The radio 2.22.27.08 is probably better for USA users, while 2.22.28.25 is better for other countries.

#4 Trying disabling stuff you don't use. Turn off Auto-sync, if you don't need constant updates for E-Mail and contacts backup. You most likely don't. Disabling background data helps, but you'll need to enable it to use any data. Disabling Data under network settings has no effect in how your phone functions, but does decrease battery drain.

#5 Try changing the clock speed of your phone. Most good roms come with built in overclock, and you can change the min CPU frequency to lower then 245 Mhz. Be careful in how much you lower it, cause anything that happens on your phone will kick in the Max CPU frequency, and suck battery power.

#6 Make sure everything is working, like the camera. For months I was going crazy on my battery drain, and just recently discovered my camera wasn't working. Turns out, the battery cable was slightly disconnected. This can easily happen, since the cable sits right under the battery. Took phone apart, plugged it back in, and now battery lasts for 2 days.

#7 Of course, make sure no services are running in the background. Running applications in the background can force your hones CPU to run at max speed.

As for the USB drain bug, basically when you plug your phone in to your PC, it can drain the crap out of your battery. So charging your phone with your PC is a bad idea, and you'll have to reset it to avoid it draining so fast.

Thank you for the answer!

#1 I already replaced the battery

#2 I am using the Laszlo Froyo and it's know for your not so good battery performance.

#3 I from Brazil but using 2708 radio...should I change it?

#4 Only 2G and all unnecessary stuff its out.

#5 I use the laszlo built-in CPU settings at Extras>Performance at 176-528 ondemand.. it is OK?

#6 I'm sorry but I didn't understand your problem at this point. Which battery
cable? Mine camera it's OK right now..

#7 I'm pretty sure that I know there is no app in background but there is some way to check this out?


a) And I tried to flash today the 2.6.35.11 kernel to see if it help because with laszlo rom, my G1 became really nice again but the battery sometimes make me not that happy.

b) When I charge at PC (often), the only thing I need to do is to reboot after unplug, right?

Thank you very much
 
Last edited:

Dukenukemx

Senior Member
Jul 24, 2008
1,115
50
Jersey
#3 I from Brazil but using 2708 radio...should I change it?

#5 I use the laszlo built-in CPU settings at Extras>Performance at 176-528 ondemand.. it is OK?

#6 I'm sorry but I didn't understand your problem at this point. Which battery
cable? Mine camera it's OK right now..

#7 I'm pretty sure that I know there is no app in background but there is some way to check this out?
#3 You'll have to experiment to see which radio works best for you. I used 2825 before realizing that I never tried 2708. For me, 2708 was way better, but what works best for me might not be best for everyone. Since radios are made for specific regions.

#5 I'm also using Laszlo CPU settings like you are. BTW, same rom but my battery lasts for 2 days.

#6 I worded that incorrectly. I meant to say that my camera cable was lose, and the camera wasn't working. I didn't know this, cause I didn't use the camera for months. I fixed it, and now my battery life is 10x better. The cable for the camera sits under the battery, and can easily be pulled lose by dropping the phone.
#7 Aftermarket apps from the market provide the best way to check. Though if you're sure, then don't bother. It's not hard to see if an app is running still.

a) I'm using the kernel that came with Laszlo rom, but I've found that ezBiffTestKernel20110222-2708_S.zip works great for most roms.

b) Yea reboot after you unplug it. My battery has been doing so well lately, that I can wait till I get to my car to charger it. Using my car charger to avoid charging with the PC. [/QUOTE]
 
  • Like
Reactions: VAMCAVALO

VAMCAVALO

Senior Member
Apr 9, 2009
60
0
#3 You'll have to experiment to see which radio works best for you. I used 2825 before realizing that I never tried 2708. For me, 2708 was way better, but what works best for me might not be best for everyone. Since radios are made for specific regions.

#5 I'm also using Laszlo CPU settings like you are. BTW, same rom but my battery lasts for 2 days.

#6 I worded that incorrectly. I meant to say that my camera cable was lose, and the camera wasn't working. I didn't know this, cause I didn't use the camera for months. I fixed it, and now my battery life is 10x better. The cable for the camera sits under the battery, and can easily be pulled lose by dropping the phone.
#7 Aftermarket apps from the market provide the best way to check. Though if you're sure, then don't bother. It's not hard to see if an app is running still.

a) I'm using the kernel that came with Laszlo rom, but I've found that ezBiffTestKernel20110222-2708_S.zip works great for most roms.

b) Yea reboot after you unplug it. My battery has been doing so well lately, that I can wait till I get to my car to charger it. Using my car charger to avoid charging with the PC.

#3 I will try 2825 so!

#5 Holy ****! Two days I can only get leaving the phone on eternal standby...

#6 Now I understand, but my camera and other functions are normal right now.

#7 I'm sorry, but what is aftermarket apps?

a) 2.6.35.11 it's know to be a better kernel on the battery performance. Right now I'm testing 35.10 and I need to wipe my battery stats because I think it can be one of the problems.

b) Ok, that is not a problem because I charge at PC lot of times, so now I will reboot after unplugging.

Well, after all of this, if nothing works, should I change my battery again? I already changed at December 10 but it is a generic one.

TKS
 

good223

Senior Member
Apr 24, 2010
85
14
I just flashed the kernel and I've had good results regarding the battery drain. No more high % "AndroidOS" under the battery stats.

The only thing I found to be weird is the touch screen. It seems like the responsiveness while scrolling through the settings, homescreen, and app drawer is laggy and unresponsive. It sometimes doesn't even scroll when I move my finger across the screen. Also pulling the notification bar is very difficult as I really have to slowly drag it down.

I currently am using the newest kernel released, the 04/03 one, on CyanogenMod nightly 307 on my G1. My old kernel was the "ezBiffTestKernel20101106-2708_S.zip"

Thanks for your work on the battery drain problem.
 
Last edited:

farmatito

Senior Member
Apr 28, 2009
567
130
Oppo Find 7a
I just flashed the kernel and I've had good results regarding the battery drain. No more high % "AndroidOS" under the battery stats.

The only thing I found to be weird is the touch screen. It seems like the responsiveness while scrolling through the settings, homescreen, and app drawer is laggy and unresponsive. It sometimes doesn't even scroll when I move my finger across the screen. Also pulling the notification bar is very difficult as I really have to slowly drag it down.

I currently am using the newest kernel released, the 04/03 one, on CyanogenMod nightly 307 on my G1. My old kernel was the "ezBiffTestKernel20101106-2708_S.zip"

Thanks for your work on the battery drain problem.

Could be due to the use of BFS, maybe I'll post a kernel without it in the next days, as I'm testing other changes
right know.
 

good223

Senior Member
Apr 24, 2010
85
14

captaincrook

Senior Member
Sep 17, 2010
241
126
First two zips froze at the G1 screen using DangerSPL & proper radio, though all of them work fine using the 2.22.27.08/2.22.28.25 radio & appropiate SPL.

The phone doesn't sleep either.

Will test performance more thoroughly tomorrow.
 

farmatito

Senior Member
Apr 28, 2009
567
130
Oppo Find 7a
Ah ok, but what exactly is BFS? I did a quick google search and I came across this article "http://techfreaks4u.com/blog/posts/kernel-linux-kernel-with-bfs/", but I still don't quite understand how it affects our phones.
Could you explain it in a simpler way?

It divides cpu time more or less in equal parts to all running tasks, so all (the more cpu intensive and less intensive) have
the possibility to run in a given time period, the contra is that
the more cpu intensive tasks may slow down a little.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    In this thread you will find a set a patches I've applied to pershoot's
    kernel2635 source (https://github.com/pershoot/kernel-2635.git) in a
    attempt to compile my own kernels and to fix the long standing and not cared of usb
    battery drain bug (able to eat your battery in less than 2hrs).
    A (outdated) list of the applied patches is:

    • 001-fix_msm_clock_warning.patch
    • 002_fix_msm_nand_warning.patch
    • 003-2.6.35.13-sched-bfs-404.patch this is by Con Kolivas http://ck.kolivas.org/patches/bfs/2.6.35/
    • 004-bfs_fix.patch
    • 006-msm_evlog_fix.patch
    • 007-hw3d_refdata.fix
    • 008-htc_pwrsink_refdata.patch
    • 009-board_trout_sapphire_fix.patch
    • 010-eventpoll_fix.patch
    • 011-dm-crypt_fix.patch
    • 012-mt9t013_fix.patch
    • 013-msm_smd_fix.patch
    • 014-pm_fix.patch
    • 016-mddi_refdata_fix.patch
    • 017-lowmemorykiller_fix.patch
    • 022-adb_2.6.29_forward_porting.patch
    • 023-htc_battery.patch
    • 024-msm72k_udc.patch
    • 025-patch-2.6.35.11-12
    • 026-BFQ-v2.patch
    • 027-BFQ-v2-r1.patch
    • 028-smd_rpcrouter.patch
    • 029-audpp_missed_DMA.patch
    • 030-msm_serial_hs.patch
    • 031-irq_pm.patch
    • 032-smd_tty.patch
    • 033-linux-2.6.38.y.git-524429c31b486c05449666b94613f59f729c0a84.patch
    • 034-10mb_32A.patch (MT1.2/Old 32a memory map)
    • 035-9aa258a27b6183e8e80241e4820883eaed23139f.patch (Magic Plus (32a) extra 10MB ram)
    • 036-kmalloc_b0937124b376946a5c93504f34ac932dffb23e3e.patch
    • 037-2.6.36_lowmemorykiller+fudgeswap.patch
    • 038-minfree_stats-bb4a7baa64d9a56124e1f13510e9688aeed0cc10.patch
    • 039-msm72k_udc_fix_msm.git-1aa53ebd36088a60fcf4a498f763358598a477b9.patch
    • 040-synaptics_warning_fix.patch
    • 041-BFS-401-2388fb7aee855019c4a7560efb54cc7550a09743.patch
    • 042-BFS-rr_interval_335f482a0274a640ae6ab1a0036a3b263de575b6.patch
    • 043-i2c_msm_a146e17dd81a2e4eaf67928c945038f521409384.patch
    • 044-BFS-1000Hz.patch
    • 045-patch-2.6.35.12-13
    • 046-zram.patch
    • 047-vzalloc_for_zram_linux-2.6.38.y.git-e1ca7788dec6773b1a2bce51b7141948f2b8bccf.patch
    • 049-pmem_c21c461ce3e32d26abebe6243039824839748dc5.patch
    • 050-gingerbread_gadget_update.patch
    • 051-adb_2.6.29_forward_porting.patch
    • 052-msm72k_udc.patch
    • 053_msm72k_udc_warning_fix.patch
    • 054-ae9bd4d574b7b8480aee162273d58d0c3840510a.patch
    • 055-ARM-zImage.patch
    • 056-wifi-3e6f7025178699b354e0e9fd94331f47ebb82763.patch
    • 057-arm-mm-cache-ecce0382ee54a765abcdc982e01a5fd30099f52d.patch
    • 058-autogroup patches
    • 059-patch-2.6.35.13-14
    • 060-cpufreq_stat_fix.patch
    • configs for 2708, ebi0 and ebi1
    Please refer to the attached patches.zip files for the latest
    patch series.

    Main features of this kernel are:
    • BFS (in the BFS versions)
    • BFQv2r1
    • Overclocking
    • various fixes and minor enhancements
    • autogroup patches (in the autogroup versions)
    BUG 1 (adb):
    Patches 1-2, 4-17 are rather trivial stuff as they just silence some warnings.
    Patch 22 is the one that seems to fix or reduce the "usb battery drain bug"
    in the sense that after applying this patch I was not able to trigger the bug
    again and I've tried several times the last days. The same result was reported
    by a few courageous testers that risked to install one of my precompiled kernels
    and whom I would like to thank for their collaborative effort.
    The steps used to trigger the bug were:

    1. plug in usb
    2. start adb session
    3. remove usb plug
    4. check if a sticky android os entry is in the battery stats (a sure sign of incipient drain)
    The patch reverts f_adb.c to be more similar to how it was in kernel 2.6.29-msm.
    Similar code could also be found in HTC's 2.6.35 sources for the Incredible S
    at http://dl4.htc.com/RomCode/Source_and_Binaries/vivo-2.6.35-g89aa373.tar.gz
    so it could also be a alternative to use this code base for future G1 kernels.

    Attached you'll find also the config I used to build the kernels posted
    in the ezGingerbread thread and in Enomther's thread.

    I hope this patch fixes this bug also for you as it did for me
    making me a happy G1 user again.

    I would thank to all who collaborated to this effort with facts
    or with their wise words and advices.

    BUG 2 (drain after reboot with usb connected):
    After studying more and more bug N°2 and thanks to the comments of the posters who sent me in the right direction
    I've made a good progress. It is very early to call it a conclusive solution yet, but I was able to reboot my phone
    with usb connected and after 3 hrs it is fully charged.
    What did the trick was to disable:

    CONFIG_SERIAL_MSM

    in the kernel. I don't know what it was there for but at least
    on my G1 I've tested all basic functions:


    • phone call
    • sms
    • data
    • wifi
    • BT
    • adb
    • music
    • GPS

    and every thing seems to work. More test are needed tough,
    there are also some minor leftovers to fix (more on this
    in the next days).
    For the bold a new kernel to test (tested on enomther's rom,
    so I don't know if it will work on other roms).

    You'll also find a VERY EXPERIMENTAL
    anykernel/autokernel flashable zip archive with
    EBI0/EBI1/2708+ kernels. Use it AT YOUR OWN RISK
    and kindly report success or failure while flashing.
    I cannot test it on all device/ROM combinations
    so it may or may not work for you.
    MAKE A BACKUP BEFORE USING IT so if something
    goes wrong you can restore your previous rom.
    I can give you very limited support due to missing
    free time nonetheless patches are welcome!

    Autokernel with BFS v0.401 and 1000Hz Kernel timer resolution for Froyo (discontinued):
    auto-boot-2.6.35.13-farmatito-pershoot-ds-BFS+-20110428.zip
    http://www.multiupload.com/8CKICMRK6B
    MD5SUM 999770a413cbe93be75e00b1529f2300

    Autokernel with BFS v0.404 for Gingerbread (experimental):
    auto-boot-2.6.35.13-farmatito-pershoot-ds-BFS+-20110518.zip
    http://www.multiupload.com/YRXWMK1AY3
    MD5SUM c1373c915c8bfe3ebb470e839756a735

    Standard Autokernel for Froyo (discontinued):

    auto-boot-2.6.35.13-farmatito-pershoot-ds+-20110428.zip
    http://www.multiupload.com/LLMKG4TRTO
    MD5SUM ee3f5c53b4871076f123491c9dc388e2

    Standard Autokernel for Gingerbread (stable):
    auto-boot-2.6.35.13-farmatito-pershoot-ds+-20110505.zip
    http://www.multiupload.com/0SJ77OM4HA
    MD5SUM61a8bb913ca43a355e1eef3152b008db

    Standard Autokernel for Gingerbread
    with autogroup patches and memory compaction (experimental):
    auto-boot-2.6.35.14-farmatito-pershoot-ds+-20110802.zip
    http://www.multiupload.com/3NJ7Q0Y4TN
    MD5SUM 27536ef42348dd92bb006cd8511df5d9

    This kernels are unsupported they worked for me and I hope
    they work for you, feel free to report problems and I will try to
    fix them depending on my free time and skills.

    USE AT YOUR OWN RISK. NO WARRANTY.

    Enjoy


    Changelog
    v 20110425:

    • fixes to the installer automagic.
    v 20110428:

    • BFS v0.401 + 1000Hz kernel timer resolution (BFS-version only) + rr_interval tuning.
    • i2c_msm HTC update
    • updated to 2.6.35.13
    V 20110505:

    • revert kernel timer resolution to 100Hz
    • revert rr_interval tuning (BFS version)
    • update android gadget to gingerbread version.
    V 20110518:

    • BFS v0.404 in the BFS versions
    V 20110612

    • Compensate for rounding on odd-frequency clocksources
    • zImage fixes
    • Enable Memory Compaction
    • wifi - Don't make disabled irqs wake the device
    • cache-l2x0: Correct l2x0 initialization
    • autogroup patches
    V 20110802

    • update to 2.6.35.14 (autogroup version only)
    2
    I flashed BFS kernel (auto-boot-2.6.35.12-farmatito-pershoot-ds-BFS+-20110425.zip) and before I flashed non-BFS, I think

    I reflashed them both just to be sure and they worked for me.
    Be aware that there were a few test versions 20110425 so redownloading from first post and checking md5sum could be an option.
    2
    auto-boot-2.6.35.12-farmatito-pershoot-ds-BFS+-20110425.zip
    http://www.multiupload.com/IPSIIXUCAB

    is the 1000hz in this bfs version?
    both kernels flash and booted up just fine on the dream with 2708 kernel and mt3g 1.2/fender booted up fine also. so far no ill effects noted

    Thanks for your report. I removed 1000hz for now as in some
    circumstances it was unstable on my phone.
    2
    New Autokernel with BFS v0.404 for Gingerbread (experimental):
    auto-boot-2.6.35.13-farmatito-pershoot-ds-BFS+-20110518.zip
    http://www.multiupload.com/YRXWMK1AY3
    MD5SUM c1373c915c8bfe3ebb470e839756a735

    USE AT YOUR OWN RISK. NO WARRANTY.
    2
    baseband=2.22.19.26I
    bootloader=1.33.0006
    radioseries=2.22
    custommtd=
    smisize=64
    sysboard=sapphire
    modules_sqf=0


    Just your basic original sapphire
    Got the 32B 2.6.35.11 pershoot xtra kernel from February installed fine.

    Think it should just be the EB0 kernel, right?
    Thanks good sir for your help :)

    Could you please try one of the kernels linked
    here to see if the simplified installer works for you
    as it did for me. If it does tomorrow I will move them
    to the first post.

    auto-boot-2.6.35.12-farmatito-pershoot-ds+-20110425.zip
    http://www.multiupload.com/UB7VYV4Z8P
    auto-boot-2.6.35.12-farmatito-pershoot-ds-BFS+-20110425.zip
    http://www.multiupload.com/Q667O2GG1N

    Other 32A/32b/2708/MT1.2 users are encouraged to test and report if the installer works for them.

    Enjoy and USE AT YOUR OWN RISK.