Screen rotates itself to landscape when the phone is laying on the desk

Bug #1474225 reported by Daniel van Vugt
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
qtubuntu-sensors
New
Undecided
Unassigned
unity8 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Screen rotates itself to landscape when the phone is laying on the desk.

I might be mistaken but this bug seems to be a new issue that arrived with the full shell rotation feature in wily. Using a phone while it's laying flat on the desk it sometimes rotates itself to landscape.

Seems like we might have some over-sensitive accelerometer logic.

$ system-image-cli -i
current build number: 255
device name: mako
channel: ubuntu-touch/devel-proposed/ubuntu
last update: 2015-07-14 03:41:29
version version: 255
version ubuntu: 20150714
version device: 20150708
version custom: 20150714

description: updated
Revision history for this message
Albert Astals Cid (aacid) wrote :

Can you define "the screen"?

Is it the apps screen? The dash screen? The greeter screen?

Changed in unity8 (Ubuntu):
status: New → Incomplete
Revision history for this message
kevin gunn (kgunn72) wrote :

adding qtubuntu-sensors, b/c this would be sensitivity of the trigger, not unity8's decision

summary: - Screen rotates itself to landscape when the phone is laying on the desk
+ [mako] Screen rotates itself to landscape when the phone is laying on
+ the desk
Revision history for this message
kevin gunn (kgunn72) wrote : Re: [mako] Screen rotates itself to landscape when the phone is laying on the desk

this also seems to be mako only, at least krillin seems very robust as i'm testing right now.
I will test mx4 in a moment, if i find it's too sensitive i will add. For now i would consider this mako only and as such low priority isssue

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just reproduced on arale too.

Steps to reproduce (actually something I do regularly):
  1. Open Settings
  2. With your right hand put the phone down on the desk to your far right.

In doing so, you will often find you're tilting it slightly to the left, which makes the phone enter landscape mode. However because it doesn't respond the the rotation immediately, it appears to be rotating itself the moment you've put the phone down.

So it's a simple matter of we're not thresholding the accelerometer adequately -- we're too sensitive to brief tilting.

Changed in unity8 (Ubuntu):
status: Incomplete → New
summary: - [mako] Screen rotates itself to landscape when the phone is laying on
- the desk
+ Screen rotates itself to landscape when the phone is laying on the desk
summary: - Screen rotates itself to landscape when the phone is laying on the desk
+ Unity8 is over-sensitive to brief (accidental) tilting, making the
+ screen rotate when you don't want it to.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

New test case - more worrying the screen rotates itself after having laid on the desk a while:

1. Open the app scope
2. Shake the phone and put in on the desk kind of quickly (a protective case is recommended) such that the left edge of the phone touches the desk before the right.
3. Wait a few seconds making sure the screen is not rotating while the phone lays on the desk.
4. Tap the Settings icon.

Expected: Rotation does not change after Settings opens.
Observed: Screen rotates to landscape as soon as Settings opens.

summary: - Unity8 is over-sensitive to brief (accidental) tilting, making the
- screen rotate when you don't want it to.
+ Screen rotates itself to landscape when the phone is laying on the desk
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Reproduced on arale using the new test case in comment #5.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think the sensors are fine. It's just a logic problem in Unity8/QtMir.

Changed in unity8 (Ubuntu):
importance: Undecided → Medium
Changed in qtubuntu-sensors:
status: New → Invalid
Revision history for this message
Michael Zanetti (mzanetti) wrote :

So what's happening here is that you tell the sensors that the phone would be in landscape position (by shaking it), but you have an app focused which forces the shell to stick with portrait. Then, you start an app that supports landscape and unity will do what you asked it for, rotating to landscape.

Changed in unity8 (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The bug needs to be fixed somewhere. It can't be invalid in all projects.

Changed in unity8 (Ubuntu):
status: Invalid → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh actually it might be lack of thresholding in qtubuntu-sensors.

Changed in qtubuntu-sensors:
status: Invalid → New
Changed in unity8 (Ubuntu):
status: Triaged → New
Revision history for this message
Michael Zanetti (mzanetti) wrote :

there is thresholding in the sensors... which is exactly the cause of this "bug".

When shaking, you make the threshold switch to landscape and by putting it flat down on the desk you keep it that way, not allowing the threshold to be hit to switch back to landscape. You just don't see it, because you're using an app that forces locked to portrait (the dash for example). As soon as you allow unity to rotate (by launching the settings app) it will catch up with what the sensors state is => landscape.

Now, one way to get around the situation would be to disable the sensors while unity is locked to some orientation. This however seems quite tricky, as on one hand that would need to be synced with what sensors tell apps, but also apps might still want to know the physical orientation even though locked to some orientation.

IMO this is working as expected, even though I agree it can cause some oddities like unintentional shaking. But in the end it's really what you tell the device to do. As an analogy, you're sort of asking for a mechanism to distinguish accidental display taps from intentional ones.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I agree if the user is a robot then it's not a bug. The user would be putting the phone down on the table holding it perfectly level during the action.

If the user is a human however, they won't often hold the phone level while placing it down. So we need some better heuristic somewhere...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.