yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Hey all

Having a few troubles with my gyroscope. Here's the story so far.

I first noticed the issue when seeing significant sensor usage by 'Android System' - see screenshot of GSam. I started digging what part of 'Android System' it could be. GSam Battery monitor confirmed that the Gyroscope is always on during any screen on activity - see screenshot. This never used to be the case, as a month or so back I never had any sensor time used in this app. So something is holding my sensor on. Using BBS, and conferring which packages are included in 'Android System', I can narrow it down to 'system', 'com.android.systemui', or 'surfaceflinger'. (I think.) - see screenshot. Note: during screen off times, the sensor is not active at all.

I've thoroughly googled/searched xda for correlations of these to the gyroscope. This is where I've come to a dead end. I can't find any info on what it actually is that's forcing my gyro sensor to stay on.

The sensor is on with the screen regardless of auto rotation, all 'flip to mute', 'flip to silence'...etc off. Also in chrome, the tilt to scroll is off. I'm stumped.

These links are links which I've read, but nothing seems to bite me with a solution:

http://forum.cyanogenmod.org/topic/38291-orientation-sensor-is-using-a-lot-of-cpu-time/

http://developer.android.com/guide/topics/sensors/sensors_motion.html

http://xdaforums.com/showthread.php?t=1755180

Any bright ideas? All suggestions are appreciated.

(Note that in one of the screenshots, '....androsensor..' has nothing to do with the forcing of the sensor on. It was an app I was hoping to log the sensor use with. It was useless.)
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Does it happen with stock (or a clean install of the rom & kernel you're using) ? Could be something unknown that's funky in your current install. Could be the sensor itself on the fritz if it does happen with both of those as well.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Mmm not too sure about stock. It's been a looooong time since I've been stock. Might have to try a clean install of Rootbox first though. I already flashed back one of my reliable nandroids which I always revert to if I have issues, so I'd kind of neglected that side of things and just assumed that my bullet-proof nandroid would fix it if that was the issue. I'll try a clean install of RB though. Just annoying coz there should be a way to figure out what's actually using the sensor, but I haven't found one.
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Yep that's an unusual one, you would have thought you'd have nailed it given everything you've looked at (and you've been pretty thorough).
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Thanks for the compliment, especially coming from you :D I'll have to re-flash tomorrow, I'm on 13% battery now... better charge a bit before flashing or I could face worse issues than a gyro stuck on ;) will report back when I know more.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Ok, so I flashed a clean install of Rootbox 4.0 with dorimanx 9.16. (flashed gapps as well). Gyroscope was still stuck on with the screen on. As a last thing to try before full stock, I flashed the kernel that comes bundled with rootbox. Fixed!... But what about Dorimanx? I've used that kernel for about 3 months now. 9.16 I've used literally since it was released, with no dramas.

To make sure that it was the problem, I flashed back Dorimanx 9.16. Gyro on. Reflash Stock kernel: gyro off. Using the stock kernel isn't really an option. Dorimanx allows so much more tweaking :D plus bln etc

I'd post in the Dorimanx thread, but I imagine it won't be received too well. [MENTION=4330322]MistahBungle[/MENTION] any ideas?

Edit: And yes, I've tried searching both the Dorimanx dev and discussion threads for similar issues. No luck

UPDATE: So, with more screwing around with kernel wipe scripts, I managed to make the gyro turn off with both dori and stock rootbox kernels. All was going well until it turned back on a few hours later. I don't know why. Now I can't get it to turn off at all.

Before it turned on, I'd only been tapatalking. A while later I played a bit of hill climb racing (game), then checked GSam to see if the gyro was active, and it was. The game doesn't actually use the gyro, so this is a long shot... Is anyone able to check for me if this also makes their gyroscope turn on (check using GSam battery monitor as in OP screenshot). Much appreciated.

Since then I've uninstalled hill climb racing, wiped, reflashed dori, & stock kernel, but nothing has made it turn off.

Stumped again.
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Got me stumped as well Hopper, narrowing it down to a Dorimanx-specific issue looked promising, but that's now obviously not the case.

I'd do that clean install of stock (take your pick re: ICS or JB, just stay away from 4.0.4) I was talking about yesterday.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Literally had just turned wifi on to download a stock firmware. I will attempt to flash with mobile Odin (first time) so I can everroot.... Can't have an unrooted phone ;) might flash the 4.1.2 I was on before root. Again, I'll post updates as I know more :)
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Great minds eh ? ;-D Yep I hear ya re: having a rooted phone. Let us know how you go; this is a really interesting problem & makes a nice change from the 'OMGZ ! I broke my phone because I couldn't be bothered learning or taking proper care !' threads we usually get on here :)

Tell you what, if you still find the problem persist on stock, I'll DL that game (or something similar that makes use of the gyro) & see if I can replicate it on my phone (running RB 3.9.1 & Dori 9.12; Yes, I know I'm a bit behind. I like stability :) ). I must admit I don't play games that make use of it on my phone, so I've never really noticed anything wrong like this before.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Yep well I'm kind of enjoying it too. Now I have an excuse to buy & use mobile Odin :) alright, thanks! You've got yourself a deal. I won't get a chance till tomorrow, but I'll post my findings!
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Ok, so the fun of Mobile Odin made me flash stock tonight. Aaaaand gyroscope is on still, but only when screen is on (see screenshot). This is with: stock LSH (4.1.2) firmware (rooted using Everroot in mobile odin during flash). Everything (I mean everything) is unchanged, apart from installing GSam to see if the gyro was being used.

The only conclusions I can think of:

- My hardware is faulty

- The gyroscope is always on, checking to see if I'm in landscape mode for videos (as in how the device doesn't need to be on auto rotate to watch a youtube video etc. in landscape). If this were the case, then wouldn't everyone's gyro's be on 100% of the time though?

Any enlightenment appreciated.

Edit: now I remember why I hate touchwiz :/
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
OK Hopper

Firstly, I hate you. I couldn't stop playing that goddamn game ! :P (I had to freeze it).

Secondly, I played it for 25-30 mins solid & no sign of gyro in GSam (I also have screen rotation, all the flip options in alarms turned off, etc).

So that doesn't seem to be the culprit.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
I

Many many thanks for that :) and apologies for your addiction ;) hmmm. Well I literally have no idea what to try now, I'm completely out of ideas.

Any bright ideas to try? Or a way of logging what is actually using the gyro? I couldn't find one.

Ps. Try to unlock the monster truck as soon as you can :p
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Alright, so maybe time for a bit more drastic action... I'm thinking of disabling the gyroscope. I don't use tilt at all, so I have no need of it. Only problem being, I can't find a way to disable it. I've searched xda, as well as plain google. [MENTION=4330322]MistahBungle[/MENTION], I don't suppose you've come across a way to do that in your vast experience?
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Logcat during the period the gyro seems to be most in use might be helpful, but I'm no dev & not really au fait with deciphering them (Hopefully someone else who is might read this thread).

No. I can't say I've seen a problem like this or seen a way to disable the gyroscope. You'd need to talk to a dev I reckon. Given you've been using RB & Dori, maybe try the discussion threads for those, assuming the dev(s) read them & ask the specific question there, both about whether logcat would be useful & whether the sensor can be disabled by some kind of hack.

Sorry I haven't been able to help more :( I'm sure this is really frustrating for you & will be keeping an eye on the thread to see how this thing progresses & if you eventually find some kind of solution (Also happy to test anything else out at this end again that might help).
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Well if that's the case, all I need to do is logcat for a minute while my screen is on. Guaranteed the gyro will be on! I will take some time & post in those threads. Thanks so much for your help! I will let you know if I manage to fix it, or if there's something else to test :) thanks again!
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
No worries, happy to help ;) If you need me to try anything else let me know & keep us posted on how you go with it in this thread.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Update :

Since posting here, I posted in the dorimanx discussion thread, no replies (not that I really expected any). No progress with the problem, until yesterday.

I flashed NeatROM out of curiosity to see what it was like, with Apolo kernel. Gyroscope is off. I have no idea why, seeing as gyro was locked on with stock ROM. Now I'm even more confused... I would have thought it was possibly a problem which arose & is a result of flashing a 4.2.2 ROM, but [MENTION=4330322]MistahBungle[/MENTION], you don't have this issue.

Apart from knowing that it is possible for my gyro to be off, it hasn't helped at all, unless I'm missing something....?

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
AHA!! I think I might have a solution.... [MENTION=4330322]MistahBungle[/MENTION], are you still ok to test something?

I managed to make the gyroscope go off by using hawkerpaul's ROMNuke script, and flashing stock. Then, I used the script again and flashed Rootbox, and the gyro stayed off. I flashed Dori 9.16, sensor was off. I set up Dorimanx in Stweaks how I usually do, and my gyro was on.

I started configuring Stweaks one setting at a time, checking with GSam battery monitor to see if the gyro was turned on. The gyro turned on when I configured the 'Screen' tab, specifically:

Set the 'min_bl_level' to 100 and set my brightness to 'Auto'

I re-nuked my ROM, and did the same test, with exactly the same result. I have since found that setting brightness to 'Auto' will trigger the gyroscope. Note this is only on Dorimanx, it won't trigger on any other kernels. Although it won't trigger on another kernel, the gyro will sometimes seem to stay on, as if the trigger is 'carried over' from another kernel. I don't know when or why though.

Summary:Setting brightness to 'Auto' triggers the gyroscope on Dorimanx. MistahBungle, could you confirm this? If not, next step is to flash a heap of different Dorimanx's kernels and see if some don't trigger it.
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
I've just turned my phone on auto-brightness, running Dorimanx 9.12. I'll check GSam in a couple of hours to see if the gyro has been running for any length of time (and I won't do anything with the phone that actually requires the use of the gyro).
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Huge thanks! Let me know how it goes :)
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
16m12s gyro on since I last posted. There's your culprit (or it's a really big coincidence).
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
That's the culprit alright! Hmm. Now I wonder whether the gyro actually is on, or if its falsely reporting... Either way, I'll post again in the Dori discussion thread and see what happens. Many thanks!
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Yep the false reporting thing crossed my mind after I hit send on my PP; I've seen examples of that with some kernels in the time I've been here (One build of Siyah way back that wasn't reporting memory use properly), so it could simply be that. Looking at the time, it seemed to have corresponded with screen on, so it seems to be screen on & auto brightness is either tripping the gyro or causing it to report as same.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
That's exactly my findings. Hopefully I find out which it is either way.... Just feel suitably stupid that it came down to auto brightness after all I tried.

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Don't.

It's a weird thing to happen given it's associated with turning auto-brightness on. That's the last thing you'd expect to cause it given the two are unrelated on the surface at least, unless the whole screen thing/libs/code is responsible for auto-brightness and say also responsible for screen rotation (which does use gyro) and perhaps getting everything to work involve some kind of 'dirty' hack/code which causes this issue (based on what I've read in dev threads about how they implement some stuff due to not having sources; I'm no dev tho).
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Thanks :) it literally was the last thing I expected, you don't think of mundane & commonly used, 'standard' features to be the cause of something such as that.

I guess you didn't have this bug as you don't use auto brightness, I won't either until I see a solution/explanation. Just annoying having to manually change it as I'm inside /outside constantly.. [/whinge]

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
I do use auto when I'm out & about, but I tend to use the phone a lot when I'm doing that anyways, so probably don't 't notice the likely minimal drain (I think ?) this causes.

I'll set brightness manually @ 75% tomorrow rather than auto & see if it makes any difference to the drain I see on an average day when I normally have it on auto.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
I see, makes a lot of sense when you put it like that. Difference being that I will usually have my brightness below 20%, which means I notice additional drain more as a percentage if that makes sense? As in, your screen will dominate usage, but mine is more noticeable when a minor change in consumption occurs.

Many thanks for the offer to put yourself out like that, it's hugely appreciated :)

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Yep that makes sense, can see that if you normally have screen @ a low % (which I do when I'm home mostly) that it would be noticeable. And yeah, I have screen on a lot when I'm doing that, using mobile data, games, etc which cause constant drain so I wouldn't notice the gyro thing.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
On the money there. I'll also manually set my brightness to 20 % tomorrow and see if I get better results vs auto with gyro on. Will be interesting to see, as setting min_bl_level in stweaks to 90 or 100 makes brightness only ramp up when absolutely needed, so even on auto my screen is usually at or below 20%.

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Having tested with brightness set @ ~75% via STweaks & using the phone a lot, I didn't notice a whole lot of difference drain-wise compared to having it on auto-brightness/which we suspect trips the gyro (no difference really), so it might well be a case of false reporting.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
That's definitely plausible.

With my brightness set manually to 20%, I noticed a definite decrease in battery used by 'android system'. After an hour screen on time, android system would usually be at about 11% for me. Today with auto brightness off, android system didn't even feature in my usage stats.

I will need one more day to test properly as today wasn't an accurate representation of my 'normal' usage. I'll have to report back tomorrow.

So far though, it's looking like a lower screen brightness will show relative decrease in battery usage.

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Ok so after a day of 'regular' usage for me with brightness set manually, I can see a definite overall decrease in battery usage. In particular, 'android system' is at 4%, whereas with auto brightness (&hence gyro) on, android system is usually 11-12%.

Although it's not a crazy overall decrease in battery usage, it's definitely noticeable with a low screen brightness.

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
How much 'usage' you're seeing in a battery app for a particular process isn't all that relevant tbh.

You should be looking at it along the lines of 'is this causing more drain I.E instead of losing say 20% of battery over 5 hrs use (an example, like the 6Mbps in the other thread, not an actual/real number), am I losing 25% due to this issue', if you know where I'm coming from ? People often get caught up in stats relating to a single process that various apps spit out, and lose sight of the real effect a particular issue is having (or not having).

The bottom line should be is it causing your battery to drain more quickly, as opposed to 'android system is showing 11-12% Vs 4%' which may not actually be having any greatly noticeable effect on overall battery drain, which is what I was looking at (I mean, why would I care what process is doing what if it's not affecting performance or battery drain ?), and didn't notice anything.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
I know exactly where you're coming from. I stated the usage of android system as a way I have of expressing the difference. I have saved multiple screenshots of battery statistics over the months. Comparing my current usage to my recent screenshots I'm definitely up on that.

Right now I'm at 63% after 12 hours total, 1hr 45 screen on (streaming videos, tapatalk, web browsing & multiple texts /photo messages). With similar usage with gyro on I can confidently say I'd be around 55%.

So the difference is noticeable but not a crazy amount.

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Ahhhh OK. Yeah, 8% over 12 hrs is not insignificant & definitely worth saving if you can.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
That's what I figure. I will keep setting brightness manually, until I can get a permanent solution.

No replies whatsoever in the dorimanx discussion thread though, so I can't see this being fixed soon, if at all.

Sent from my GT-I9100: Powered by Dorimanx, running RootBox
[Galaxy S II Q&A, Help & Troubleshooting] electricsheepdreamer:
Hey Hopper8,

take look at this (auto box ticked/unticked)
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Wow! So it is actually on, after all!..... What app is that? I found another app that does similar, but not as clear. Yours is better.

6mA isn't a lot of power to use, but it is definitely extra power. Didn't expect to see confirmation that conclusive, thanks!

Sent from a galaxy far, far away
[Galaxy S II Q&A, Help & Troubleshooting] electricsheepdreamer:
That's AdvancedTools(Pro)

What seems somewhat strange is that dmesg log shows accelerometer engaging but in GSAM accelerometer time stays the same but gyroscope time is increasing instead. (0.25 vs 6.1 mA)

Nice catch.:thumbup:

Maah, not worth mentioning. :)
[Galaxy S II Q&A, Help & Troubleshooting] GidiK:
Aren't you comparing two different sensors here?
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Not quite sure what you mean with the accelerometer vs gyro? My auto brightness only affects the gyro, it's auto rotation which turns on accelerometer ( of course).

Turning on auto brightness activates only my gyro.

Did you look a few posts up, at my usage stats? It seems to make a difference over the course of the day. In an app similar to advanced tools, I actually have 2 gyro listings. One is the 13 mA, one at 6. Combined I don't know if that makes a difference? And I don't even know why it lists 2...

Edit: in advanced tools, it's listed as 'rotation vector sensor'

Sent from a galaxy far, far away
[Galaxy S II Q&A, Help & Troubleshooting] electricsheepdreamer:
Hey Hopper8.

What I meant is that log shows that K3DH sensor is being activated/disabled which is acceleration sensor (K3G is gyroscope) but use of accelero sensor doesn't increase while gyro is.

There's also a Corrected Gyroscope sensor showing (last on the list, scroll down :))

But I have some more details on this interesting phenomenon (yes, I do have a life, but I'm on vacation and I'm married :P). Last night I flashed JB Reloaded theme (with themed lidroid toggles) and now when I tick auto, both sensors (acceleration and gyro) are increasing when auto brightness box is ticked.

Auto ticked

Unticked

2mins later, left unticked

Logcat also mentiones enabling/disabling of acceleration sensor only, I guess.

I've read your usage statictics and today I'll leave it for a couple hours of testing myself.

See you later, cheers.
[Galaxy S II Q&A, Help & Troubleshooting] Hopper8:
Ahh, I understand what you meant now. Dopey me, apologies.

This is getting weirder and weirder. I cannot understand why flashing a theme causes accelerometer another app to pick up sensor usage. Either that, or why does flashing a theme suddenly cause the accelerometer to be used?...

And why are we seeing this on two separate kernels? So odd. I'm just about to flash stock and see if it happens on full stock, if it's a part of the stock kernel. Will post with results.

No pressure to post, enjoy your vacation!

Edit: no need for me to flash stock. I just looked at my brother's i9100 (full stock, never been 'messed with') He happens to use auto brightness. When I installed GSam battery monitor, it said that gyro usage time matched the screen on time. So, full stock does this as well.... Not sure what to make of it now.

Sent from a galaxy far, far away
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
I think we might finally have an answer to this.
[General Questions and Answers] Dodgexander:
I am running Slim Bean 4.2.2 on my ZTE Crescent and have just installed the int2ext+ but it isn't installing correctly for me, in etc/init.d I have the two script files but they are 0 bytes, any pointers of what has gone wrong?

I am running CWM 6.0.8 recovery, have a 1gb ext4 partition which remains unmounted.

Edit# I figured out how to delete the two files but when I manually paste the files from the zip archive or reinstall from CWM they're always 0 in size.

I have tried reinstalling both with the 32mb swap file enabled/disabled and I can't find a way to delete the script files successfully.

Edit# I found the problem, not enough space on partition:system.
[Nexus S Q&A, Help & Troubleshooting] bestmjh47:
Hello, I want to know how to port touch CWM, And I have some questions for it.

First, How can I get the CWM touch recovery source?

I searched many times in many websites, but I can't find it.

Next, I've heard from someone that "If you want to port Touch Recvery(CWM), You have to type BOARD_TOUCH_RECOVERY := true "

So, I typed it in my Boardconfig.mk, but, When I build the Recovery image, I get a message "bootable/recovery/ui.c:133:47: fatal error: ../../vendor/koush/recovery/touch.c: No such file or directory"

Where Can I find the touch.c?