Sudden power off when battery is less than 50 percent
Hi community,
I would be very glad to get some help for the problem below. Or maybe you can guide me how to provide more information to investigate it.
Problem
The phone sometimes powers itself off abruptly which can lead to database corruption. So it is very annoying...
However, it only seems to occur in some cases:
It happens as soon as battery is below 50% (this is not exact, but pretty close)
It only happens when the screen is off. May happen after 30 sec to 5 min.
It never happens when a USB cable is connected (power-only or computer)
It does not seem to happen when a "background task" is running
In some rare cases, it does not happen at all, or maybe just has not happened for a longer period of time. I could not determine what is different about the state of the phone then. When I turn the screen on once, and off again, the chances are high that it will power off very soon!
By "background task" I mean something like playing music, but I can not exactly define it. It can stay on like for one hour without any problems (screen turned off). It also stays on when, for instance, the timer is running and the screen is on.
So it does not seem to be a problem of the battery...
ROMs
I tried the following ROMs, all with the same issue. When switching ROMs, I always wiped system, data, cache, dalvik-cache. Never flashed another Zip on top (like Gapps). The device is unlocked using the official procedure by HTC.
Two official versions of cm12.1
A BlissPop v3.9 earlier build than below
BlissPop-v3.9-m8-OFFICIAL-20150827-0154 (currently running)
SkyBliss-v3.2.1-m8 (fantastic ROM, btw!)
Stock v4.19.111.2 + OTA to v4.19.111.3
More details of stock:
Relocked and flashed the Firmware v4.19.111.2 (Android File Host fid=95916177934521492)
Unlocked, flashed TWRP, then Stock v4.19.111.2 (Android File Host fid=95916177934527598)
Relocked and receive OTA v4.19.111.3
Debug
Below is a Logcat session. The numbers are line numbers. Of cource, they are not relevant, but they put things into perspective.
1163: I/PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
1371: I/PowerManagerService: Dozing...
1389-1466, 5 times occured: E/libsuspend: Error writing to /sys/power/state: Device or resource busy
1467: I/PowerManagerService: Waking up from dozing (uid 1000)... (I pressed the power button to see, if it is still alive)
...
2743: I/PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
2931: I/PowerManagerService: Dozing...
2942, once: E/libsuspend: Error writing to /sys/power/state: Device or resource busy
2959: The phone is dead
There are also a log of those lines when the screen is off:
I/qdhwcomposer: handle_blank_event: dpy:1 panel power state: 0
(dpy:0/1 changing a lot)
Troubleshooting
I changed the CPU governor in my current BlissPop ROM: was Lionheart, tried Ondemand, Intellidemand, and Interactive. Subjectively, it slightly reduced the amount of battery percentage when the problem begins to occur. However, the problem persists and I did not take note of the battery charge.
Left default setting for "power safer".
???
What can I do about it?
Are there any tools to investigate the problem in more detail?
Does anyone have the same problem?
Thanks a lot,
Adi
Added Debug section
Related
Hello,
Facing this issue a number of times per week.
The phone was fully charged and kept as it is. Saw the charge left as 95%. After few hours of no activity on the phone, I try to unlock and find that it has switched off. Power button press won't start the phone. Had to take out the battery and put it back and then on power button press, phone starts.
Checked the battery level and found that there was a vertical dip of battery level from 84% to 0 and it was like that - till i booted the phone again.
After boot, again the battery level shows at 83%!
This sudden drain of battery to 0 although when phone was sufficient amount of charge has been happening quite a number of times.
Please see this screenshot. Is this due to a bad battery or my phone is "dying"!
Please help and let me know if any more information is required.
royzlife said:
Hello,
Facing this issue a number of times per week.
The phone was fully charged and kept as it is. Saw the charge left as 95%. After few hours of no activity on the phone, I try to unlock and find that it has switched off. Power button press won't start the phone. Had to take out the battery and put it back and then on power button press, phone starts.
Checked the battery level and found that there was a vertical dip of battery level from 84% to 0 and it was like that - till i booted the phone again.
After boot, again the battery level shows at 83%!
This sudden drain of battery to 0 although when phone was sufficient amount of charge has been happening quite a number of times.
Please see this screenshot. Is this due to a bad battery or my phone is "dying"!
Please help and let me know if any more information is required.
Click to expand...
Click to collapse
I also had the same problem. In order to avoid it I am forced to reboot it on my own! Even I am working on my phone it is shutting down. This happened from the first takju update to 4.2. when I was in yakzu for previous versions I had no problem. If anyone has any idea please let us know.
Thanks in advance...
There have been multiple reports of the phone crashing which is likely causing your battery drain, its not randomly shutting down, its just unresponsive but using more power than if it were running normally.
Darunion said:
There have been multiple reports of the phone crashing which is likely causing your battery drain, its not randomly shutting down, its just unresponsive but using more power than if it were running normally.
Click to expand...
Click to collapse
What do you suggest to do? Have anyone found any solution. Some people suggest a "reset to factory". Will it fix anything?
TheLiTTle said:
What do you suggest to do? Have anyone found any solution. Some people suggest a "reset to factory". Will it fix anything?
Click to expand...
Click to collapse
Hi,
Only one solution I have found to the problem - are you using any app which is using Google Location service?
I was using HD Widgets - uninstalled and found that the problem was gone.
Then found at HD widgets page in Play store, that the problem was with Google location service itself and not any specific app - HD widgets since then, have released a new version compatible to 4.2.1 and there haven't been crash reported.
Now I have disabled the setting of letting an app use Google Location service - that way , no random shutdown, no instant battery drain for me till now.
Additionally you can install Franco kernel on your rooted Nexus - it doesn't have any Sleep of Death issue (unresponsive lock screen).
Hello,
I'm currently running the lastest (150118) release of mokee, and my phone can't seem to enter deep sleep. In BBS, the event0 and event2 wakelocks take up nearly 50% of the device on time, and I get an average of a few seconds of deep sleep time, resulting in terrible battery life. Attached are the BBS screenshots.
I did some research and figured out that event0 and event2 are the events from the touchscreen and hardware buttons, but I'm not sure how this would affect the battery levels especially when the screen is off.
Any help is appreciated.
Thanks in advance!
it's not, it's a wifi issue, and most likely an issue with your router. it seems that with some routers produce some weird signals with your phone, and leads a rogue app to constantly try and use your wifi whilst you're in deep sleep.
Is this supposed to happen even while my WiFi is off? It seems that no matter where I go, the phone just won't enter deep sleep and seems to drain more battery locked and off than unlocked. I've tried switching to nameless 4.4 and it is giving me the same problem, which doesn't seem right.
Sent from my Find7 using XDA Free mobile app
The nature of eventN wakelocks is that they almost NEVER actually hold the device awake for very long.
They're a symptom, not a cause - when the system resumes, they hold a wakelock from the time the kernel resumes, up to the time when the frameworks wake up and process the event (which in the case of a resume is, if I recall correctly, pretty much a null event.)
So if you have high eventN wakelocks - something is causing your system to suspend-thrash.
In older kernels, there was a "suspend_backoff" driver to handle this case, and at least hint as to the nature of the problem. I reimplemented the backoff functionality in Omni's kernel to help debug such an issue. (Way back last spring, there was a bug in the battery/charger management driver that would cause a stuck interrupt to prevent suspend. The device would try to suspend, error and abort, then resume, then immediately try again, over and over and over again. You could actually SAVE power by holding a wakelock to prevent the thrashing.)
You'll probably need to look through dmesg to figure out why your device is suspendthrashing.
Hi Entropy!
I've gone through and attached a dmesg.
I'm not particularly sure how to interpret this, but instead of trying to suspend and abort, it seems as if the device is continuously suspending for 0 seconds and waking up. I'm not quite sure why.
Could you take a look? If you need anything else to figure this out I'd be happy to provide it.
Thanks!
Hi there,
I've got a little problem with my phone recently. It keeps freezing/shutting down every time the battery life hits about 30%. The button light starts to flicker, music begins to stutter and then - a few seconds later - my device turns of or just freezes leaving the screen turned on. When I reboot my phone the battery life drops to 0% or remains at about 30%, that differs from time to time.
I tried everything, installing 4.4.4 and 5.0.2 CM, with and without apps installed, with and without gapps. All constellations result in the same behaviour. I just can't figure out what the problem is. I pulled two logcats (4.4.4 and 5.0.3) and attached them to this post. I begin to believe that it is a hardware related (battery) problem, but perhaps somebody can find something in the logcats, that I've overseen.
Thank you very much in advance!
Hello,
My phone began to get hot since 1 week and the battery drains very quickly. I investigated and found out that it's the ksm deamon that is causing that (30% + cpu usage all time). The ksm deamon scans all the memory at an interval to do things with it... It is a normal linux process but :
The problem is that the interval is set to 20ms ! And that the run value is at 1. The files are here : /sys/kernel/mm/ksm/run
I changed run from 1 to 0 with the terminal emulator, it fixes the problem, but then it goes back to 1 after some minutes. Same for the interval, I set it manually to 10000000000000000000 and then it goes back to 20.
It's like there's a virus changing the value or something like that.
Help me please, I can't use my phone anymore, it lags, gets hot and the battery drains very quickly :crying:
Thanks.
I'm having the same damn problem on my oneplus. It get's so hot it causes the touchpad to stop working and the phone becomes unresponsive and I have to force shutdown. Did you find a solution to this problem? I might try a custom ROM on here, I didn't have this problem with my last oneplus so not sure if it was a recent kernel update to CM11 that did this or what.
skini26 said:
Hello,
My phone began to get hot since 1 week and the battery drains very quickly. I investigated and found out that it's the ksm deamon that is causing that (30% + cpu usage all time). The ksm deamon scans all the memory at an interval to do things with it... It is a normal linux process but :
The problem is that the interval is set to 20ms ! And that the run value is at 1. The files are here : /sys/kernel/mm/ksm/run
I changed run from 1 to 0 with the terminal emulator, it fixes the problem, but then it goes back to 1 after some minutes. Same for the interval, I set it manually to 10000000000000000000 and then it goes back to 20.
It's like there's a virus changing the value or something like that.
Help me please, I can't use my phone anymore, it lags, gets hot and the battery drains very quickly :crying:
Thanks.
Click to expand...
Click to collapse
into_311 said:
I'm having the same damn problem on my oneplus. It get's so hot it causes the touchpad to stop working and the phone becomes unresponsive and I have to force shutdown. Did you find a solution to this problem? I might try a custom ROM on here, I didn't have this problem with my last oneplus so not sure if it was a recent kernel update to CM11 that did this or what.
Click to expand...
Click to collapse
I kept disabling it manually with the terminal and was monitoring my phone with a process manager. Then it stopped by itself I don't know how....
But it may come back one day I really don't know why, I didn't even uninstalled an application. This is very weird and it's a core functionnality of linux, why is it designed like that ?
skini26 said:
I kept disabling it manually with the terminal and was monitoring my phone with a process manager. Then it stopped by itself I don't know how....
But it may come back one day I really don't know why, I didn't even uninstalled an application. This is very weird and it's a core functionnality of linux, why is it designed like that ?
Click to expand...
Click to collapse
I've noticed KSMD only pegs out like crazy on my phone when it's active. While the phone is asleep it does nothing.
I can tell it's not at all related to running the TOP process either to monitor things because if you do a ps -ef --sort +time, you can see KSMD process constantly climbing a few seconds of a time of CPU use the longer your phone uptime\Screen-on-time goes on. It's not growing at a massive rate, but like 1 second of CPU time for every 30 seconds of screen on time.
I did a little digging and apparently this is an issue on many Linux distributions and is generally seen as a bug from the user community(unsure how the dev community feels about it, but it's pretty old.. you'd think they would address it by now). It's possible that the Gamma kernel is based on a Linux kernel distro that has that bug in it.
Long story short, I have been experiencing a severe battery drain with any ROM I try for the last month or so. Some ROMs seemed not to have it until first reboot, then the drain showed up.
Installing BetterBatteryStats showed me there was a "fingerprint wakelock" active 100% of the time. This was a bit strange, because my fingerprint sensor doesn't even work most of the time (sometimes it works after installing a ROM, sometimes after a few reboots, but it always stops working eventually for no apparent reason).
But searching around, I came across this page, where the following step is suggested:
mv "/vendor/bin/hw/[email protected]" "/vendor/bin/hw/[email protected]"
By renaming the corresponding file on my current ROM (/vendor/bin/hw/[email protected]) and restarting the device, I got rid of the battery drain and it now shows a healthy deep sleep time! I suppose that kills the fingerprint sensor, but since it wasn't working anyway, no harm done.
Just posting it for posterity and reference to whoever wants to try, I have no idea if anyone else has the same issue. (now I'll go hunt down PowerManagerService wakelocks, which seem to be the next big thing eating battery)
First, thank you for your guide. After updating from 7.1.2 to 9 i experienced a severe battery drain issue as well and this solved it. Actually, the fingerprint sensor never worked on android pie for me (crdroid 5.3). I would like to add some information that may be usefull to people.
This battery drain was caused by the fingerprint sensor and can be diagnosed by cpu spy where you will see your phone not going into deep sleep at all (interactive mode kernel, no idea for performance or gaming modes), and better battery stats showing finger print sensor being responsible for a big part of kernel wake lock when the screen is off.
Renaming the file can be done either if you are rooted on the phone or ( as i have noticed many apps like netflix refusing to work on rooted phones, making it inplactical to having your phone rooted ) using adb usb debugging to rename the files. if you are not allowed to rename the files, remount the phone and try again, remounting will automatically mount it in ReadWrite, while sometimes the first time will mount only as read.
If the problem is fixed the cpu spy app will show a much larger time spent in the lowest clock state in interactive mode and actually phone spending time in deep sleep.
PS: DO NOT hunt down the power wake locks as stated in your post, as those are active when your screen is on, and those should be on.