Event0 wakelocks

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
Hey guys, lately I've been having the eventx-xxxx wakelocks that *seem* to keep my phone awake and drain my battery. These wakelocks are usually event0 ones and followed by a four digit number which I believe to be the Process ID.

The current wake lock I am having is event0-2012 shown by BBS. It changes on every so the PIDs are rarely the same. It also happens that the 4 digit number happens to be the process ID of system_server. So there's something that's keeping it awake.

Lastly, the event0 is the synaptics touchscreen. So I'm guessing that this event0 wakelock keeps track of all the touches you make on the screen. This problem only appeared after the new touchscreen firmware updates so that may be the cause. Anyone have any thoughts on this matter?

Screenshots for proof below

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
 

Attachments

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
Alright guys I'm back to share what I have found after doing some research.

Right now I'm using ark kernel with liquid smooth 3.2 milestone

So back to these wakelocks, as it turns out, even though event0 was the most prevalent, most of the time it was on was while the screen was on, so basically you can ignore it.

However, there were two other events that I still had to investigate, event2 and event3. For me event2 is gpio_keys which are the button inputs. event3 is s2w_pwrkey.

First I deleted the event2 file under /dev/input. These files are restored on boot but I would still make a backup before trying this. After deleting this, my volume buttons stopped working, as expected. But my power button still worked. I used it for a couple hours but there was something that was keeping my phone awake still.

Then I rebooted and deleted event3. This is related to the sweep2wake that's implemented in alucard's kernel. I never use it anyway so I went ahead and deleted it. And what do you know, now my phone is sleeping like a baby and even the other events have gone down as well. But the problem is you have to delete the file on every boot. The solution? An init.d script with the following line. Where X is the number of the event you want to remove. You can also just add it to any existing scripts you might have in /system/etc/init.d

rm /dev/input/eventX

How to find out what's causing yours?
1.Download wake lock detector from the
play store and use it for a day

2.check under kernel wakelocks to see if
your phone is being kept awake by an
alarmingly high number of event
wakelocks, if so proceed.

3. Open terminal emulator and type the
following: "su" press enter after each
line
"ps | grep xxxx" where xxxx
is the number
following the event
wakelocks.

4. If system_server doesn't show up,
another app is causing it. Find it and
manage it. Otherwise, proceed.

5. Go back in terminal and type "su" enter
"getevent -c 1" this will give you all
of you events and and what they
are bound to.

6. Make a backup in recovery.

7. Delete one of the problem events and
see if your phone is kept awake, if it.
isn't then congrats! You found the
drain! Else keep testing.

8. Once your are certain which one it is.
Create an init.d or use an existing
one and add the line "rm /dev/input/
eventX" replace X with the event
you want to remove.

You're done.

If you have any problems or questions, I'll be happy to help.

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
 
Last edited:

ek69

Senior Member
Jan 15, 2008
912
393
0
I am on cm11s and have these same wake locks but all are less than 10 on so far a days worth of battery time. I don't think it's much of a problem for me and probably more for cm12? Anyways thanks for the info now I know where to look if it ever becomes an issue :)

Cheers
 

tracerit

Senior Member
Jan 7, 2008
1,212
129
0
Orange County, CA
i've been getting these crazy same wakelocks the last week as well, which is weird because i didn't get them the two weeks before that when i got my phone. And I've been flashing ROMs (Mahdi, SlimKat, Lollipop) and kernels (stock and AK) back and forth. Even after settling on Mahdi with a clean flash, they're still showing up. THanks for your investigation, I'm going to check things out when I get home tonight.
 

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
i've been getting these crazy same wakelocks the last week as well, which is weird because i didn't get them the two weeks before that when i got my phone. And I've been flashing ROMs (Mahdi, SlimKat, Lollipop) and kernels (stock and AK) back and forth. Even after settling on Mahdi with a clean flash, they're still showing up. THanks for your investigation, I'm going to check things out when I get home tonight.
Agreed, it only started happening recently and I haven't installed any new apps, but newer Roms and kernels. So I really don't know whats causing it

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
 
Last edited:

tracerit

Senior Member
Jan 7, 2008
1,212
129
0
Orange County, CA
i've been getting these crazy same wakelocks the last week as well, which is weird because i didn't get them the two weeks before that when i got my phone. And I've been flashing ROMs (Mahdi, SlimKat, Lollipop) and kernels (stock and AK) back and forth. Even after settling on Mahdi with a clean flash, they're still showing up. THanks for your investigation, I'm going to check things out when I get home tonight.



Update: I flashed AK v30 kernel and the wakelocks seem to be gone now! Prior to this I was on Mahdi with stock kernel which had the wakelocks, and prior to that I was on Mahdi with AK v11 kernel which also had the wakelocks. This is only after an hour of "testing" though, so hopefully no apps I'm going to use will trigger them back :/

Edit: jk, wakelocks returned after a while. Screenshot attached. I rebooted the phone then left it alone for almost two hours.
 

Attachments

Last edited:

mumaster20

Senior Member
Dec 15, 2012
527
179
0
Getting event0 1585 wakelocks, quite alot , more than 30k wakelocks in 3 hours.
It seems to be related to the synaptics driver, which to my knowledge is the touchscreen so i better not turn that off :p

Running AK 030 with Paranoid Saber Droid 4.4.4
 

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
Getting event0 1585 wakelocks, quite alot , more than 30k wakelocks in 3 hours.
It seems to be related to the synaptics driver, which to my knowledge is the touchscreen so i better not turn that off :p

Running AK 030 with Paranoid Saber Droid 4.4.4
No just ignore that one. Most of the the 30k happens when the screen is on l

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
 

mumaster20

Senior Member
Dec 15, 2012
527
179
0
No just ignore that one. Most of the the 30k happens when the screen is on l

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
I am getting another quite massive wakelock, ipc0000007b_sensors.qcom, this one hits 143k wakelocks in 6 hours.
Tried searching for it on google but didnt really find any answerd or solutions. Do you know maybe what this wakelock is?
Most likely its a sensor, as seen in the name.
 

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
I am getting another quite massive wakelock, ipc0000007b_sensors.qcom, this one hits 143k wakelocks in 6 hours.
Tried searching for it on google but didnt really find any answerd or solutions. Do you know maybe what this wakelock is?
Most likely its a sensor, as seen in the name.
I'll look into it

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
 

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
I am getting another quite massive wakelock, ipc0000007b_sensors.qcom, this one hits 143k wakelocks in 6 hours.
Tried searching for it on google but didnt really find any answerd or solutions. Do you know maybe what this wakelock is?
Most likely its a sensor, as seen in the name.
Alright, unfortunately I couldn't find any information about it. Are you running any auto brightness apps? Autorotation? Accelerator gaming? Magnetic case?

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
 

tracerit

Senior Member
Jan 7, 2008
1,212
129
0
Orange County, CA
Flashed the most recent boeffla kernel this morning (had ak 030 yesterday) and this whole day I haven't had any disruptive event wakelocks. Instead of minutes of those wakelocks, they're just St seconds now. Didn't change anything else.
 
  • Like
Reactions: venky61

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
Flashed the most recent boeffla kernel this morning (had ak 030 yesterday) and this whole day I haven't had any disruptive event wakelocks. Instead of minutes of those wakelocks, they're just St seconds now. Didn't change anything else.
That's curious. It might be because of new commits that might have been reverted in the kernels. Right now I'm using Ark kernel

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
 
Last edited:

venky61

Senior Member
Feb 20, 2014
215
43
48
Navi Mumbai
techno4use.wordpress.com
Alright guys I'm back to share what I have found after doing some research.

Right now I'm using ark kernel with liquid smooth 3.2 milestone

So back to these wakelocks, as it turns out, even though event0 was the most prevalent, most of the time it was on was while the screen was on, so basically you can ignore it.

However, there were two other events that I still had to investigate, event2 and event3. For me event2 is gpio_keys which are the button inputs. event3 is s2w_pwrkey.

First I deleted the event2 file under /dev/input. These files are restored on boot but I would still make a backup before trying this. After deleting this, my volume buttons stopped working, as expected. But my power button still worked. I used it for a couple hours but there was something that was keeping my phone awake still.

Then I rebooted and deleted event3. This is related to the sweep2wake that's implemented in alucard's kernel. I never use it anyway so I went ahead and deleted it. And what do you know, now my phone is sleeping like a baby and even the other events have gone down as well. But the problem is you have to delete the file on every boot. The solution? An init.d script with the following line. Where X is the number of the event you want to remove. You can also just add it to any existing scripts you might have in /system/etc/init.d

rm /dev/input/eventX

How to find out what's causing yours?
1.Download wake lock detector from the
play store and use it for a day

2.check under kernel wakelocks to see if
your phone is being kept awake by an
alarmingly high number of event
wakelocks, if so proceed.

3. Open terminal emulator and type the
following: "su" press enter after each
line
"ps | grep xxxx" where xxxx
is the number
following the event
wakelocks.

4. If system_server doesn't show up,
another app is causing it. Find it and
manage it. Otherwise, proceed.

5. Go back in terminal and type "su" enter
"getevent -c 1" this will give you all
of you events and and what they
are bound to.

6. Make a backup in recovery.

7. Delete one of the problem events and
see if your phone is kept awake, if it.
isn't then congrats! You found the
drain! Else keep testing.

8. Once your are certain which one it is.
Create an init.d or use an existing
one and add the line "rm /dev/input/
eventX" replace X with the event
you want to remove.

You're done.

If you have any problems or questions, I'll be happy to help.

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
Really a different way to deal with the problem than any other threads I have gone through. I am facing the same issue. Phone being awake when connected to WIFI only. The problem does not persist with Data connection and WIFI Off. Its very strange. I was working around for the solution but different things seemed liked working at different times.
Though I was having Event wakelocks and not wlan wakelocks I followed some solutions from this thread http://forum.xda-developers.com/galaxy-s2/help/puzzle-wlanrxwake-wakelock-sgsii-t2133176
Disabling netbios worked for me and again after an update the problem came back. Next time I tried changing frequency to 2.4Ghz and it worked. Now again after dalvik cache wipe the problem came back. No solution left to try.
I shall try the methodology u hav provided. Finger crossed. Really frustrated with this issue. Unable to keep the phone connected to WIFI.
But what can be the real issue. How can the volume keys or sweepwake issues persist only on WIFI and not on data connection. Should I ask for am exchange from OPO?
 
  • Like
Reactions: abhi08638

mumaster20

Senior Member
Dec 15, 2012
527
179
0
Alright, unfortunately I couldn't find any information about it. Are you running any auto brightness apps? Autorotation? Accelerator gaming? Magnetic case?

sent from my amazingly awesome OnePlus One

Don't forget to hit thanks!
Non of that, next to the standard autorotation and auto brightness of android itself. I did see that all the screen off gestures were turned on in synapse so I turned that off but it didn't seem to help. Its not that big of a deal though, probably some necessary stuff happening in the background. Still getting rock solid battery life! 6+ hours sot over 2 days so you don't hear me complain :) thanks anyways for sharing your info!

Sent from my One using XDA Free mobile app
 

abhi08638

Senior Member
Jul 11, 2012
2,165
4,385
0
Really a different way to deal with the problem than any other threads I have gone through. I am facing the same issue. Phone being awake when connected to WIFI only. The problem does not persist with Data connection and WIFI Off. Its very strange. I was working around for the solution but different things seemed liked working at different times.
Though I was having Event wakelocks and not wlan wakelocks I followed some solutions from this thread http://forum.xda-developers.com/galaxy-s2/help/puzzle-wlanrxwake-wakelock-sgsii-t2133176
Disabling netbios worked for me and again after an update the problem came back. Next time I tried changing frequency to 2.4Ghz and it worked. Now again after dalvik cache wipe the problem came back. No solution left to try.
I shall try the methodology u hav provided. Finger crossed. Really frustrated with this issue. Unable to keep the phone connected to WIFI.
But what can be the real issue. How can the volume keys or sweepwake issues persist only on WIFI and not on data connection. Should I ask for am exchange from OPO?
Yeah I have noticed this wifi issue as well. Iight be related to the new drivers that were implemented but I haven't been keeping up with that so I don't know if it was reverted or not. I usually keep the wifi sleep policy to never. As I said before, I don't really know why they show up, but this "solution" is very dirty. The best way would be to find the cause of it.

I removes the s2w event because whatever triggered it actually uses power by keeping the capacitive keys on. So stopping that process ultimately saved me some battery.

Sent from my LG-P880 using XDA Free mobile app