[KERNEL] marmite v10.6 final

Search This thread

Oodie

Inactive Recognized Developer
May 6, 2011
1,680
1,940
Kuliyapitiya
Ohh ! Why didn't i see this before .
( Note to myself - i should visit general section time to time )

seems really interesting . Go bedalus :D :D
 

apatal

Senior Member
Feb 27, 2012
3,576
2,066
Manila
Actually thalamus is fine for me to release this! Yay. Thanks thalamus.
Glad to see you guys coming to terms about this. I've been a fan of both your work here and it would have been a shame if development we're discontinued due to this misunderstanding.

I still don't get the marmite reference though. :D

Sent from my Nexus S
 
T

_thalamus

Guest
Actually thalamus is fine for me to release this! Yay. Thanks thalamus.

Links will reappear when the OP is properly organised and credited.

Just for everyone else:

bedalus emailed to apologise and we had a discussion and I said there was no need to remove the links or get the thread locked and that the release wasn't an issue as far as I was concerned, it was just slightly unfortunate the way that it occurred.

I said that everyone makes mistakes and I wasn't making a big deal out of it, I was just stating how I felt.

I also said I was happy to assist if he needed assistance in the future.
 
B

bedalus

Guest
UPDATE: Download link is back up in the OP.

To do: I probably need some sort of naming system to keep track of the versions. Also, I need to push my local version back to the public repo.
 

apatal

Senior Member
Feb 27, 2012
3,576
2,066
Manila
Flashed it this morning and everything seems fine for now. BLN is working great. I'll post more observations later as I take it through its paces and report issues I may encounter. For now, looking good and looking forward to further development! ;)


p.s. Don't you think it's time we move the thread to the NS Development forums as thalamus has already given his blessing for the project? :)
 
B

bedalus

Guest
Flashed it this morning and everything seems fine for now. BLN is working great. I'll post more observations later as I take it through its paces and report issues I may encounter. For now, looking good and looking forward to further development! ;)


p.s. Don't you think it's time we move the thread to the NS Development forums as thalamus has already given his blessing for the project? :)

I suppose it's possible later on. For now this isn't really development. I know enough about code to successfully merge the BLN in, but so far I haven't actually written any code myself. Thanks for testing it out! :) What phone are you on?
 

apatal

Senior Member
Feb 27, 2012
3,576
2,066
Manila
I suppose it's possible later on. For now this isn't really development. I know enough about code to successfully merge the BLN in, but so far I haven't actually written any code myself. Thanks for testing it out! :) What phone are you on?
i9023.
Ran antutu earlier while on performance and got a score of 3110. The bar graph it's slightly lower than Nexus S but so far, I haven't noticed any real negative manifestation of this supposedly low scoring setup.

I did get a random reboot earlier but I'm hoping it's just a glitch, something that it needed to get out of its system, and that everything will be smooth sailing from now on.

I'm on the latest rascream, btw, with brains master's tweaks.

Sent from my Nexus S
 
B

bedalus

Guest
i9023.
Ran antutu earlier while on performance and got a score of 3110. The bar graph it's slightly lower than Nexus S but so far, I haven't noticed any real negative manifestation of this supposedly low scoring setup.

I did get a random reboot earlier but I'm hoping it's just a glitch, something that it needed to get out of its system, and that everything will be smooth sailing from now on.

I'm on the latest rascream, btw, with brains master's tweaks.

Sent from my Nexus S

Cool. Keep an eye on those reboots. I remember many people blamed BLN for instability. These claims were never substantiated so there's just as much chance it was purely random. Remember my version of the kernel updating script does not wipe cache or dalvic-cache, so that might be the first thing to try if you have problems.

As for performance, I'll do a statistical comparison between this and thalamus' original version.

UPDATE: New version available with voodoo-color (and sound was there already!) :D
 
T

_thalamus

Guest
[snipped]
I did get a random reboot earlier but I'm hoping it's just a glitch, something that it needed to get out of its system, and that everything will be smooth sailing from now on.

If you post the output of cat /proc/last_kmsg I'll take a look and see what caused it.
 
B

bedalus

Guest
UPDATE: Added BLX

Decided I can't live without it.

For some people it's a cosmetic mod that allows the battery to show 100%

For me, I set it to 90% to stop the charging process early. This is more like the intended use, which is to extend the lifetime of the battery unit itself by stopping the charge process long before the battery starts to struggle with taking on extra charge.

I'm going to see if I can live without touchwake by setting my screen timeout to five minutes. I always click my power button to sleep the screen anyway, so having a longer screen timeout should solve the problem of unwanted sleeping.
 

mixtapes08

Senior Member
Sep 23, 2011
3,755
1,743
Quezon City
OnePlus 6
Google Pixel 4 XL
UPDATE: Added BLX

Decided I can't live without it.

For some people it's a cosmetic mod that allows the battery to show 100%

For me, I set it to 90% to stop the charging process early. This is more like the intended use, which is to extend the lifetime of the battery unit itself by stopping the charge process long before the battery starts to struggle with taking on extra charge.

I'm going to see if I can live without touchwake by setting my screen timeout to five minutes. I always click my power button to sleep the screen anyway, so having a longer screen timeout should solve the problem of unwanted sleeping.

Add bld too :)

Sent from my Nexus S®
 
B

bedalus

Guest
Add bld too :)

Sent from my Nexus S®

Ah yes, my once again sleep deprived mind. You know what? I don't miss BLD. In fact after a year of using it by habit, you would think that I would notice my buttons still illuminated, but i was using my phone for hours quite happily before i realised... I'm going to continue living without it and be happy.
 

mixtapes08

Senior Member
Sep 23, 2011
3,755
1,743
Quezon City
OnePlus 6
Google Pixel 4 XL
Ah yes, my once again sleep deprived mind. You know what? I don't miss BLD. In fact after a year of using it by habit, you would think that I would notice my buttons still illuminated, but i was using my phone for hours quite happily before i realised... I'm going to continue living without it and be happy.

I think its prety good when watching movies. Bld is 1 of my favorit3 kernel mods implemented on ns. Anyway goodluck with this bro just let me know if you need another tester :)

Sent from my Nexus S®
 

wmdunn

Senior Member
Jul 7, 2007
848
206
South Dakota
Google Pixel 5
Cool. Keep an eye on those reboots. I remember many people blamed BLN for instability. These claims were never substantiated so there's just as much chance it was purely random. Remember my version of the kernel updating script does not wipe cache or dalvic-cache, so that might be the first thing to try if you have problems.

As for performance, I'll do a statistical comparison between this and thalamus' original version.

UPDATE: New version available with voodoo-color (and sound was there already!) :D

Thank you for adding voodoo color!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 53
    Hi Erythnul, thank you for your info. Like many others here, I'm very interested in prolonging my Nexus S batt life. I'm on Marmite 4.83 now and running BetterBatteryStats on latest MIUI US JB rom. I couldn't find the advanced root functions you're referring to. Is this in the BetterBatteryStats app?

    If you don't mind, maybe write a short tutorial on how to use the BetterBatteryStats tool to troubleshoot our battery woes. That'll help us out a lot. Thanks kindly. ;)
    Sorry it took me a while to respond, we were having festivities as my sister gave birth almost 2 weeks early. A new nephew! :D

    Bedalus, if you feel this post should be in its own thread instead of in here, let me know and I'll move it asap.

    Anyway, I wrote up a tutorial with pictures for everyone on BetterBatteryStats and analysing battery drain. And also just a little bit to show off my battery life after what I feel is a day's normal use. It's a full cycle, usually I'd charge the battery somewhere in the middle of this, to keep it from degrading sooner than it should. The tutorial will basically be a description of how I'd go about analysing any problems I'd have with battery life, from basic to advanced.

    Before I begin, a quick disclaimer: I'm running ParanoidAndroid 2.13 on Marmite 4.5, I haven't had time to update either lately, and it's not the most battery-friendly combination I've ever used. I'm still getting great battery life, but it could probably be a little bit better. Won't matter that much though. Also, your mileage may vary depending on many factors, mostly your usage pattern, but also screen type. I have an i9023 Nexus S. It's an LCD screen, not super AMOLED, so I don't know how much/little battery they drain compared to the LCD. Using a black or mostly dark background will help for those screens. On LCD screens, this doesn't matter, only brightness level matters.
    I will be keeping it simple, as I am not a programmer and started out knowing as much as anyone else about all this. All this information I slowly gathered from these forums, personal experience and some Google searches. I may be wrong on some things (though I got most of it right) and take no responsibility for any problems, though none should occur.

    So, you're having battery trouble?

    First off, lets get the basics out of the way. My setup at the moment is this:
    As mentioned, PA 2.13 and Marmite 4.5 on an i9023. I never charge my battery above 90% (using BLX). I run no battery saving apps such as Juice Defender or similar things. Never overclock, never undervolt. BLD at 1.5 seconds. I keep my brightness at the lowest unless I don't have any other choice, wifi and data always on (disregarding exceptions). GPS and location services are on, but location reporting (Latitude inside Google Maps) and Google Now are usually on, but for the purposes of this tutorial, they were off (Battery drain impact: ~30-45 minutes of awake time spread over 24 hours.). Turning GPS and Location Services off will save you some more battery and awake time, for this cycle I forgot to turn them off.

    High drain problems.

    I feel that any Nexus S user should be able to get at least 3 hours of screen on time and still have battery left to sleep for ~17 hours, on a full cycle. This means 20 hours of effective use, or 4-4.5 hours of constant use off the charger. If a phone is idling well, it should use barely any battery at all, and only wake up when absolutely necessary. For me, the best way to analyse what processes are keeping my phone awake has been BetterBatteryStats. I will be assuming that it's installed and set up. Easy enough to get, it's on the Play Store (support the dev! :)) or free here on XDA, just a search away.

    To start analysing, first install and set up BBS (if you haven't done so already). BBS is not a very intuitive app, as it assumes that you know more than most people do about the internal processes and workings of the phone. Setting it up is easy enough though, and I won't be going into the details too much. Some of it I know, some of it I'm not too familiar with and I prefer to keep this outside of the realm of speculation. After installing BBS, start it up and hit the menu button to get to the Settings. Scroll down and tap on Advanced, then turn on the Root Features. This will allow BBS to read network usage from apps (not very critical, but nifty) and dump the Alarms sent by the system and apps (useful, but complex). After this, you'll be prompted by SuperUser or SuperSU to grant it access, and you're good to go. Fully charge your phone and start a new cycle. Use your phone as little as possible and do not reboot it or charge it in between. When the battery gets to ~50%, you'll be (more than) ready to find out where the problem is. You can also use your phone as usual, but this will cause the stats to be less easily interpreted, as your usage will also keep the device awake.

    Why shouldn't I reboot or charge?

    BBS will automatically create a reference point when your phone is unplugged from the charger, and will be ready to read the records on a moments notice. This valuable information is lost when the phone is rebooted, and recharging will reset the reference point. For an accurate analysis, please try to avoid this :)

    On to business.

    Now, the real task is going to begin, analysing the stats. Here's a link to an imgur album, with screenshots of my stats and battery life. I'm trying to use all of the pictures and make this tutorial look nice, but this is one of the longest posts I've ever written here, so for reference, this is all of them.

    First off, check your normal battery stats screen, and the deeper stats (tap the graph).

    WIpGm.png
    ObM2X.png

    gH55i.png
    SGplM.png


    These are my stats. Almost 20 hours on the clock, 14% remaining. ~3,5 hours screen on time and ~40 minutes of music. Not too bad (especially considering I started on 90% :)). You can see there's some awake time. Part of that is music, part of it is Google Services (Location Services, Syncing) being annoying. The drain from Services is pretty minimal though, as you can see from the graph. The straight parts would probably have been somewhat straighter if it hadn't been syncing.

    If your Nexus doesn't get these kind of times, something may be wrong. If it's a hardware problem, unfortunately I can't help you, but if it's software related (faulty kernel, troublesome app, buggy ROM), it's easy to track and fix. Let's fire up BBS.

    5rSzh.png


    You'll be greeted by this screen. Compare Deep Sleep times and Awake times to your screen on time from the previous pictures. (My total awake time was ~4.5 hours, 3.5 hours screen on time, ~30-35 mins music while screen was off, ~20-30 mins Google services.) If your device isn't sleeping properly, your Awake time should be significantly higher than your Screen On Time+Time media played (or +whatever other things you consciously keep the device awake for). Deep Sleep will be significantly lower, if present at all.

    Switch to kernel wakelocks.
    If something is seriously messing up, this is where you'll see it first:

    EEHTR.png


    In my picture, all is well with the world. No unseemly wakelocks here. PowerManagerService is basically a name for all the userspace processes keeping a Wakelock, these are shown in the next part of BBS, Partial wakelocks.
    If you see any large wakelock spikes in Kernel Wakelocks, either tap the (?) next to it (if it's there, not all problems have been indexed by the dev of BBS) or Google it. Or ask me, and I'll either know or Google it and speculate for you ;)

    Reading these stats may seem complicated, but it's not all that hard. Most important are the total time and the count (cnt). This shows how many times the device is awakened by the specified service and how long it's kept the device awake.

    Some of the problems that occur here are truly complex, and may be caused by too many things to go into here. Two quick examples from personal experience:
    • My internal SD had a corrupted block, Android kept trying to read it (I didn't know this, but noticed high drain). mmc_detect1 wakelock kept showing up. I didn't know what to do with it, Googled around, found it had to do with mounting, had Windows check the filesystem (and repair it) and remounted the SD. Problem solved, no more wakelocks next cycle.
    • After upgrading to JellyBean, one of my usual apps was causing a buffer overflow in the audio interface whenever it tried to gather environmental noise from the microphone. High drain occurred with no identifiable source, the app didn't show the drain because the overflow happened inside the kernel. I can't remember the name of the wakelock, and I had to do to some deeper digging to get to the root of it, but it was here and if I'd Googled sooner I would've known without resorting to more drastic measures to test my device's idling (Using DDMS from the SDK, a tutorial for some other time, if this doesn't help).

    On to Partial Wakelocks:

    oUViY.png


    These are all the user processes asking for time. In my case, obviously, music is the lead contender here.
    Again, Google Services kept it awake quite some time, but spread very thinly. 1160 wakeups spread over 19 mins and 1550 wakeups spread over 9 mins. All of this amounts to negligible amounts of constant awake time, and can usually be disregarded.
    Once again, if there are any unusual spikes, investigate further.

    I seem to have forgotten to take pictures of the other screens of BBS, but these 3 are the most important anyway.
    Alarms can tell you which app is sending most of the wakeup messages, which is really useful and I wish I had that screenshot, but I don't. :/
    Network Stats is kind of self-explanatory, as is CPU states.
    Process is a screen I know practically nothing about, but if I remember correctly it shows how much CPU time some processes requested. I recently charged so my stats are kind of empty now, so I can't check :/

    Concluding

    Okay, so this tutorial wasn't as good as I wanted it to be because I have no battery problems at the moment. I will be happy to interpret anyone's battery graphs/BBS stats, however, so hopefully that makes up for it a bit.
    Also, hopefully I've at least shown how to work BBS and interpret the basics. Any questions/screenshots can be sent to me by PM. (Or if you reply, please don't quote this entire post :p)

    Thanks to Articudos, here is a link to the thread where I learned a lot of what I know about wakelocks back when it was first posted, this knowledge is invaluable if you really want to delve deeply into the system. It's much more detailed and accurate than my attempt at a tutorial here, so I fully recommend reading it, it's practically guaranteed to solve your wakelock problems.

    [GUIDE] The Total Newb's Guide to Wakelocks

    Also, please let me know what you think about the tutorial and if I can improve it somehow, it probably needs work. Thanks for reading and good luck!
    17
    I know I said I was taking a break from building, but...

    v6.6 is here: http://goo.gl/HvUrp

    -Merged to Linux mainline v3.0.50
    -Fixed the GPU code.

    In the PLL check that I created for v6.5 I somehow accidentally changed a different check. Sorting out this GPU OC at 1.1GHz has been a real chore, so again, I'm taking some time off building, but I couldn't leave the version matrix with an error dangling at the top. Enjoy! :D

    So now I think the time has come to thank you bedalus:

    For your energy you always take in this development.
    For your unbelievable patience.
    For your sleepless nights that you spend with and for us.
    For your will to give your best... and correct any little mistake soon as possible.
    For your friendly answering of stupid questions.
    This is what make our community make what it is.
    Maybe it sounds gay but its the truth.
    And I hope the most agree with me...
    Thanks a lot man.
    S.R.
    15
    Overclock! Undervolt! OC UV OC UV...

    Shut up!!

    Hello ex-colleagues, please have a good read here. I quote this from DorimanX from SGSII Kernel Dev. (Yes for those who know, I was a Nexus S user) Basically he had a talk with a chip developer whom has watched his thread and decided to say something that, most if not all of us, are confused and very deficient in knowledge - OverClocking/Undervolting. Visit his post here and please thank him for sharing.

    I bring here of what you can expect. Dear Bedalus, you might want to add this to OP for educating adamant humans on OC, UV...
    Gist of it? What may be true for one may not be true for all!


    Quoted from DorimanX

    This is long INFO post from real chip designer that help to create CPU/GPU and other chips for the living for 14 years now, so respect

    He sent me PM, for now he cant post that by him self.

    Vikas is monitoring our thread and want to say his professional stand about UV/OV and why it's works for some and why not for others.

    ==================
    I am calling Vikas(vikas.mishra) to the speech stand


    Hello people.

    Let me introduce myself - my name is Vikas Mishra and I am a chip designer by profession. .
    I have worked on critical parts of design of TI OMAP4, OMAP5, Nvidia Tegra 3 etc and have been doing this for the last 14 years.
    Of late - I have seen a lot of folks posting BUGS about undervolting of the GPU/CPU.
    I think I can explain what are the possible issues with undervolting/overclocking in a laymans language.

    It is a little long winded but I think the length is needed for providing the appropriate context.

    * What is inside your Cellphone

    Your cellphone is an amazing device. It is a full fledged computer
    that fits into your pocket. They have all the standard components
    that a computer has - except that they are all usually soldered on
    the motherboard directly and are not meant to be user-servicable.

    The chief components inside your cellphone are
    1. Application Processor (AP)- this is the heart of a modern
    cellphone. These are manufactured by many companies - the main
    ones are Qualcomm, Nvidia, Samsung and Apple. The other not so
    well known ones are made by Texas Instruments, ST Ericsson,
    Marvell and Broadcom.

    A modern AP has logic to control the camera and process the image
    that it generates, to do video encoding (video recording) and
    video decoding (movie watching), Audio processor etc. in addition
    to the well known CPU and GPU.

    2. Power Management Controller - This is the chip that is
    responsible for generating and regulating the voltages that are
    used by all the components on the board.

    3. DRAM - not very different from the DRAM found on a PC (except
    that it is lower voltage)

    4. Flash - for storage

    5. Touchscreen controller

    6. Logic for microphone, speaker

    7. Battery

    One of the most complex piece of circuitry on the phone is the AP
    and the power management controller.


    * Circuit Basics

    A modern AP has millions of circuit units called (Flip
    Flops). These flip flops have two parameters associated with them
    called Setup time and Hold time. More details on what a flip flop
    can be found on the wikipedia at
    http://en.wikipedia.org/wiki/Flip-flop_(electronics) . This is a
    nice bit of bedside reading if you are interested.

    A setup time roughly indicates what frequency you can run a design
    or an AP at before it becomes unstable.

    A hold time roughly indicates the maximum voltage till which a
    design is stable.

    A fully technical analysis of what is involved in these timing
    parameters requires a degree in electrical engineering but in broad
    terms the problem is described below.

    Chip designers diligently ensure that all of the millions of the
    flip flops in a chip meet the setup and hold time across a broad
    range of voltages and silicon parameters. They do a pessimistic
    analysis to ensure that a chip will run reliably across a wide
    range of voltage/frequency combinations.

    However, contrary to the popular belief, chips vary widely in their
    silicon parameters. Even chips on a the same wafer and different
    flip-flops within the same chip can have widely different silicon
    parameters. This is why what works on one particular chip will not
    work on the other chip.

    Your silicon manufacturer provides a range of voltages and
    frequencies across which the device can work reliably. The phone
    manufacturer will further narrow down the range depending on the
    other components they choose within the phone board.

    * How does voltage affect the design

    Reducing voltage makes the design slower and increasing voltage
    makes the design faster.

    So can I keep on increasing the voltage for ever and make the
    circuit faster and faster. The answer is no - a point will come when
    the circuit will become unreliable. This becomes unreliable because
    the "hold time" of one or more of the flops will start
    violating.

    As you reduce the voltage of the design, the circuit will start
    becoming slower. However typically it will continue to work till at
    apoint it starts failing - this failure occurs due to violation of
    "setup time" of one or more flops in the design.

    So what happens when the setup time or the hold time of a design
    fails - the answer is that it is unpredictable. Meaning suddenly if
    you ask the processor what is the value of 2+2, the answer it will
    provide could be unreliable - in some cases it could be 3, in some
    cases it could be 4 in some cases it could be -2349783297 (a random number).

    I am of course oversimplifying but I hope you get the picture.

    * How does undervolting affect your phone processor

    The reason undervolting is so appealing to people because they
    thing that undervolting will save power and improve battery
    life. While this is true in theory, in practice there is a caveat.

    It will reduce the power of the chip, but the power consumed by the
    phone as a whole will not improve. In some cases in fact it can
    deteriorate. Let me explain.

    The most power hungry part in the phone is not the AP - it is the
    LCD screen. All of these screens consume a ton of power. So even
    though your AP is now consuming lesser power, the overall impact to
    the phone as a whole is not that much.

    If you accompany undervolting with a frequency reduction (which you
    should), the total time taken for doing a web page rendering (for
    example) would increase. During this time the screen is on and it
    has more than compensated for the power that you saved in the
    AP.

    You could of course come up with examples where this wouldn't
    happen - but on a whole, IMHO, you should leave the voltage of the
    AP/GPU/CPU to the guys who know the system best - the guys who
    designed the chip and people who manufactured it.

    * How does overvolting/overclocking affect your phone processor

    If you want that last drop of performance from your phone and you
    over clock it, at a point some of the design flops will start
    violating the hold time and the design will stop working reliably.

    Again, in some anecdotal cases this would work - but this is not a
    reliable means/mode of working. Just because your friend's or your
    first cousin's girlfriend's phone works - doesn't mean yours will
    work as well.

    * What are the user observable impacts of undervolting/overclocking?

    It is hard to say - simply because there are so many of flops in
    the design.

    In some cases - you wouldn't see anything wrong with the phone
    until one day you do. In some cases it will result in a SOD
    immediately. In some cases it will result in your phone not waking
    up reliably.

    IMHO the risks of issues with undervolting/overclocking far
    outweighthe potential gains you may get out of it. Usually there
    is no lasting damage to the phone/AP if you overlock/undervolt but
    it is possible to do it. For example, You run the phone at such a
    high frequency that the chip temperature becomes more than what it
    was designed for and the Silicon just fails.

    So "Just say No" . Don't overclock or undervolt your phone -
    leave it to the guys who really understand what they are doing.

    Thanks,
    Vikas
    13
    Merry Christmas to Bedalus, guys and girls on this thread, and whole xda community. Enjoy with familly and in gifts. ;) :beer:

    Sent from SpeedMachine i9100
    13
    MTP also work with MIUI

    bedalus, the great
    I have tried you V1 kernel on MIUIandroid ver 2.7.13 and gladly report that MTP work on Windows XP!!!

    As MIUI don't have option in Setting>Storage>xxxxx ; here's my trial:

    1.from Play store search and download "USB mode switch for SGS1 on CM" (need root)
    2.Open and select "change to MTP" pop up will ask for reboot then reboot
    3.after reboot plugin USB cable and MTP would be found but driver won't install
    4.Disable "USB debugging" then MTP driver automaticly installed