Sleep of Death while charging [Solved]

Search This thread

tkolev

Senior Member
Sep 26, 2008
800
169
Sofia
Hi all, there is a small app I wrote that will solve the problem with the Nexus 4 dying while connected to the charger overnight. It's completely free (no ads also) and can be downloaded from Google's Play Store. No ROOT required, works on completely stock phones. I tried it on my phone and haven't had a SoD for 5 nights (I used to have it almost every night). Also a colleague of mine used to suffer from this and the app solved his problem too.

The app basically puts a wakelock on the phone that will allow for the backlight to go off, so the screen doesn't age, but will prevent the CPU from sleeping while charging. Once external power is disconnected, the wakelock is released and so the app does NOT consume any battery (while in automatic mode).

So if you happen to have the same issue, feel free to try the app and save yourself the troubles of returning otherwise a perfectly good phone.

P.S. I have just uploaded the app, so if it's not yet visible for your country, please try again in a few hours.

Update: Now the application checks if the power is connected when the device is powered on, because otherwise the wakelock was not acquired when powering on with charger connected. Unfortunately this requires a new permission ("RECEIVE_BOOT_COMPLETED") and the application to be opened after updating for the receiver to be registered by the system. Also I added a notification in the status bar while the application is running. You have to enable it in the settings if you want it displayed.
 
Last edited:

wilsonlam97

Senior Member
Jul 11, 2010
688
123
Toronto
I don't understand why anybody suffering this wouldn't just RMA their phones?

+1. It's a hardware issue.

---------- Post added at 06:25 PM ---------- Previous post was at 06:23 PM ----------

Hi all, there is a small app I wrote that will solve the problem with the Nexus 4 dying while connected to the charger overnight. It's completely free (no ads also) and can be downloaded from Google's Play Store. No ROOT required, works on completely stock phones. I tried it on my phone and haven't had a SoD for 5 nights (I used to have it almost every night). Also a colleague of mine used to suffer from this and the app solved his problem too.

The app basically puts a wakelock on the phone that will allow for the backlight to go off, so the screen doesn't age, but will prevent the CPU from sleeping while charging. Once external power is disconnected, the wakelock is released and so the app does NOT consume any battery (while in automatic mode).

So if you happen to have the same issue, feel free to try the app and save yourself the troubles of returning otherwise a perfectly good phone.

P.S. I have just uploaded the app, so if it's not yet visible for your country, please try again in a few hours.

Regardless your are AWESOME. Thanks for doing something about it rather than whining and complaining for a resolution from fellow members.
 

simms22

Recognized Contributor - R.I.P
Jun 4, 2009
34,053
25,934
BROOKLYN!
www.androidcommunity.com
I don't understand why anybody suffering this wouldn't just RMA their phones?

+1. It's a hardware issue.

---------- Post added at 06:25 PM ---------- Previous post was at 06:23 PM ----------



Regardless your are AWESOME. Thanks for doing something about it rather than whining and complaining for a resolution from fellow members.

its NOT a hardware issue, software related. was VERY common on android 4.1.2, especially on the galaxy nexus. it happened to all the different nexus, nut the gnex suffered the most. 4.2.2 fixed the issue, and google did say it was a real issue. it still happens, but much rarer than before. btw, there are a few apps that bring it on for the nexus 4, one known app to bring on sod is ezekeels experience app. chew on that.
 

simms22

Recognized Contributor - R.I.P
Jun 4, 2009
34,053
25,934
BROOKLYN!
www.androidcommunity.com
So how does this app prevent sod?

it creates a wakelock preventing the device from (deep)sleeping. its not really a solution, is just a work around for the problem.


Permissions
THIS APPLICATION HAS ACCESS TO THE FOLLOWING:
SYSTEM TOOLS
PREVENT TABLET FROM SLEEPING PREVENT PHONE FROM SLEEPING
Allows the app to prevent the tablet from going to sleep. Allows the app to prevent the phone from going to sleep.
 
Last edited:

tkolev

Senior Member
Sep 26, 2008
800
169
Sofia
it creates a wakelock preventing the device from (deep)sleeping. its not really a solution, is just a work around for the problem.

Exactly. But it listens for charger connected / disconnected to acquire / release the wakelock and thus consumes energy only while the device is connected to an external power source (you can see it starting and stopping in the manage applications settings menu). True, that's not a "solution" (that's Google's job), but it doesn't interfere with the normal device operation and does not require any user interaction other than enabling it on install, so until there is a real solution it's the best I can come up with :).

Sent from my Nexus 4 using xda premium
 
  • Like
Reactions: JanusDC

ImWarped

Senior Member
Jan 4, 2011
189
21
Edmonton
+1. It's a hardware issue.



Way to show your technical prowess :laugh: Anyone that RMA's a phone for this issue ought to be shot in the knees, and given a Galaxy S1 to replace their Nexus, as they don't deserve to own one.
It's a software issue... on a DEVELOPER PHONE... or did everyone miss the fact that the Nexus line of products is supposed to be for devs' to buy and use to test new software/hardware configurations on.

edit---> Oh, and +1 to OP, good job creating a workaround!
 
Last edited:

mav.erik

Senior Member
Apr 28, 2012
136
15
I have the same problem.... I test this app and hope functionally .... I

Inviato dal mio Nexus 4 con Tapatalk 2
 

billydroid

Senior Member
Jun 24, 2010
1,599
481
Way to show your technical prowess :laugh: Anyone that RMA's a phone for this issue ought to be shot in the knees, and given a Galaxy S1 to replace their Nexus, as they don't deserve to own one.
It's a software issue... on a DEVELOPER PHONE... or did everyone miss the fact that the Nexus line of products is supposed to be for devs' to buy and use to test new software/hardware configurations on.

edit---> Oh, and +1 to OP, good job creating a workaround!

Definitely software. My problems started happening after 4.2.2 updates. I wish I paid attention to what kernel version it began on.

Anyway, I haven't had an issue since using this app. So about two days.

Thanks a million tkolev! I can use this as my alarm again.


Sent from my Nexus 4 using Tapatalk 2
 
Last edited:

tkolev

Senior Member
Sep 26, 2008
800
169
Sofia
Definitely software. My problems started happening after 4.2.2 updates. I wish I paid attention to what kernel version it began on.

Anyway, I haven't had an issue since using this app. So about two days.

Thanks a million tkolev! I can use this as my alarm again.


Sent from my Nexus 4 using Tapatalk 2

I'm glad it helps you too!

May I ask anyone that tries it to go back to the Play Store in a few days and rate the app to increase it's visibility and possibly help others to stumble upon it while searching for a solution. Thanks!

Sent from my Nexus 4 using xda premium
 

billydroid

Senior Member
Jun 24, 2010
1,599
481
I'm glad it helps you too!

May I ask anyone that tries it to go back to the Play Store in a few days and rate the app to increase it's visibility and possibly help others to stumble upon it while searching for a solution. Thanks!

Sent from my Nexus 4 using xda premium

Sure thing, its the least one could do .

Also could you explain, to the best of your knowledge, why the sod's occur when in sleep mode?
 
  • Like
Reactions: tkolev

tkolev

Senior Member
Sep 26, 2008
800
169
Sofia
Sure thing, its the least one could do .

Also could you explain, to the best of your knowledge, why the sod's occur when in sleep mode?

I have no idea. My first thought was to create a Daydream as those seemed to help too, but I could not turn the display off (you can only control the brightness but that would still keep the backlight on). The strange thing is that while "dead" something in the system is still working because an application that shows the battery percentage by changing the color of the notification LED was still working. Even after I had unplugged the phone. I know that it might sound like a heresy here, but I don't want to use custom ROMs (I use my Nexus for development and keeping it stock for compatibility is a must), so trying different kernels and ROMs was a no-go.

Sent from my Nexus 4 using xda premium
 

billydroid

Senior Member
Jun 24, 2010
1,599
481
I have no idea. My first thought was to create a Daydream as those seemed to help too, but I could not turn the display off (you can only control the brightness but that would still keep the backlight on). The strange thing is that while "dead" something in the system is still working because an application that shows the battery percentage by changing the color of the notification LED was still working. Even after I had unplugged the phone. I know that it might sound like a heresy here, but I don't want to use custom ROMs (I use my Nexus for development and keeping it stock for compatibility is a must), so trying different kernels and ROMs was a no-go.

Sent from my Nexus 4 using xda premium

So this was happening to you while completely stock, minus root?

Does this always happen you? Even while on 4.2 .1?
 

tkolev

Senior Member
Sep 26, 2008
800
169
Sofia
So this was happening to you while completely stock, minus root?

Does this always happen you? Even while on 4.2 .1?

I only recently got my hands on the Nexus 4. I live in Bulgaria and Google does not sell devices here, so I had to either wait for any of my colleagues to go to the US on a business trip while the device was in stock or pay more than 150% to buy one from a local reseller. I've been on 4.2.2 since day one. No custom ROMs, no root, not even unlocked boot loader.

Sent from my Nexus 4 using xda premium
 

billydroid

Senior Member
Jun 24, 2010
1,599
481
I only recently got my hands on the Nexus 4. I live in Bulgaria and Google does not sell devices here, so I had to either wait for any of my colleagues to go to the US on a business trip while the device was in stock or pay more than 150% to buy one from a local reseller. I've been on 4.2.2 since day one. No custom ROMs, no root, not even unlocked boot loader.

Sent from my Nexus 4 using xda premium

I see. The reason I'm asking is it didn't start happening to me until 4.2.2, but not sure what kernel revision it started on.

Just trying to establish a timeline.

Still the app is a life saver
 

Geronimo51

Member
Nov 1, 2011
5
0
Way to show your technical prowess :laugh: Anyone that RMA's a phone for this issue ought to be shot in the knees, and given a Galaxy S1 to replace their Nexus, as they don't deserve to own one.
It's a software issue... on a DEVELOPER PHONE... or did everyone miss the fact that the Nexus line of products is supposed to be for devs' to buy and use to test new software/hardware configurations on.

edit---> Oh, and +1 to OP, good job creating a workaround!

With all due respect (honestly) and not sarcastically- if this was the case wouldn't the phone come rooted already and in developer mode? I am pretty sure it is being marketed as the flagship "pure google" phone and not only for developers. That said it is easily understandable as to why this is a frustrating issue.

To the OP: :D:D:D:D A million thanks! I hope this app does the trick- regardless thanks for your efforts and making this community what it is.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    Hi all, there is a small app I wrote that will solve the problem with the Nexus 4 dying while connected to the charger overnight. It's completely free (no ads also) and can be downloaded from Google's Play Store. No ROOT required, works on completely stock phones. I tried it on my phone and haven't had a SoD for 5 nights (I used to have it almost every night). Also a colleague of mine used to suffer from this and the app solved his problem too.

    The app basically puts a wakelock on the phone that will allow for the backlight to go off, so the screen doesn't age, but will prevent the CPU from sleeping while charging. Once external power is disconnected, the wakelock is released and so the app does NOT consume any battery (while in automatic mode).

    So if you happen to have the same issue, feel free to try the app and save yourself the troubles of returning otherwise a perfectly good phone.

    P.S. I have just uploaded the app, so if it's not yet visible for your country, please try again in a few hours.

    Update: Now the application checks if the power is connected when the device is powered on, because otherwise the wakelock was not acquired when powering on with charger connected. Unfortunately this requires a new permission ("RECEIVE_BOOT_COMPLETED") and the application to be opened after updating for the receiver to be registered by the system. Also I added a notification in the status bar while the application is running. You have to enable it in the settings if you want it displayed.
    5
    I don't understand why anybody suffering this wouldn't just RMA their phones?

    Because some of us that live in countries where Google doesn't sell devices and because it's easier to solve it rather than returning the device.

    Sent from my Nexus 4 using xda premium
    2
    I have noticed that while on a wireless charger, this app runs for a minute or so, then the notification icon disappears and I assume the app stops running. Is there some fix for this, or do I just have to activate it manually?

    Sent from my Nexus 7 using xda app-developers app

    I have published an update which should solve this issue. Please test it once it's available in the Play Store (should be version 1.5.2) and report if the problem still persist. I don't have the wireless charger, so I can't test it myself.
    2
    Application updated. Please check the OP.
    1
    will test it an report back