Showing posts with label killing. Show all posts
Showing posts with label killing. Show all posts

Monday, 1 August 2016

Nova Launcher killing the battery! Help!



Hi Guys,

I have been using MI5 for over a month now and have noticed recently that there has been a real rapid battery drain on my phone even though on idle mode. And to my surprise, the top battery consumer is Nova Launcher. Now this is happening just since last week. There has been quite a time since I have been using Nova Prime (even on my earlier phones) and never has such bug been spotted.

Is there anyone else who has faced similar issue? If so, can someone help me with the solution?

(P.S. The app is not updated or something, I have tried clearing cache / data, even tried uninstalling-reinstalling).

Please help since Nova is my daily driver.

Thanks,
APA



Saturday, 23 July 2016

Stopping UT from killing apps



I finally found a way to not have my apps killed all the time!

I am using a device with 2 GB of ram (Nexus 7 2013) and I experienced frequently that apps are killed. Quite often it gets so bad that it's impossible to have both dekko and the browser open at the same time. It always felt like it was an out of memory situation. Today I stumbled over this remark of ShadowEO on his github page to configure the lowmemorykiller. In my experience, I need two other tweaks in addition. So in total I did the following three things:
  1. Increase the swappiness
    Checking with

    Code:


    dstat --top-oom --top-mem --vmstat -s 30

    and

    Code:


    tail -f /var/log/syslog  | grep sigkill

    I see which app the out-of-memory killer (oom) considers for killing and I see when that app is being killed. Also, I see that even though there is swap space available, it isn't being used. In order to make the system actually use the available swap space I increased the swappiness from 0 to 70:

    Code:


    cat /proc/sys/vm/swappiness
    0
    echo 70 | sudo tee /proc/sys/vm/swappiness



  2. Increase swapspace
    Now the swap is being used, but it doesn't seem to make a whole lot of a difference with the killing, so I increase the size of the swapspace.
    Out of the box, if I remember it correctly, I only had 32 MB of swap:

    Code:


    swapon -s

    The swap file being /userdata/SWAP.img. I increased it to 2 GB following these tips:

    Code:


    sudo swapoff /userdata/SWAP.img
    sudo rm /userdata/SWAP.img
    sudo fallocate -l 2g /userdata/SWAP.img
    sudo chmod 0600 /userdata/SWAP.img
    sudo swapon /userdata/SWAP.img



  3. Configure the lowmemorykiller
    Now a little more of the swap is being used, but it still doesn't stop the killing. Seems on Android there is something called lowmemorykiller, which on my Nexus 7 had this original configuration:

    Code:


    cat /sys/module/lowmemorykiller/parameters/minfree
    1536,2048,4096,16384


    Where 16384 pages (4k each) corresponds to 16384*4/1024 = 64 MB. So, seems that once the free memory drops below 64MB, the killing starts. Inspired by ShadowEO's tip, I set it:

    Code:


    echo "1536,2048,4096,5120,10240,15360" | sudo tee /sys/module/lowmemorykiller/parameters/minfree

    which corresponds to 20 instead of 64 MB. (I also set the last two levels to 40 and 60 MB - don't know whether that is needed.)


With all three things in place, I can now have the browser, dekko, podbird, filemanager, unav, uradio playing music, terminal and gedit and libreoffice writer running from libertine all open at the same time. I'm almost running out of apps that I care to run in addition :)

At times there was some stuttering, but of course nobody forces you to have so many apps open at the same time. However, now you can choose what you want to close to relieve the memory pressure :) Swappiness and lowmemorykiller I need to repeat after every reboot. Need to find a solution to persist this.

I'd be curious to hear whether/how this works for other people!



Monday, 4 July 2016

Updated Google Play Services killing my phone(s)



I'm running stock AT&T 4.0.4 ROM, rooted with CWM. Google Play Services just updated to version 9.2.56 (034-124593566), and it's sucking my battery dry and making the phone run hot. I have a spare phone and brought it online, and the same thing happened as soon as Google Play Services updated. It is running anywhere from 50% to 80% of my battery when the screen is below 10%. Yep, it's using more than 10x what the screen requires. Battery that used to last 18 hours now lasts 2 to 3. Others have posted similar comments in the Play Store (like that's going to do any good). Common theme is it's older OSes.

I have tried disabling everything and it doesn't do any good. Too many things break if Google Play Services is removed. Going back to an old version is futile -- it self-updates within minutes. I tried GServiceFix and it works for few minutes, then the usage creeps up again.

I sent Google an email, but I expect nothing less than the run-around. So, I turn to XDA Developers.

First, is anyone else here still running stock, and did the same thing happen to you? How about on other ROMs (please specify)? Did you find a fix?

Assuming Google will do little to help, I need to do something to make my phone work right. So if there is a ROM where this is not a problem, I guess it's time to jump in. Problem is, some of the links in this forum are broken. I've found (or already had) most of what I think I need except a version or EFS Professional that works on our phone. I can find no working links to an older version that will do the job. I do have a Nandroid backup (also stored on my NAS), which I believe can restore the EFS, but I'd like to get just the EFS in case I need to load it to the system after flashing. None of the tools available in the Play Store seem to work on the Glide -- I end up with an empty backup directory.

My plan, assuming there is a Jellybean ROM without this issue, is to flash twrp-2.8.4-flashable.zip, since I understand TWRP is required for JB, then do another Nandroid backup with it, then flash whichever ROM is suggested to get over this. I've looked at Bubor's CM10.2, and it looks like it will fill my needs unless it also suffers this problem. If there is a reason I should update the Kernel, please let me know. I have not seen anything that makes me believe I need to.

Man, I wish one of the manufacturers would come out with a similarly sized new phone with a slide-out keyboard and AT&T compatible. I'd gladly upgrade, but there is nothing out there that meets my needs. Samsung S5 mini with slider -- I'm in.