yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
Hi,

Just got rid from annoying kernel wakelock "main" (unfortunately didn't find a reason yet). What I did: flashed back Siyah 3.3.2 when had no problems (but suprisingly) wakelock didn't dissapeared. Then restored nandroid backup. Finally disappeared. Only difference in my setup (despite updating a few apps - rather had no influence) was that I flashed new Siyah and played a little bit with superuser.
[Galaxy S II Q&A, Help & Troubleshooting] MDE_86:
Apparently 'main' is a wake lock to show screen on. From Dorimanx thread.

Tapatalk / SGS2 / Cyanogenmod 9 Nightly / Dorimanx Kernel.
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
Does it mean that it doesn't increase power consumption more than "screen on" itself? Do you know if this is provided by the newest Siyah?
[Galaxy S II Q&A, Help & Troubleshooting] jantonio23:
good

Im now using 3.3.3c and it fixed all of the problems I encountered in b version.

Although im still dumbfounded on how CFS tweak settings differ.. I already read pikachu's thread and Im still wondering what cfs is good for performance?

Is it Samsung, Linux or Thunderbolt? uhm why?

I noticed that in this kernel, My battery is averaging 10%/hr while using my phone (internet or messaging..)

Is it good tnough? May I ask what tweaks is recommended without compromising the battery?
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
so, just to be clear, your now back on 3.3.2, and no wakelocks anymore?
[Galaxy S II Q&A, Help & Troubleshooting] Korn1994:
Best kernel Thanks:good:
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
Yes, but as I wrote only flashing back 3.3.2 didn't help - had to restore nandroid. Strange.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
This explains why I kept getting wakelocks, while I went back to 3.2.7.1 to check and compare ; this means whatever is causing these wakelocks, leaves traces somewhere (maybe in the static system section or maybe just even in some app data ; I suspect this last option).

Meanwhile, after testing for some longer period, this is the result (for now...):

turning off google location services and all data(so that they don't interfere with the results) didn't eliminate all wakelocks.

De-installing BBS, did.

So I'm leaning towards what pikachu01 indicated, that it's the combination of superuser app and BBS that are not getting along real well. I some instances it will freeze or reboot the device, and in other cases it probably just produces a lot of wakelocks, like the ones #illidan experienced (mine looked exactlly the same).

I'm still testing, though...

next step will be turning google location back on, and let it settle

re-install BBS and look at situation again

and maybe de-installing superuser and getting the old version back like you indicated earlier...and see what happens....
[Galaxy S II Q&A, Help & Troubleshooting] :
BBS wasn't working very good on Siyah. I'm on stock CM kernel, SU Binary 3.1.1, SU APK 3.1.3 and BBS is working as it should be. No issues at all. I think this thing to see deleted wakelocks is breaking BBS. Even if disabled.
[Galaxy S II Q&A, Help & Troubleshooting] Tungstwenty:
Possible. Even if disabled, it's always doing its work and I can't promise I didn't break anything.

In fact, I do have a contract with power companies to receive a share on all extra the energy you guys are spending to keep the phones charged! MU-AH-AH-AH!!! :victory:

On a more serious note - can any of you that are capable of compiling the kernel try the previous wakelock.h and .c to see if main no longer shows for your environment?

Also, I see that wakelock.c history has my changes interleaved with the "move sync system to workqueue" commit and revert; I'm not sure if something might have been aftected in the merge (but I don't think so)
[Galaxy S II Q&A, Help & Troubleshooting] MDE_86:
I'm using Siyah 3.3.3b now and it shows up. From my understanding its to show when the screen is on and doesn't use any more power than normal. Its just diagnose problem wake locks.

Tapatalk / SGS2 / Cyanogenmod 9 Nightly / Dorimanx Kernel.
[Galaxy S II Q&A, Help & Troubleshooting] :
If you can get me a tutorial I'm able to do it ;) Trying right now to set up my machine to compile CM. I might be able to compile Siyah, since I will compile CM kernel. But I really think the new thing to see deleted wakelocks is breaking BBS. What if, the toggle on/off is not working, so it's always on? Or it's working but when off it still breaks BBS?
[Galaxy S II Q&A, Help & Troubleshooting] Tungstwenty:
I'll try to find a few minutes to do this myself later today, also.

Anyway, here are the instructions on how to have an environment on which you can build Siyah whenever you need.

About the WL features that were introduced, read here a detailed explanation.

The toggle is working; besides it only controls which of the 2 kinds of stats do you want to be reported on /proc/wakelocks (which is where BBS fetches the info). Both "normal" (old) stats and "exclusive" (the new feature) are continuously being tracked.

BTW, you can at any time get the "full" stats irrespective of the toggle state by viewing /proc/wakelocks_total, and the "exclusive" stats at /proc/wakelocks_exclusive. Depending on the toggle, one of those 2 will be the set of metrics being shown on the standard pseudo-file.
[Galaxy S II Q&A, Help & Troubleshooting] :
Kinda noobish me doing this... Are there any detailed tutorial? Don't think I will be able to do this. You already know how, it's easy there, but I don't even know much about ubuntu, installed sometimes here just to test to normal use, but went back to Windows. Do you have any tutorial there? Thanks.
[Galaxy S II Q&A, Help & Troubleshooting] Tungstwenty:
Not really, no. There are plenty of tutorials on the net, but one doesn't simply read a tutorial and become fluent in Linux, it takes its time :)

Again, I'll try to do this myself if I have the time for it and let you guys know the results.
[Galaxy S II Q&A, Help & Troubleshooting] :
You are right. But must have some tutorial to at least build. I'm going to take a look at some stuff here. Just want to build, at least, just to make me a little happy ;) After that I can study more so I can modify and compile my own kernels.
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
@pikachu01: I am attaching the logs you requested. I'm just not sure about the demsg as the timestamp was all off but the rest are fine. Thank you for all your time & effort that you are putting into this one.

I'm leaning toward bbs myself because on the bbs thread chamonix did say somewhere that he is implementing bug fixes in his next version of bbs to reduce networkstats wakelock. I'm have an inkling that is a combination of some commit in the cyanogenmod github along with siyah kernel & bbs that is causing this issue. Thanks for the time your putting into this johnbeetee. Really appreciate it.

Strange. Here is just the link

https://groups.google.com/forum/?fromgroups#!topic/android-platform/n668vwz2718

Yes!
[Galaxy S II Q&A, Help & Troubleshooting] vertrag:
does anyone know i cant dual-boot :( i tried many things since i upgraded to 4.0.4 (using odin and checked to autoformat nandroid) i got blank screen while booting to 2nd rom

maybe the partition name is different (device block or name) or the kernel partition cannot be shared :( does anyone have the solution for this..

PS: when i say 'tried many things' that include standard procedure for installing rom, swapping rom, wiping partition, formatting nandroid, changing base modem, do i have revert back to 4.0.3 really? :P and im on latest siyah 333c
[Galaxy S II Q&A, Help & Troubleshooting] timberwolf60:
I fellow this thread and successfully put my phone into dual boot mode. http://xdaforums.com/showthread.php?t=1680851

Also tested xxlq5 and xwlpm 4.0.4 rom. No problem on dual booting. siyah latest kernel still haven't updated to 4.0.4 which cause Bluetooth, camera, video playback malfunction. So I restored back to xxlpw and paranoid v1.6a as seen in my signature.

Send from my GT I9100 using Tapatalk2, 1st ROM Paranoid V1.6a, and 2nd ROM XXLPW, Siyah 3.3.3c kernel, jkay 14.1 mode.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
I did the 'overnight' test (as always overnight no data on), (back on 3.3.3c, using my original BBS, ......BUT...I've de-installed the superuser update 3.1.3 and reverted that way back to 3.0.8)

result: no more than usual (what i was used to) wakelocks (google location service) and back to a decent drop in battery (6% over a 9hr period)

The coming few days hopefully will show it staying this way, time will tell...

So I guess for now it's probably the problem pikachu01 pointed out how BBS is calling (updated) superuser and not 3.3.3c related.
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Thanks for link ;-) Yep, agree with what you've said here re: probably one otherwise insignificant commit that's caused it on the CM9 side, and also appreciative of John/Pika putting their time into having a look at this :-)
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Could you find out the date you installed the latest version of bbs on your phone, maybe it was somewhere in the 2nd week of June around the time you started having the issue? I got mine updated in the 3rd week of June & that was roughly the time the issue cropped up. Have frozen bbs for now & will do an over night test & report back tomorrow. Fingers crossed it should solve the issue.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Kind'a ironic, isn't it?? An app helping us trace wakelocks, indirectly is giving us a couple more for free :laugh::laugh::laugh::laugh:
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Sure is:D:D
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
I update my apps a couple of times a week, and the last BBS update was May 2, so it would have been no more than a few days after that. But as I said, I only noticed that wakelock happening after around June 7-8 or something like that. That's when I started trying to figure out what was causing it & went back to an earlier build of CM9/Siyah.

But the thing is, once I went back to an earlier build of CM9 in particular, it fixed the problem. And I still had BBS installed (I don't now; uninstalled it last week when I read about probs with it in this thread).

So in my case (Network stats wakelock), I'm not entirely convinced BBS was causing it.
[Galaxy S II Q&A, Help & Troubleshooting] :
Seems like he admited and fixed the problem and will send the patch to gokhan, so next release it will be fixed. It may have also broken BBS. I'm running stock CM kernel, all updated SU stuff and BBS is working properly.
[Galaxy S II Q&A, Help & Troubleshooting] Tungstwenty:
I'm not sure if you noticed my post on the BBS thread, but from the few messages I'm quoting (might not have caught all of the relevant ones for your ongoing discussion), I think I need to leave a clarification so everyone is aware of the "main" wakelock (non-)issue and what is causing it.

The long explanation is here; if you read it you'll fully understand what the cause was, the way this whole "main" mechanism works and is used for, and what are the (negligible) implications of the current bug that I've already submitted the fix for.

I can leave a summary:

When introducing the additional kernel wakelock stats, I let through a side effect related with the mentioned "main" KWL. chamonix /

BBS has no responsibility whatsoever in this

. BBS is merely reporting the KWL stats being collected by the kernel.

On the other hand, and so nobody is worried for no reason, the fact that "main" is now showing on BBS is just a math issue. There's no additional power consumption nor bigger awake time.

"main" is held locked whenever the screen is ON, and released when it is OFF. However, and here's the small nuance, even though it's locked during that whole time, it's treated as a special KWL and while locked no lock time counts increase. In other words, the correct (and previous) behavior is that while the screen is ON, KWLs do not keep tracking time even if they're locked. Plus, "main" always had a "lock time" of 0, despite it being locked while screen is ON.

In summary - the current issue on 3.3.3x builds is that:

- "main" is showing up while it shouldn't - just a cosmetic difference against the previous behavior. Just forget that it's there in BBS (in fact, if you look at /proc/wakelocks on previous builds without this issue, you'll see the lock there, active, with C > 0, only the "sleep_time" should be 0 - therefore it never showed up in BBS

- while the screen is ON, and due to my glitch, the other KWLs besides main will also keep the timer being increased, whereas the correct behavior is to have that time frozen. It will not affect a dump of an idle phone during the night (screen OFF all the time)

Hope this clarifies the issue and, on a personal note, I'm happy this bug came up because it was a great way that lead me to understand what that "main" KWL does and how does this whole time accounting work.

Example - I previously didn't know that KWL reports (such as the ones in BBS, or in /proc/wakelocks), already ignore the time when the screen was ON. I thought it was the total time that each KWL was held locked.

Cheers!
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Just wanted to add a little sidenote, also to clarify things:

I did read your postings on the BBS thread and am glad you figured it out.

The whole purpose of the discussion here was not to point the finger at all at any single 'culprit', but just to figure out where some of the misbehavings some of us have been experiencing are coming from and help eachother out.

As far as I'm concerned, I'm up to now convinced it had nothing to do with your patches, (as I stated, going back to 3.2.7.1, didn't relieve the problem) but more so with the combination BBS and superuser 3.1.3. As it turned out I was using one of the older versions of BBS (1.6....) and just today saw charmonix's changelog and saw that he tackled this problem in 1.8.... So now I'm trying his latest version 1.9RC4, and updated superuser back to 3.1.3 and see if it goes well...

Just hope you didn't get the wrong idea, and we do appreciate your work!
[Galaxy S II Q&A, Help & Troubleshooting] Tungstwenty:
Not at all, no worries there. My intention was not to defend myself, but rather to enlighten people about what was going on with the "main" KWL thing. Heck, I'm happy to advertise I made a mistake and learned something interesting in the process ;).

I'm just concerned to make people aware of the issue present in 3.3.3x so they don't worry too much with no reason for it.

As you say when you mention 3.2.7.1, there are 2 different issues being discussed together, both of them touching BBS apparently.

One of them is the one I just described, whereas the other is related to freezes, reboots, etc.

If I understand correctly (I haven't experienced any of those freezes/reboots myself), it might apparently be due to a combination of certain BBS and SuperSU/Superuser versions and not be kernel-related.
[Galaxy S II Q&A, Help & Troubleshooting] duff91:
i can't copy file on NTFS pendrive, 3.3.x give me this problem why?
[Galaxy S II Q&A, Help & Troubleshooting] :
Tungstwenty where have you been hiding until now? :) you are indeed a huge contributor and awesome mate in this forum! Thank you for you work!!

Sent from my SGS2 - SlimICS Rom & Fluxi Kernel
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
the combo superuser 3.1.3 and latest BBS : not flawless, I'm even starting to experience some hick-ups (android settings FC's)

so it's back to superuser 3.0.8
[Galaxy S II Q&A, Help & Troubleshooting] Tungstwenty:
I'm not sure whether this has been suggested or tried before, but here's something I experienced in a totally different situation and have changed configuration to avoid it:

When using Permissions Denied with SuperSU, the app took lots and lots of time starting up because it spawns individual 'su' invocations for each single package. SuperSU will display a toast for each of those (or at lease it used to, a while back) which was the cause of the huge delay. When going to SuperSU and configuring that App not to display toasts, startup time dropped dramatically.

Superuser, AFAIK, already had some intelligence in this aspect, where it didn't bother trying to display a toast for very quick successive su invocations. Or at least, the speed was fast enough for whatever reason.

I'm not saying this is the exact same problem, but there might be something similar going on. BBS might be spawning lots of su commands (and that could be a bug, yes), but perhaps one experiment would be to set SuperSU as the active root manager and then set BBS as not generating notifications.

Anyone tried that yet to see if it has any impact at all?
[Galaxy S II Q&A, Help & Troubleshooting] desean:
For those having problem with Superuser 3.1.3, you may want to try 3.2-RC2. I used to have issues with 3.1.3 but 3.2-RC2 solves them for me.

It is stable enough for me and worth a try imo.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
I know pikachu01 already mentioned somewhere that moving to SuperSU solved it for him (at least the hang-ups with 3.3.3 and 3.3.3b; so that would be an option.

With Superuser, once I've added all apps that need root-privileges, by default I disable the notifications, so that wouldn't be the case with me.

I'll give superuser 3.2Rc2 a try first, after confirming that 3.0.8 is ok with BBS.

After that I can always move to SuperSU.

Thanx, both of you....!
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
Sorry, but to confuse you a little bit more :) I would like to remind you my case: when had freeze just after boot on 3.3.3b on custom ICS 4.0.4 AOSP deodexed rom, to overcome BBS/superuser problem it was enough to shift from superuser 3.1.3 to 3.0.7 or to SuperSU but it didn't help for stock XXLPW odexed. Freezes stopped on both roms (even with newest Superuser) after flashing 3.3.3c but then KWL "main" (no-)problem poped up. Regards.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Oh well...guess I will just have to keep on going then, until I find the right mix....

...and in the end, if nothing else helps, there's always my beloved 3.2.7.1 :o

while I'm already busy, I'll go and give 3.3.3.d a try....
[Galaxy S II Q&A, Help & Troubleshooting] hjkl1234:
Siyah 3.3.3d works perfect ;) battery works better now :D
[Galaxy S II Q&A, Help & Troubleshooting] :
Guys 3.3.3c worked perfectly, now 3.3.3d is giving me freezes every now and then. I didn't change any setting. Maybe because of UV? That would be strange though, it worked before. Any idea?

Sent from my SGS2 - SlimICS Rom & Fluxi Kernel
[Galaxy S II Q&A, Help & Troubleshooting] hjkl1234:
did you have betterbatterystats installed? Or did you istalled the lastest version ? :D When not try to get the lastest voltag vaule and try to add this on extweaks ;)
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Yep...me t00....and somehow the touch responsiveness isn't the same here...

cpu load profile is also different than it was

I'll try flashing again...
[Galaxy S II Q&A, Help & Troubleshooting] robertobsc:
That's extremely strange. The only change from the versions should be the specific fix of main routine to bbs... Wow...
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Yeah..I know...just had a peak at GM's github...no spectacular changes...:confused:

EDIT: maybe my setup is a bit trashed with all those trials today ; gonna restore a nandroid from prior to 3.3.3x and give it one last shot...

EDIT2: that must have been it...everything's back to normal now..:) (where would we be without nandroid)
[Galaxy S II Q&A, Help & Troubleshooting] :
It is suspicious infact...could it be a bad download or even upload? I eliminated UV just to see what happens but I had 3 freezes, exactly the same situation I had with the b version which for me was unusable and really faulty. Once this gets sorted, man this 3.3.3 version is really a rocket and has a whole lotta features!! :)

Edit: just had a random reboot :(

Sent from my SGS2 - SlimICS Rom & Fluxi Kernel
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
3.3.3d is working well. I'm on older Superuser 3.0.7/su 3.0.3.2. The newest ver worked unstable for me.
[Galaxy S II Q&A, Help & Troubleshooting] sam142000:
3.3.3d working well for me too. Tha 'main' wakelock has gone too!!

Awesome work gokhan!!
[Galaxy S II Q&A, Help & Troubleshooting] Tungstwenty:
That's was my though also.

I resent that part in bold :crying:

I kept telling to myself: "that's a pretty spectacular fix you pulled off there" :laugh::laugh::laugh:

This is some "voodoo stuff" :p going on for sure. Flashing a newer version introduced these random problems for some but not others, reverting and flashing again then solves it, at least in some cases :confused::confused::confused:
[Galaxy S II Q&A, Help & Troubleshooting] Floydfire:
This version is a bomb. Using the phone and not heat than dorimanx kernel... really impressed... i really hope that gokhan don't abandon us soon.. jelly bean with siyah will be the best configuration for us s2 *-*

Inviato dal mio GT-I9100 con Tapatalk 2
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Well overnight testing done & if you are expecting good news then I don't have any. The wakelock still persists & is alive as ever:mad:. Only hope is to do a clean install but honestly I don't have such kinda time on my hands now.

@pikachu01: any luck with those logs? You apparently are my last hope to get this sorted out.

@tungstwenty: props due to you mate for all your hard work in the deleted wakelocks section. Made stuff for people really easy. No hate at all even if you made a mistake. We are all human after all & we learn & grow. Not pointing fingers at bbs either. It's a great app that's helped me on multiple occasions. Respect to chamonix.
[Galaxy S II Q&A, Help & Troubleshooting] pikachu01:
A bit busy on the side, but I'm beginning to take a look at the logs. Will have results within the day.
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Ahh! My bad. Sorry! Take all the time you need.
[Galaxy S II Q&A, Help & Troubleshooting] pikachu01:
Two things here:

Microsoft OnX

Watchdog (Zomut).

Disable both of these and your wakelocks will be gone.

I'm seeing a lot of entries in the logcat for both of these and they are constantly waking up the phone some time or the other.

P.S. the Appwidget could contribute wakelocks as well. If it doesn't get rid of the wakelocks, try getting rid of appwidget.
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Cool I'll do that. Thanks for everything. Alright by Appwidget you mean APW or widgets for OnX & watchdog?
[Galaxy S II Q&A, Help & Troubleshooting] pikachu01:
It's the app that has the name appwidget in it.
[Galaxy S II Q&A, Help & Troubleshooting] kasdepwel:
how are your battery time with that kernel?
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
I'm sorry, to bother you but could you give me the package name of the app. Is it just appwidget or appwidgetpicker? I can't seem to find the one your talking about.
[Galaxy S II Q&A, Help & Troubleshooting] pikachu01:
I think it's APW. It's this one:

07-12 06:16:16.546 I/Elixir2-Widgets(16043): Start widget update service: ids: [APPWIDGET:189], level: 30
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Couldn't be APW because I don't use it but yeah this entry is for an app called Elixir 2 for which I do have a widget. I'll just delete the widget. Thanks once again. Now let's just hope that the wakelock stops. :)