[KERNEL] [DEV] [P51xx] AA-ANYKERNEL- fix the Android 4.4.x drain

Search This thread

Android-Andi

Inactive Recognized Contributor
Mar 3, 2013
10,856
29,295
andi34.github.io
AA-ANYKERNEL

Why another Kernel?
A lot of user faced a high Battery-Drain since Android 4.4.x.
It is hard to find the cause of the Problem, because it does not happen to everyone.
The problem seems to be related to the merged commit "apply P3110 JB Update1 from opensource.samsung.com" on our kernel source wich didn´t made Problems before Android 4.4.x.

Who is working on this Kernel?
Since i am still somehow a "Newbie" and don´t understand everything i am not able to sperate the Source of Problem. Our wonderfull Kernel-Dev @ketut.kumajaya is answering my qustions if i run in some trubble.

Why a own Thread for this kernel?
You must know, most of our Roms are using the CM-11.0 Kernel for their Roms - means: a lot of Roms are affected, even if it does not happen to every user. Solveing the issue does not only help fixing CM, also a lot of other Roms wich should be in interest of every user.

Kernel-Source
https://github.com/slimroms/kernel_samsung_espresso10

About the Process:
I took our SlimKat Kernel as base:
1. Applyed the JB Update 1 commit from @ketut.kumajaya
I went back to 3.0.31 kernel and applyed JB Update 1 in 3 parts instead 1 for better changes tracking.
At least i did the upstream from 3.0.31 to 3.0.101 again and added back all other changes wich got applyed on our 3.0.101 kernel before.

@tuxafgmur made huge commit to solve the drain, it was to big to get it merged.
So i made a diff between his changes - 500.000 lines diff - lol.
I worked many days on it to get out the original commits from the diff and found most of them.

So we know JB Update 1 seems to be the source of problem, now lets go ahead:

2. revert some parts from JB Update 1
Only Partially reverted:
arch/arm/mach-omap2/cpuidle44xx.c: (partially) revert JB Update 1 and partially apply "Fix configs & missing log options" from DhollmenKernel by Tuxafgmur
drivers/net/wireless/bcmdhd/dhd_sec_feature.h: partially revert JB Update 1/3

3. Add back missing parts from Upstream 3.0.38 -> 3.0.39

4. some different changes, i´ll list the some times later

DOWNLOAD

XDA:DevDB Information
[P51xx] AA-ANYKERNEL, Kernel for the Samsung Galaxy Tab 2

Contributors
Android-Andi, ketut.kumajaya
Kernel Special Features:

Version Information
Status: Beta

Created 2014-06-29
Last Updated 2014-07-27
 

Android-Andi

Inactive Recognized Contributor
Mar 3, 2013
10,856
29,295
andi34.github.io
I am uploading a reworked installer, added also an Option to install our batteryfriendly SlimKat Kernel for those who need it after testing the AA-ANYKERNEL
I don´t need feedback here for SlimKat kernel, only for the AA-ANYKERNEL.
The installer includes all needed blobs for both kernel - don´t worry, it will automatically choose the right blobs
 
  • Like
Reactions: jcsy

jcsy

Senior Member
Jan 9, 2009
3,753
949
Land of the Z1/EVO3D/GTAB10.1(2)
Android andi

Sorry. Still getting -200 ma wake locks

Looking at wake lock detector app, does say Google play store services for about only 8 minutes but its more like 6 hours

Other apps are like YouTube. But that was intentional as I was watching a video for 20+minutes.

What else can I help u with?

You think I require latest minimal gapps ?

-----------------------------------------------------
Tapatalked from HTC EVO 3D GSM
CM JB 4.4.2 | 20 June 2014 | NOOP
 

fredy66

Senior Member
Jul 16, 2013
91
24
Android andi

Sorry. Still getting -200 ma wake locks

Looking at wake lock detector app, does say Google play store services for about only 8 minutes but its more like 6 hours

Other apps are like YouTube. But that was intentional as I was watching a video for 20+minutes.

What else can I help u with?

You think I require latest minimal gapps ?

-----------------------------------------------------
Tapatalked from HTC EVO 3D GSM
CM JB 4.4.2 | 20 June 2014 | NOOP

@andi

Tested jb3 update one again with wakelockdetector.
Sorry this night there was no drain.
We have to wait, because this massive drain does not happen every night.
Only a stupid question. Would it not easier to ask tuxafgmur for the drain reason?

With his kernel the drain never happend.
 

Android-Andi

Inactive Recognized Contributor
Mar 3, 2013
10,856
29,295
andi34.github.io
@fredy66 tuxafgmur tried allready, but the commit was to big to get merged...

"Squaring so much is generally a bad idea. Try to keep relevant things in a squash. Example Linux kernel upstream a squash, Sammy update another, f2f another etc. (....) squashes like are really bad, loosing commit history, debugging problems later on etc."
 
  • Like
Reactions: fredy66

evil_arri

Senior Member
Aug 27, 2013
163
85
Temuco
@jcsy wating for more feedback, after that i compile a new one.

Testing Environment:
Rom: 11-20140629-NIGHTLY-p5110
Kernel: 3.0.31-AA-ANYKERNEL
GAPPS: 6-29_GApps_Minimal_4.4.4_signed
Time: 19:39

Don't get it, you tell me what's causing the wakelock :silly:

:good::good:mad:Android-Andi
 

Attachments

  • Screenshot_2014-06-30-14-46-33.png
    Screenshot_2014-06-30-14-46-33.png
    118.9 KB · Views: 963
  • Screenshot_2014-06-30-14-46-42.png
    Screenshot_2014-06-30-14-46-42.png
    84.1 KB · Views: 908
  • Screenshot_2014-06-30-14-47-14.png
    Screenshot_2014-06-30-14-47-14.png
    55.5 KB · Views: 869
  • Screenshot_2014-06-30-14-48-51.png
    Screenshot_2014-06-30-14-48-51.png
    59.1 KB · Views: 783
  • Screenshot_2014-06-30-14-47-44.png
    Screenshot_2014-06-30-14-47-44.png
    72.8 KB · Views: 768
  • Screenshot_2014-06-30-14-47-55.png
    Screenshot_2014-06-30-14-47-55.png
    70.4 KB · Views: 710
  • Screenshot_2014-06-30-14-48-33.png
    Screenshot_2014-06-30-14-48-33.png
    85.6 KB · Views: 713

MikeyMan

Member
Nov 9, 2007
44
9
Hi andi, what van i do to help?
Nog really into programming, but i can test.

Seems The wakelocks are fixed by cm, do i need tot wait for a new kernel version by you or not?

Edit: just flashed latest nightly with tour kernel. Still lots of issues with hardware decoding. Any way to clean install the ROM without a full clear?

Edit2: i flashed The wrong file just now apparently. First Tried The zip from The main thread. This didn't worm very well. The ons from this thread works like a charm.
 
Last edited:

MrDarkos95

Senior Member
Sep 3, 2012
54
23
battery issue

Battery issue on slimkat, check the screenshot
Device: P5100
 

Attachments

  • Screenshot_2014-07-03-14-07-20.png
    Screenshot_2014-07-03-14-07-20.png
    74.2 KB · Views: 316
  • Like
Reactions: Android-Andi

jcsy

Senior Member
Jan 9, 2009
3,753
949
Land of the Z1/EVO3D/GTAB10.1(2)
Previous kernel didn't have -200 ma drains, however had -50 drains

I checked CPU spy, there was no Deep Sleep. Stuck at 300 MHz.

If deep sleep worked, it would be -10 drains only

I will test the new kernel zimage

-----------------------------------------------------
Tapatalked from HTC EVO 3D GSM
CM JB 4.4.2 | 20 June 2014 | NOOP
 
  • Like
Reactions: Android-Andi

Android-Andi

Inactive Recognized Contributor
Mar 3, 2013
10,856
29,295
andi34.github.io
This time i used cm kernel + made the upstream to 3.0.101 and applyed the JB update 3 changes.

Gesendet von meinem GT-I8190 mit Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    AA-ANYKERNEL

    Why another Kernel?
    A lot of user faced a high Battery-Drain since Android 4.4.x.
    It is hard to find the cause of the Problem, because it does not happen to everyone.
    The problem seems to be related to the merged commit "apply P3110 JB Update1 from opensource.samsung.com" on our kernel source wich didn´t made Problems before Android 4.4.x.

    Who is working on this Kernel?
    Since i am still somehow a "Newbie" and don´t understand everything i am not able to sperate the Source of Problem. Our wonderfull Kernel-Dev @ketut.kumajaya is answering my qustions if i run in some trubble.

    Why a own Thread for this kernel?
    You must know, most of our Roms are using the CM-11.0 Kernel for their Roms - means: a lot of Roms are affected, even if it does not happen to every user. Solveing the issue does not only help fixing CM, also a lot of other Roms wich should be in interest of every user.

    Kernel-Source
    https://github.com/slimroms/kernel_samsung_espresso10

    About the Process:
    I took our SlimKat Kernel as base:
    1. Applyed the JB Update 1 commit from @ketut.kumajaya
    I went back to 3.0.31 kernel and applyed JB Update 1 in 3 parts instead 1 for better changes tracking.
    At least i did the upstream from 3.0.31 to 3.0.101 again and added back all other changes wich got applyed on our 3.0.101 kernel before.

    @tuxafgmur made huge commit to solve the drain, it was to big to get it merged.
    So i made a diff between his changes - 500.000 lines diff - lol.
    I worked many days on it to get out the original commits from the diff and found most of them.

    So we know JB Update 1 seems to be the source of problem, now lets go ahead:

    2. revert some parts from JB Update 1
    Only Partially reverted:
    arch/arm/mach-omap2/cpuidle44xx.c: (partially) revert JB Update 1 and partially apply "Fix configs & missing log options" from DhollmenKernel by Tuxafgmur
    drivers/net/wireless/bcmdhd/dhd_sec_feature.h: partially revert JB Update 1/3

    3. Add back missing parts from Upstream 3.0.38 -> 3.0.39

    4. some different changes, i´ll list the some times later

    DOWNLOAD

    XDA:DevDB Information
    [P51xx] AA-ANYKERNEL, Kernel for the Samsung Galaxy Tab 2

    Contributors
    Android-Andi, ketut.kumajaya
    Kernel Special Features:

    Version Information
    Status: Beta

    Created 2014-06-29
    Last Updated 2014-07-27
    7
    i have seen on sammobile.com samsung released more 4.2.2 updates until July! That means: our kernel-source meight be outdated.


    We can fix some bugs like poor battery life and maybe some more, but only with your help - the XDA-Community!

    These bugs are caused by OS kernel which is not up-to-date with stock ROM’s and Samsung is refusing to update it. Our previous requests have been ignored by them, and the point is that Samsung have to update it, they are just forced by law and licensing terms of Linux, however they just don’t want to do this because of some unknown reason.

    I think that the only way to get an updated source code is to… Show the power of our community and spam them with request messages. That’s the only way to fix Tab 2 bugs wich are still present.
    S3 mini and Ace 2 community have done this before with a great success, so we can do this too! It only took 2 or 3 days until Samsung updated the S3 mini kernel source!

    It’s a nasty way, but it’s the only thing we can do as a community, because previous requests have been ignored.

    I'd be very pleased if you want to help. It’s easy, just send them the message provided below:


    Contact form: http://opensource.samsung.com/reception/receptionSub.do?method=inquiryView

    Inquiry type: Request for Source Codes

    Sample message:
    I’d like to request the most recent Linux kernel source code for the whole Samsung Galaxy Tab 2 Family (P3100, P3110, P3113, P5100, P5110 and P5113). Source code already available on Samsung Opensource is outdated and not up-to-date with Samsung internal source code, which can be proved.

    According to GNU GPL license you are obliged to publish any source code you had changed in Linux kernel, and you are violating law by not publishing it.

    Please, stop pretending that current kernel is up-to-date and just update it. Community have had enough waiting for you to even answer to our requests.
    5
    @Tsjoklat updated the vendor-blob installer-script.
    He found out, that it is not setting the proper permissions on some of the files (for CM11) and patched it.

    Please together, test the "test2" kernel on CM 11 and OmniRom again (SlimKat also, but drain not exist, so not a must to test).
    Flash the updated blobs directly after that.

    I am not sure, how long i'll stay here and support the Tab 2 - maybe i'll drop support soon as i am really k.o. from supporting to much devices and roms.
    It would be great, if we can fix this problem together before i'll leave - else all the hours and days i spend in this commits have been for the a$$.

    For Tab 2 7.0 i got damn less feedback, but i need it also to confirm my patches working and not breaking - so press your thumbs there will be some user who are willing to test and giveing proper feedback.
    5
    Hey guys i am working really hard on an update. Maybe i can upload one today, maybe next days, not sure ;)

    Gesendet von meinem GT-I8190 mit Tapatalk
    5
    For those who don't like Development but need a stable Kernel for Android 4.4 Custom Roms

    3.0.101 Kernel based on latest SlimKat Kernel Source for Tab 2
    - Xpad support (build as module)
    - Boeffla Soundcontroll supported
    - DriveDroid Support (host ISO/IMG files to boot your PC from)
    - Kernel exFAT (1.2.7)
    - LZO compressed Ramdisk
    - updated LZO compression
    - ZIP contains all needed proprietary vendor files.

    -NO FEEDBACK NEEDED-
    https://www.androidfilehost.com/?fid=23622183712468546