Wireless Charger Detector -- Orb

Search This thread

Phjodor

Member
Nov 17, 2012
7
1
I've written a small app to try to fix this problem.

It needs root access.

I haven't tested it much yet but I think it should work.

All it does is kill the qualcomm sensors daemon when you lift the phone off the charger.

This lets the wireless charger detection service release it's wakelock because the gravity sensor starts working again when the daemon restarts.

Open the app once and click the button, it will ask for root permission. After this, you never need to open the app again.

Let me know if this works.

First and foremost thanks for trying to find a solution to this. Downloaded the app yesterday and I am sorry to say I still have the wakelock.
 
  • Like
Reactions: bobaka

dzo

Senior Recognized Developer
Apr 3, 2008
2,487
5,086
Auckland
First and foremost thanks for trying to find a solution to this. Downloaded the app yesterday and I am sorry to say I still have the wakelock.

Does the wakelock disappear it you press the button in the app? For some reason it doesn't always seem to trigger properly when you remove the phone from the charger, I'll try to fix this.
 

Phjodor

Member
Nov 17, 2012
7
1
Does the wakelock disappear it you press the button in the app? For some reason it doesn't always seem to trigger properly when you remove the phone from the charger, I'll try to fix this.

When I removed the phone from the charger this morning I saw the "the kill -9 ..." message. I recently rebooted the phone to get rid of the wakelock so can't try to press the button in the app now. Will try again tomorrow. And once again, thanks for trying to fix this!
 

dzo

Senior Recognized Developer
Apr 3, 2008
2,487
5,086
Auckland
When I removed the phone from the charger this morning I saw the "the kill -9 ..." message. I recently rebooted the phone to get rid of the wakelock so can't try to press the button in the app now. Will try again tomorrow. And once again, thanks for trying to fix this!

How are you checking that the wakelock is held? bbs will show it under "kernel wakelock/boot" but it shouldn't be there under "kernel wakelock/unplugged".
 

bobaka

Senior Member
Dec 2, 2007
69
1
safe charge

i've been trying this. Safe Charge (SOD eliminator) https://play.google.com/store/apps/details?id=com.sash.sodeliminator

At first it seemed to fix it but after a couple days the problem seems to have come back.
Will continue testing to see if there's a sequence that keeps it working.

Also.. if you leave the phone on the wireless charger overnight the phone stops charging when fully charged but never starts charging again no matter how low the charge level (even with safe charge running)

Wouldn't it supposed to start charging again at a certain level like 80% or so?

Makes no sense. What use is a charger if you can't have a fully charged phone when you wake up...
 

Chaosgod27

Senior Member
Jan 4, 2011
191
75
Perth
I've written a small app to try to fix this problem.

It needs root access.

I haven't tested it much yet but I think it should work.

All it does is kill the qualcomm sensors daemon when you lift the phone off the charger.

This lets the wireless charger detection service release it's wakelock because the gravity sensor starts working again when the daemon restarts.

Open the app once and click the button, it will ask for root permission. After this, you never need to open the app again.

Let me know if this works.

I will give it a test, usually a simple restart fixes for it. Will post back soon. Thanks
 

RTNetwork

Member
Jul 18, 2013
15
2
The app was not helpful to me expect the first day I installed it. Appeared to work well.

I have done a few more tests of doing a fresh factory install and the problem is not there. However, as soon as I use a wireless charger it comes back. I'm sure this is no revelation, but I wanted to share.
 

SALVETA

Member
May 18, 2011
19
1
For me, sometimes it work (most times actually) but sometimes it doesn't so I have to check every morning a while after I took it from the orb to see if I have to restart the phone. I have not yet been able to see a pattern when it works and when it doesn't. Keep up the good work and hopefully you'll fix it, otherwise and meanwhile thanks for the partial solution. :)
 

bobaka

Senior Member
Dec 2, 2007
69
1
For me the problem only occurs if the phone is left on the charger once it is fully charged.

If I leave it on the charger when full it will stay awake and drain quickly. Example 30% drain in 10 hrs (overnight).
And the charger never comes back on.

If I charge it again and take it off the charger when it's fully charged, the battery drain will be only 3-5% in 10 hrs.
And the awake time will be very low. And battery usage over the next day(s) doesn't seem to be abnormal.
And I don't have to restart the phone to get this result even if I've previously left it on the charger overnight and
seen the excessive drain.

So this seems to be a problem being a result of the phone detecting the presence of the wireless
charger and remaining awake as a result.

The wakelock that seems to be the culprit is suspend_backoff

This wouldn't be a problem if it the charger came back on at say 80% but it does not.
And it wouldn't be a problem if the phone didn't stay 'awake' but it does.

There doesn't seem to be any point in being aware there's a wireless charger present if charging is
never going to restart no matter how low the battery goes, or in staying away because there's a charger
present that's never going to be utilized.

I'm not an android programmer but perhaps some of you who know more about how it's working could see
a way to work around this.

For now the workaround is to take the phone off the charger before going to bed and the convenience of
the wireless charger is worth it, but it would obviously be better if you could just leave it on the charger and not worry about it.

My phone is Nexus 4 purchased new in September. came with 4.2.. ota update to 4.3. stock. no root (yet)
I'm using a generic Qi charger purchased on ebay for around $22
I'm still using Safe Charge while charging.
Haven't had a chance to try the same routines without it yet.
 
Last edited:

dzo

Senior Recognized Developer
Apr 3, 2008
2,487
5,086
Auckland
Attached is a new version of my app and it certainly works for me. The previous version didn't always trigger when you lifted it off the charger.
My nexus 4 has been running it for the last 10 days, wireless charging every night and the wakelock is not held except during charging, see attached screenshot.
 

Attachments

  • Nexus4WirelessChargingFix-release.apk
    27.4 KB · Views: 250
  • Screenshot_2013-09-29-00-29-28.jpg
    Screenshot_2013-09-29-00-29-28.jpg
    40.5 KB · Views: 355
Last edited:

mangoman

Senior Member
Dec 20, 2006
661
75
So, for this you would need a charger that trickle charge? Once my phone is charged it stops charging then eats up battery.

Stupid question but how can i check it does its job?
 

Attachments

  • w.pngakelock.jpg
    w.pngakelock.jpg
    33.9 KB · Views: 163

gbarayah

Senior Member
Dec 2, 2009
949
138
California
Attached is a new version of my app and it certainly works for me. The previous version didn't always trigger when you lifted it off the charger.
My nexus 4 has been running it for the last 10 days, wireless charging every night and the wakelock is not held except during charging, see attached screenshot.

Thanks - been running the app for the last two days - so far, so good!
 

dzo

Senior Recognized Developer
Apr 3, 2008
2,487
5,086
Auckland

Attachments

  • Nexus4WirelessChargingFix-release.apk
    27.4 KB · Views: 172

Lush78

Senior Member
Dec 29, 2011
333
265
Just testing your latest fix... Will post results. My problem is that I flash new ROM updates nearly daily... Will this fix survive a dirty flash update? Does it survive a normal reboot?
 

dzo

Senior Recognized Developer
Apr 3, 2008
2,487
5,086
Auckland
Yes to both those. It only runs when charging state changes so if it's installed it will work.

Sent from my Nexus 7 using xda app-developers app
 
  • Like
Reactions: yokuyuki and Lush78

Lush78

Senior Member
Dec 29, 2011
333
265
The wireless charger detector has kept my phone awake since this morning... I dirty flashed an AOKP update (wiped cache and dalvik) yesterday and did nothing with the fix app... Pulled of my wireless charger ~5 hours ago and it hasn't deep slept yet....
 

dzo

Senior Recognized Developer
Apr 3, 2008
2,487
5,086
Auckland
The wireless charger detector has kept my phone awake since this morning... I dirty flashed an AOKP update (wiped cache and dalvik) yesterday and did nothing with the fix app... Pulled of my wireless charger ~5 hours ago and it hasn't deep slept yet....

Try running the app and hitting the button, does that help?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Thanks - been running the app for the last two days - so far, so good!

    Glad it's useful to you.

    I found that sometimes the wakelock doesn't get released so I updated the app to make sure it always releases it.

    The new version is attached, I've also put the source on github:

    https://github.com/dzo/Nexus4WirelessChargingFix
    3
    Attached is a new version of my app and it certainly works for me. The previous version didn't always trigger when you lifted it off the charger.
    My nexus 4 has been running it for the last 10 days, wireless charging every night and the wakelock is not held except during charging, see attached screenshot.
    2
    Yes to both those. It only runs when charging state changes so if it's installed it will work.

    Sent from my Nexus 7 using xda app-developers app
    1
    I got the orb for my Nexus and ever since I used it my phone doesn't go into deep sleep. I opened BetterBatteryStat and I have something called WirelessChargerDetector at the top of my list of kernel wakelocks. Also when I look at CPU state it goes to 384MHz instead of deep sleep when I am not using my phone. Obviously, this has hurt my battery life pretty hard. If I reset my phone after taking it off the charger, it seems to not have the kernel wakelock.
    1
    The wakelock is caused by PowerManagerService.WirelessChargerDetector. The only way to fix the issue is by doing a reboot of the phone EVERY time you use the wireless charger. This obviously defeats the convenience of the charger.

    The issue appears to have popped up with the 4.2.2 update. I found this post in /r/nexus4 complaining about the bug as well: http://en.reddit.com/r/nexus4/comments/1988qm/powermanagerservicewirelesschargerdetector/ and there are some people reporting it on the Accessories thread: http://xdaforums.com/showthread.php?p=38075837&highlight=wakelock#post38075837

    Hopefully someone can figure out the issue or Google releases an update soon (not likely). Until then I'm back to my wired charger :(

    EDIT: Found a Google bug tracker for this. Please star it: https://code.google.com/p/android/issues/detail?id=52034