[Q] Compass East/West Flipped in all 5.0 Lollipop Roms - Verizon Samsung Galaxy S 4

I have been trying a variety of Android 5.0 Roms on my Verizon Galaxy S4. While most of them work pretty well, there is one thing that is consistent across all the 5.0 roms on my device: the compass' orientation is completely off. When held in portrait mode, the compass points east when facing west and west when facing east. If the phone is rotated into landscape mode, then north and south are flipped instead. The problem seems to be the X-axis of the magnetic sensor. I have tried calibrating the compass in variety of different ways with a variety of different apps. I also tried both the GoogyMax kernel and the Alucard kernel with the same results compass-wise.
While this would appear to be a hardware issue, the compass works perfectly in Kitkat and older roms. I even tried flashing an old Kitkat rom after trying some Lollipop roms and, sure enough, the compass was working properly as soon as the Kitkat rom booted.
Is there any way to mod the system to inverse the number normally reported for the X-axis of the magnetometer? Otherwise, is there some other way to fix this flipped compass issue?I have searched high and low, but can't find anything of use.

Same issue here, but I have sprint sgs4.

MehStrongBadMeh said:
I have been trying a variety of Android 5.0 Roms on my Verizon Galaxy S4. While most of them work pretty well, there is one thing that is consistent across all the 5.0 roms on my device: the compass' orientation is completely off. When held in portrait mode, the compass points east when facing west and west when facing east. If the phone is rotated into landscape mode, then north and south are flipped instead. The problem seems to be the X-axis of the magnetic sensor. I have tried calibrating the compass in variety of different ways with a variety of different apps. I also tried both the GoogyMax kernel and the Alucard kernel with the same results compass-wise.
While this would appear to be a hardware issue, the compass works perfectly in Kitkat and older roms. I even tried flashing an old Kitkat rom after trying some Lollipop roms and, sure enough, the compass was working properly as soon as the Kitkat rom booted.
Is there any way to mod the system to inverse the number normally reported for the X-axis of the magnetometer? Otherwise, is there some other way to fix this flipped compass issue?I have searched high and low, but can't find anything of use.
Click to expand...
Click to collapse
Currently I'm still running the KitKat GPE ROM and my compass is also flipped, I know the fix was to flash a Ktoonz kernel and it would fix the issue for that. However I don't think they've fixed it as yet for 5.0 ROMs.

It's the Kernels.
It's not due to the ROMS or hardware.
The backwards compass is due to the Kernel installed with the ROM or that you may have downloaded and applied. Kernels now are compiled as Unified kernels which work across all carriers. They are simpler for the Devs to manage without having to compile their kernels for each carrier. That messes up our compass though.
KT-Kernel's fixed our issue when they were compiled carrier specific.
Unfortunately for us KT has gone Unified like the other international Kernels and the international base and compass drivers are from the other side of the world, which cause ours to go backwards on East/West.
I have been looking through KT kernels on the Github and trying to make sense of the drivers and compile configs trying to figure out if a dev could ever come up with a patch.
But I am still new to it all when poking through the KT's source files.

I have oneplusone and it shows the same symptom. Installed magneticsensor app and found out that Bz is inverted. Bz is the direction orthogonal to screen such that it is the most important in navigation ! I would like to see the kernel source for the sensor but haven't set it up yet. If you are/know kernel dev, a help would be appreciated.

pastime1971 said:
I have oneplusone and it shows the same symptom. Installed magneticsensor app and found out that Bz is inverted. Bz is the direction orthogonal to screen such that it is the most important in navigation ! I would like to see the kernel source for the sensor but haven't set it up yet. If you are/know kernel dev, a help would be appreciated.
Click to expand...
Click to collapse
You are not going to to find much help for the Oneplus One here. It was definitely a kernel issue though, as for the Verizon Galaxy S4 it was fixed thanks to updates to the Hulk and Alucard kernels that compensate for the flip.

MehStrongBadMeh said:
You are not going to to find much help for the Oneplus One here. It was definitely a kernel issue though, as for the Verizon Galaxy S4 it was fixed thanks to updates to the Hulk and Alucard kernels that compensate for the flip.
Click to expand...
Click to collapse
Actually, I was able to fix it via /system/etc/sensor_def_qcomdev.conf and deleting /data/misc/sensor/sns.reg without touching kernel or hw-lib
see http://forum.xda-developers.com/one...tic-sensor-t3176956/post62301573#post62301573

Theoretically, we're due for a magnetic pole shift. Every 23,000 years our planet pole shifts. I know, sounds crazy doesn't it?

Related

Does your compass work? If so, what ROM are you using?

I'm trying to remember a time when my compass worked properly. I think it did, at some point, but that point is certainly not now. I'm running the leaked froyo build, and the compass - while pointing in the proper general direction - varies and jumps around greatly depending on how I orient the phone.
So, what about you? Has your compass ever worked right? If so, which build did you use? Do you find that changing ROMs changes your compass performance?
I've tried many different ROMS and it appears as though there is no major difference in the compass. Also tried all the different compass apps with no luck. I remember reading somewhere that the compass on our phones is very different than most and will never be 100% accurate. Anyone else heard different?
My compass has always worked, though now I'm on jk2 and it's not working so its not just you
Sent from my SXY-T959

[Q] Is anyone getting usable GPS on ICS ROMs?

I am totally in love with having ICS on my Vibrant! Big thanks to our great dev community!
The only drawback with every ICS ROM I've tried is GPS. The ROMs I've tried all were able to get GPS locks after lots of massaging, but never worked when I needed them, even after reboots. Long lock times, weak locks, lost locks while driving, etc.
My GPS on 2.2 ROMs was great, so I know it's not insufficient hardware. I've tried all of the fixes and such I could find on the forums.
If anyone is running an ICS ROM and has usable GPS, I would love to know what you're using - ROM, kernel, modem, any flashable/manual edits to the GPS.conf, etc.
Thanks!
Sent from my SGH-T959 using XDA
my GPS works, by works i mean not just sattelite locks but in actual driving use and after deep sleep.
ROM: frankenKANG of AOKP, Slim ICS, and ICZ
Kernel: THS, modified splash image and added more governors / IO schedulers, no other changes made.
Modem: JI6 (Southern California)
GPS.conf: Custom -- posted -- extract from zip, push manually, rw-r--r--, reboot
cheers!
GPS Better than Ever!!
Look below to see what ROM I'm running, I get great reception and lock within 10 sec's 15 max, and I use it all the time to pilot my large car around for a living!!.
Of course I did the antenna contact mod using a piece of plastic shaped just right to keep contact pressure solid so the signal is strong!!
If you haven't done the GPS antenna Mod yet your never gonna get a good signal until you do, This is a known Samsung design flaw!
Once you do it and set the right SW up and region where you operate at, you'll see a huge improvement. That is if you have a T-959 Vibrant??
My GPS works like a charm, my ICS rom is also in my signature below.
xtone said:
my GPS works, by works i mean not just sattelite locks but in actual driving use and after deep sleep.
ROM: frankenKANG of AOKP, Slim ICS, and ICZ
Kernel: THS, modified splash image and added more governors / IO schedulers, no other changes made.
Modem: JI6 (Southern California)
GPS.conf: Custom -- posted -- extract from zip, push manually, rw-r--r--, reboot
cheers!
Click to expand...
Click to collapse
So you're using the kernel that comes with Slim? I'm currently using that, and my gps.conf is basically the same as yours. I guess it's time to try the hardware fix... Thanks for your help.
dseldown said:
Look below to see what ROM I'm running, I get great reception and lock within 10 sec's 15 max, and I use it all the time to pilot my large car around for a living!!.
Of course I did the antenna contact mod using a piece of plastic shaped just right to keep contact pressure solid so the signal is strong!!
If you haven't done the GPS antenna Mod yet your never gonna get a good signal until you do, This is a known Samsung design flaw!
Once you do it and set the right SW up and region where you operate at, you'll see a huge improvement. That is if you have a T-959 Vibrant??
Click to expand...
Click to collapse
Yes. I am running a T959 Vibrant. I'm working up the nerve to take my phone apart to try the hardware fix. Thanks!
I was in the same boat as you. I tried the fix posted here http://forum.xda-developers.com/showthread.php?t=1370910 and it did the trick.
I am currently running ICS Passion v13.1 with icy glitch v14 6B kernel
dseldown said:
Look below to see what ROM I'm running, I get great reception and lock within 10 sec's 15 max, and I use it all the time to pilot my large car around for a living!!.
Of course I did the antenna contact mod using a piece of plastic shaped just right to keep contact pressure solid so the signal is strong!!
If you haven't done the GPS antenna Mod yet your never gonna get a good signal until you do, This is a known Samsung design flaw!
Once you do it and set the right SW up and region where you operate at, you'll see a huge improvement. That is if you have a T-959 Vibrant??
Click to expand...
Click to collapse
doih! i've done the GPS hardware bending thingy but NEVER thought of puting a tiny piece of plastic to keep the presure up .... maybe that will help with my accuracy.
thanks!!!
Wow - I just did the hardware fix, and it's like night and day! Thanks for the advice!
Sent from my SGH-T959 using XDA
GPS with ICS Passion - Different Kernels - Rebooting Seems to Work
With several Kernels I have been able to get a quick lock right after I flash. After a day or 2, I check and nothing. Tonight I checked after I had flashed Kiss 5.1 a few days ago and nothing, I rebooted and got a quick lock again. After a 1/2 hour or so, nothing again, rebooted and got another quick lock. I got my phone in Feb 2011 and have not tried any hardware fix. Any suggestions?
Have so far had time to try ICZen, ICS Passion, and just flashed SlimICS 3.1 a minute ago.
No problem here with GPS, I was running Glitch on ICZ and Passion. I'm keeping Slim on the stock rom kernels and GPS is quite snappy.
I've flashed all my roms after a clean wipe/format. I've had little to no problem every time I do.
ICS Passion w/Kiss 5.1
I did the lifting of the GPS tab on my phone as a hardware fix and after phone settles for any time I have to reboot to view satellites and get a lock. Any suggestions?

BOUNTY - Make Compass work in CM 12.1

The CM 12.1 ROM for jfltevzw is golden except for the compass. This compass has been an issue for over an year now. I am starting a bounty to try to get this fixed. I will include some relevant informational post quotes below.
Rajones19 summarized the state of the compass on CM for jfltevzw
rajones19 said:
The last time the compass worked correctly for me was on CM11 M9, build 08/04, using Faux123's kernel - faux123-018u. Compass was working on CM10, broken on CM11 unless you replaced the kernel. Functionally was permanently broken when the change was made that disallowed 3rd party kernels in August of last year. I still have that kernel, if it would be of help to you.
The compass appears to work when you are moving, since the GPS actually provides directional data when in motion. When you are standing still, relying on the magnetic sensor for directional data, that is when the problem begins. Compass apps like GPS Status and Toolbox report compass headings in any number of directions, none of which are correct. The directional data provided to other apps that access the compass - the geocaching app, for example, or any of the astronomy apps like Google Sky, is always 180 degrees off. If this was ever fixed, I would be the happiest man in southeast Michigan
In any case, thanks for all you do. It is much appreciated.
Click to expand...
Click to collapse
AntaresOne says the compass works in his CM 12.0 nightlies for jfltexx and expects it to work on jfltevzw but it did not work when I tried his 'optimized CM 12 ROM' which is compatible with all jflte variants
AntaresOne said:
With Smart Compass:
After calibration (by virtually drawing a horizontal 8 on air) it works very well, tested on jfltexx which shares the same Compass chip with other variants
Inviato dal mio GT-I9505
Click to expand...
Click to collapse
Contributions-
phonedawg - $50
vanberge - $25
FernBch -$25
Please PM me if you wish to contribute
I am not going to be a contributor here, because I finally dumped the S4 and moved on. But I would be very curious to know if the compass on AntaresOne's build is actually 100% working, or if it just appears to work after a cursory test with Smart Compass. The real error shows up when you start using other 3rd party apps that rely on the magnetic sensor for directional information. I am not doubting AntaresOne, nor casting doubt on his work - I used his ROMs for quite sometime, and they were stellar in every other way. For everybody's sake, I do hope they get it fixed.
rajones19 said:
I would be very curious to know if the compass on AntaresOne's build is actually 100% working, or if it just appears to work after a cursory test with Smart Compass
Click to expand...
Click to collapse
Tens of users say it works. I am almost certain it works. There might be a limitation in the jfltevzw phone that is causing the compass to not work.
Put me down for 25. PayPal
Sent from my SCH-I545 using XDA Free mobile app
vanberge said:
Put me down for 25. PayPal
Sent from my SCH-I545 using XDA Free mobile app
Click to expand...
Click to collapse
Thanks. Added your contribution.
I can do $25, too.
FernBch said:
I can do $25, too.
Click to expand...
Click to collapse
Thanks. Added your contribution
AntaresOne provided the following zips - Can anyone please try these and let me know if the compass works. I tried these but had no luck.
first flash this: https://www.androidfilehost.com/?fid=96042739161891216 reboot and test compass
if no luck,, flash this: https://www.androidfilehost.com/?fid=96042739161891217 and repeat
As far as I can tell, compass works on my du 5.1 builds.
I have flashed the above files. Each flashed started with a cache & davlik cache wipe.
The sensor hubs seemed like it wanted to work for about 2 seconds then the compass would not lock on a direction solidly. Third party apps report it as being 180 off. Calibrating the compass had no effect.
The S4 fix behaved the same as the usual.
Flashing both also did not work.
I also checked the sensors after each flash (used Advanced Sensor Tester). Each sensor has three color bars associated with it. I can see movement on the magnetic and gyroscope sensor on all three bars when moving the S4 around in various positions.
The orientation sensor shows movement on bars 2 & 3 when moving the S4 around. Bar number 1 only shows movement around the area that would be represented by 180 to 270 degrees (when facing north). Hope it makes sense, I don't know how else to describe it.
FernBch said:
I have flashed the above files. Each flashed started with a cache & davlik cache wipe.
The sensor hubs seemed like it wanted to work for about 2 seconds then the compass would not lock on a direction solidly. Third party apps report it as being 180 off. Calibrating the compass had no effect.
The S4 fix behaved the same as the usual.
Flashing both also did not work.
I also checked the sensors after each flash (used Advanced Sensor Tester). Each sensor has three color bars associated with it. I can see movement on the magnetic and gyroscope sensor on all three bars when moving the S4 around in various positions.
The orientation sensor shows movement on bars 2 & 3 when moving the S4 around. Bar number 1 only shows movement around the area that would be represented by 180 to 270 degrees (when facing north). Hope it makes sense, I don't know how else to describe it.
Click to expand...
Click to collapse
Thanks a lot. We will soon have more zips to test.
jbats said:
As far as I can tell, compass works on my du 5.1 builds.
Click to expand...
Click to collapse
jfltetmo? it works in my jfltexx too (cm-12.0/cm-12.1)
jfltevzw is the unique variant with this issue
I had issues with GPS and compass too. Flashing back to stock KitKat, enabling Location > Device Only, entering Maps, waiting for lock, and then immediately powering the phone off while GPS is locked, and reflashing root and recovery and then flashing custom ROM fixed all my issues. Compass is accurate, GPS is accurate. Has anyone attempted to do it this way? It should be noted that I am using the SPH-L720T Sprint tri-band edition (jfltespr) but my compass and GPS work absolutely flawlessly on DU 5.1 unofficial build.
SwoRNLeaDejZ said:
I had issues with GPS and compass too. Flashing back to stock KitKat, enabling Location > Device Only, entering Maps, waiting for lock, and then immediately powering the phone off while GPS is locked, and reflashing root and recovery and then flashing custom ROM fixed all my issues. Compass is accurate, GPS is accurate. Has anyone attempted to do it this way? It should be noted that I am using the SPH-L720T Sprint tri-band edition (jfltespr) but my compass and GPS work absolutely flawlessly on DU 5.1 unofficial build.
Click to expand...
Click to collapse
Is the compass correct with third party apps? The issue with jfltevzw (SCH-I545) is the compass orientation is usually 180 degrees off. The other issue that seems to affect us is the compass is only correct when moving (orientation is set by GPS). When stationary and even when walking the compass orientation is quite inaccurate.
I might as well chime in on this. I am running jfltevzw and I used to have issues on early builds of lollipop with my GPS not locking at all. Flashing back to either stock ROM or a aosp/cm KitKat build and then reflashing lollipop would fix the GPS for a while but the issue would return after flashing a new nightly. One of the developers over at Vanir found that it was the lollipop GPS blobs causing the issue. Once he started to build with the old KitKat blobs the issue was gone. I hope this helps you guys out.
Sent from my SCH-I545 using XDA Free mobile app
Triscuit said:
I might as well chime in on this. I am running jfltevzw and I used to have issues on early builds of lollipop with my GPS not locking at all. Flashing back to either stock ROM or a aosp/cm KitKat build and then reflashing lollipop would fix the GPS for a while but the issue would return after flashing a new nightly. One of the developers over at Vanir found that it was the lollipop GPS blobs causing the issue. Once he started to build with the old KitKat blobs the issue was gone. I hope this helps you guys out.
Click to expand...
Click to collapse
You are talking about the GPS. This thread is about the Compass. Not the same thing. While some have had trouble with the GPS (I was lucky, it always worked for me), the compass is an entirely different sensor, an entirely different problem, and no published fix for GPS that I ever read had any effect whatsoever on the compass.
FernBch said:
Is the compass correct with third party apps? The issue with jfltevzw (SCH-I545) is the compass orientation is usually 180 degrees off. The other issue that seems to affect us is the compass is only correct when moving (orientation is set by GPS). When stationary and even when walking the compass orientation is quite inaccurate.
Click to expand...
Click to collapse
My compass is accurate in every app I have used to test it (just installed a couple different compass apps to test). Not off by any amount, especially 180 degrees.
EDIT: and before you ask, my location was OFF during the tests.
SwoRNLeaDejZ said:
My compass is accurate in every app I have used to test it (just installed a couple different compass apps to test). Not off by any amount, especially 180 degrees.
EDIT: and before you ask, my location was OFF during the tests.
Click to expand...
Click to collapse
Yes, but your device is NOT the Verizon SCH-I545. The compass issue only seems to affect us. If you have one from Sprint, AT&T, or any other carrier it seems to work properly.
This is the last comment that I am aware of from our maintainer regarding the compass. It comes from post 135 of the CM12.0 thread
invisiblek said:
Well dang, you guys had me excited for the compass stuff =P
Its definitely the magnetic sensor that's jacked up. I actually wonder how well it works in stock.
Wonder if we need some updated firmware that we can't use because of the locked bootloader...
I'm thinking it may be an issue with our driver being updated in the kernel and our firmware not supporting it or something. I'll do some digging through the old stock kernel source, maybe I can hack something in for us.
[/url]
Click to expand...
Click to collapse
What needs to happen is the difference between us and them needs to be determined so maybe it can be figured out why it doesn't work properly for us. I may be way off here but I am curious if maybe one of the other sensors may be influencing the problem, too. I have seen some screwiness with the gyroscope as well (using advanced sensor tester).
FernBch said:
Yes, but your device is NOT the Verizon SCH-I545. The compass issue only seems to affect us. If you have one from Sprint, AT&T, or any other carrier it seems to work properly.
This is the last comment that I am aware of from our maintainer regarding the compass. It comes from post 135 of the CM12.0 thread
What needs to happen is the difference between us and them needs to be determined so maybe it can be figured out why it doesn't work properly for us. I may be way off here but I am curious if maybe one of the other sensors may be influencing the problem, too. I have seen some screwiness with the gyroscope as well (using advanced sensor tester).
Click to expand...
Click to collapse
Relax with the caps lock dude, I was just letting you know what I did to my S4, that had the same issue, that fixed it. If you don't want to try it, good for you.
SwoRNLeaDejZ said:
Relax with the caps lock dude, I was just letting you know what I did to my S4, that had the same issue, that fixed it. If you don't want to try it, good for you.
Click to expand...
Click to collapse
But I have tried it. And I did not mean to offend here.
I have gone as far using Odin to return to bone stock, reroot, recovery, etc. and the issue returns.
If anyone using the VZW variant has tried this and had success, I'm all ears. Maybe I missed something?

[Q] Lollipop Kernel With Working Compass?

I have been searching around since flashing KT Kernerl and DirtyUnicorn 5.1. I can't find a Kernel that has a working compass. Considering I use the S4 as a trail GPS on my bike, it's kind of important that the compass doesn't point in the opposite direction and randomly wander around in a circle like a drunk. Anybody know of a Kernel I might have missed that has fixed this issue? I've found that it's due to the use of unified kernels.

[Q] Compass

I'm wondering if anyone has found a solution for this compass calibration problem. If I orient my phone basically north/south the compass seems to be relative accurate. Otherwise it quickly gets off 180 degrees. I've seen this on KK & LP, multiple ROMS and multiple kernels. I'm suspecting it's a hardware issue but would love to hear from others.
What ROM are you using? This issue persisted in many ROMs for some time, especially CM and CM based ROMS, but has been fixed for 5-6 weeks now.
FernBch said:
What ROM are you using? This issue persisted in many ROMs for some time, especially CM and CM based ROMS, but has been fixed for 5-6 weeks now.
Click to expand...
Click to collapse
Stock TW ROMs. I noticed it on KitKat & it persists with Lollipop. It's strange that when my phone is oriented roughly N/S all is well but it goes wonky otherwise.
Sent from my SCH-I545 using XDA Premium HD app
Don't know about KK and otger ROMs, especially older ones but the latest LP CyanogenMod ROMs have been flawless for me.
Solved...
...for me at least.
A big thanks to @slopenut1 for pointing out the compass problem it due to the kernel. I flashed surge's stock kernel and the compass seems just fine. It seems there is a subtle hardware difference which trip up the kernels coming from other devices. The compass now may not be quite as good as the real thing but no more flipping around.
Try a different kernel. Fixed on 4.4.4 GPE with the ktoonsez kernel. Now on GPE 5.0.2 it's back.

Categories

Resources