Open Bug 833038 Opened 11 years ago Updated 2 years ago

Device Motion (Sudden motion sensor) doesn't send data.

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: jlmendezbonini, Unassigned)

Details

While working on bug 793728, I noticed that device motion events are not reporting data. 

Hardware: MacBook 13-inch, Aluminum, Late 2008. The computer is placed on top of a firm desk.
Test webpage: http://www.html5rocks.com/en/tutorials/device/orientation/devicemotionsample.html for my testing. 

This is what I've found out so far:

Firefox 12 
Reports data with the following values and are consistent:
accelerationIncludingGravit:   [0,0,1]
Calculated Left-Right Tilt:     0
Calculated Front-Back Tilt:     90

Firefox 15,16,17
Reports data but with different values than Firefox12. The values keep changing erratically even while the laptop isn't moved.
accelerationIncludingGravit:   [0,-1,10]
Calculated Left-Right Tilt:     -1
Calculated Front-Back Tilt:     85

Firefox 18.0.1
No data reported.

Nightly Debug (build this morning). 
No data reported.
Any chance you could find the regression range for this bug among mozilla-central nightlies?
Another thing:

What version(s) of OS X did you test on?  Testing on a Retina MacBook Pro running OS X 10.7.5, I couldn't get any intelligible results with FF 18, FF 17 or FF 12.
I can reproduce something like what you report on OS X 10.6.8:

Firefox works "normally" up through FF 13.0.1.  In FF 14.0.1 through FF 17.0.1 the values keep changing erratically by small amounts (though they're generally correct).  In FF 18.0.1 your testcase doesn't work at all.

Do you know where the code lives that supports device motion events?  Sounds like Apple has pulled the rug from under it as of OS X 10.7.

And it sounds like it isn't often used -- if it's not worked normally since FF 14, and doesn't work at all on OS X 10.7 and up.
Status: UNCONFIRMED → NEW
Ever confirmed: true
>Any chance you could find the regression range for this bug among mozilla-central nightlies?
I was considering it but I wanted to make sure it wasn't only me experiencing the problem before investing time on it.

>What version(s) of OS X did you test on? 
10.8.2

>Do you know where the code lives that supports device motion events?
https://mxr.mozilla.org/mozilla-central/source/hal/cocoa/

>And it sounds like it isn't often used -- if it's not worked normally since FF 14, and doesn't work at all on OS X 10.7 and >up.
Yes, I agree. I came across it by chance while working out another bug.  Also, AFAIK Firefox is the only desktop browser that supports or, at least, did support the specification.
Steven, apparently Apple removed/disabled SMS at some point for SSD-only MacBooks (like the Retina MBP). Mine (on OS X 10.8.2) doesn't have the sensor at all. You said you get results in Firefox <13, can you try running |pmset -g| and seeing what the "sms" key is set to in that configuration? I wonder if it's an OS X thing or the sensor has actually been removed from the SSD MacBooks.
From what you say, some of the things I said in comment #3 are probably wrong.  I've got two MacBook Pros -- one of which has an SSD (and is also a Retina MBP, and can run OS X 10.7 and 10.8), and the other which has an ordinary hard drive (and can run OS X 10.6 through 10.8).  I'll test more thoroughly on those two machines, sometime today or tomorrow.

> can you try running |pmset -g|

I don't understand what you're asking me to do.
>> can you try running |pmset -g|
>
> I don't understand what you're asking me to do.

Never mind, I figured it out.
I've now done more tests.

On my Retina MacBook Pro (with an SSD), |pmset -g| never lists an sms key on either OS X 10.7.5 or OS X 10.6.8.

On my "15-inch early 2011" MacBook Pro (with a conventional hard drive), |pmset -g| always lists an sms key, on OS X 10.6.8, 10.7.5 and 10.8.2.

On my Retina MacBook Pro, I don't get intelligible results from this bug's testcase with any version of OS X (10.7.5 or 10.8.2).

On my "15-inch early 2011" MacBook Pro I get the results I described in comment #3 in all versions of OS X that it can run (10.6.8, 10.7.5 and 10.8.2).

So Apple hasn't dropped support for the sudden motion sensor in current versions of OS X.  But it does seem that the hardware is missing from Retina MacBook Pros (with SSDs) -- as it also is from Mac Pro desktops (judging by the results of running |pmset -g| on those machines).
> On my Retina MacBook Pro (with an SSD), |pmset -g| never lists an
> sms key on either OS X 10.7.5 or OS X 10.6.8.

I should have said "on either OS X 10.7.5 or 10.8.2".
Thanks for the research. Your findings are in accordance with https://support.apple.com/kb/HT1935

I don't think we should be sending the orientation events for the unsupported configurations. Can we turn this bug into "Don't send device orientation events when Sudden Motion Sensor is not available"?
>Can we turn this bug into "Don't send device
> orientation events when Sudden Motion Sensor is not available"?

Why? I agree that no events should be sent when the SMS is not available but, unless I'm missing something, the initial bug is different: the sudden motion sensor is available and active but no data is displayed.

$ pmset -g | grep sms
 sms                  1
$
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.