Orientation lock not available (rotation/portrait lock)

Bug #1288332 reported by Matthew Paul Thomas
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
platform-api
Fix Released
Undecided
Gerry Boland
gsettings-ubuntu-touch-schemas (Ubuntu)
Fix Released
Undecided
Unassigned
qtmir (Ubuntu)
Fix Released
High
Gerry Boland
qtubuntu (Ubuntu)
Fix Released
Undecided
Gerry Boland
ubuntu-system-settings (Ubuntu)
Fix Released
Low
Jonas G. Drange
ubuntu-ui-toolkit (Ubuntu)
Opinion
Undecided
Unassigned
unity8 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu Trusty r188

1. Open System Settings.
2. Try to turn on Orientation Lock.

What happens: There's no such setting.

<https://wiki.ubuntu.com/SystemSettings#phone-quick-access>: "The quick access area is a group of list items at the top of the overview screen. It should always contain 'Orientation Lock'..."

Related branches

Revision history for this message
Iain Lane (laney) wrote :

It is actually, on the system-settings side. It's hidden because unity8 doesn't respect the setting. Launch system-settings with USS_SHOW_ALL_UI=1 in its environment if you want to see that.

The setting to look at is: gsettings: com.ubuntu.touch.system rotation-lock

Adding unity8 to this bug, because surprisingly I cannot find another one.

summary: - Orientation lock not implemented (rotation/portrait lock)
+ Orientation lock not available (rotation/portrait lock)
Revision history for this message
Michał Sawicz (saviq) wrote :

This is indeed not yet implemented in unity8, this will also require changes in the toolkit, as shell will need to mediate orientation between apps depending on sensors, orientation lock and relation between apps (i.e. app in mainstage, app in sidestage, but only one supports rotation).

Marked as affecting toolkit, too.

Changed in unity8 (Ubuntu):
status: New → Confirmed
Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

From bug 1308376: (includes ideas for reducing the impact without the need to fully implement rotation lock)
-----
The #1 task I use my Android phone for is reading books. This frequently happens while laying down. However, I can't do this on Ubuntu Touch because the text automatically rotates according to gravity. This applies to most of the other things I use a smartphone for too -- I keep rotation disabled about 99% of the time, and only enable it on rare occasion if I need to view a wide image or something. Similarly, my roommate keeps hers in landscape mode almost all the time, even if it means having the physical keyboard slid out while not in use (to force the screen orientation).

Could we have an option to force the rotation to a desired setting? Even better, a convenient tool to manually change it when desired, as an indicator or similar?

If not, the problem could at least be reduced by making rotation a bit less sensitive. For example, instead of rotating at exactly 45 degrees, make the device keep its current orientation until the reading passes ~80 degrees. Then hold it in that orientation until it goes back to ~10 degrees or so? We could perhaps even make it require going a little past 90 (and then optionally back), to effectively change the gesture from a simple tilt to more of a shake. Still easy to do, but more explicit and less accidental, and more friendly for people laying down.

tags: added: flo mako qa-touch u2
Revision history for this message
Michał Sawicz (saviq) wrote :

Related bug: bug #1317243

Revision history for this message
Julien Funk (jaboing) wrote :

It's worth mentioning that on the dogfooding bug list this is voted one of the highest bugs that impact the dogfooding experience. It may be worth bumping the priority.

Revision history for this message
Michał Sawicz (saviq) wrote :

What is "this", do you really mean the orientation lock, or maybe bug #1286150? Or maybe app-sourced rotation inhibition?

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

I'd be happy with a single, global setting to force orientation to stay at one setting, because one of the main things I do with a phone or tablet is reading in bed before I sleep and a pretty much never want anything but portrait mode. A complete solution would require much more, but it'd be a good start to simply let the user choose portrait or landscape (or 0/90/180/270), and force the setting globally. I don't mind if it requires a unity8 restart to take effect, or if it disables rotation in all apps which rely on the toolkit for rotation info/events.

The parts involved in a complete solution, if I understand correctly, are:
  - Use the cooked orientation value from Android instead of a raw accelerometer reading. Resolves bug 1286150.
  - Possibly increase the angle and time delay required to rotate in auto-rotate mode. Also resolves bug 1286150. Even better if it has two different sensitivity settings, one for turning at ~60 degrees, and one for turning at ~105.
  - Add a setting for shell orientation (auto, or any cardinal direction).
  - Add a setting for default app orientation (applies to all apps which don't explicitly override it).
  - Give apps a method of overriding the default, so that the behavior can be determined per-app when relevant, but the app would have to explicitly support this.
  - Possibly add some friendly UI for quickly changing orientation mode without having to dive into the settings app.

Revision history for this message
Michał Sawicz (saviq) wrote :

> - Add a setting for shell orientation (auto, or any cardinal direction).

I don't think we'll have a "choose orientation" setting, rather an orientation lock, which basically means you'd lock your device in whatever orientation is current.

> - Possibly add some friendly UI for quickly changing orientation mode without having to dive into the settings app.

I imagine we should have an orientation lock toggle in one of the indicators for quick access, I haven't seen it in any of the designs, though.

tags: added: avengers-3
Changed in unity8 (Ubuntu):
assignee: nobody → Daniel d'Andrada (dandrader)
assignee: Daniel d'Andrada (dandrader) → nobody
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

are we doing this for rtm?

Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Jonas G. Drange (jonas-drange)
Changed in ubuntu-system-settings (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Michał Sawicz (saviq) wrote :

We met today about this, here's the output:

Long-term we need to support both orientation and primaryOrientation from the Screen Qt object, to support both shell and app rotation (shell rotation the general use case, app rotation e.g. camera only rotating buttons):
http://qt-project.org/doc/qt-5/qml-qtquick-window-screen.html#orientation-prop

Shorter term, we'll move the orientation from qtubuntu to centralize in qtmir, passing the orientation value to apps over the Mir API, meaning we need platform-api, qtubuntu and qtmir changes. Gerry is going to coordinate that work.

The orientation lock value (it needs to be one of the 4 available orientations to store and recover between sessions, for example) will be stored in gsettings, written to by settings app, reset by settings app and $indicator, TBC.

Changed in qtmir:
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → High
assignee: nobody → Gerry Boland (gerboland)
Changed in unity8 (Ubuntu):
status: Confirmed → Opinion
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → Opinion
Revision history for this message
Michał Sawicz (saviq) wrote :

Longer-term we'll also need the application to be able to communicate its supported orientations and shell vs. app orientation preference.

Changed in ubuntu-system-settings (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gsettings-ubuntu-touch-schemas - 0.0.2+14.10.20140813-0ubuntu1

---------------
gsettings-ubuntu-touch-schemas (0.0.2+14.10.20140813-0ubuntu1) utopic; urgency=low

  [ jonas-drange ]
  * [system] swap boolean rotation-lock for enumerated type orientation-
    lock (LP: #1288332)
 -- Ubuntu daily release <email address hidden> Wed, 13 Aug 2014 18:49:43 +0000

Changed in gsettings-ubuntu-touch-schemas (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings - 0.3+14.10.20140815-0ubuntu1

---------------
ubuntu-system-settings (0.3+14.10.20140815-0ubuntu1) utopic; urgency=low

  [ Michael Terry ]
  * Make the wizard properly handle devices with zero, one, or two SIM
    modem slots. Previously it assumed exactly one slot. (LP: #1332583)

  [ jonas-drange ]
  * [main panel] point rotation lock at new backend and add (skipped)
    tests (LP: #1288332)
 -- Ubuntu daily release <email address hidden> Fri, 15 Aug 2014 16:45:51 +0000

Changed in ubuntu-system-settings (Ubuntu):
status: In Progress → Fix Released
Gerry Boland (gerboland)
Changed in qtmir:
status: Triaged → In Progress
Changed in platform-api:
assignee: nobody → Gerry Boland (gerboland)
Changed in qtubuntu:
assignee: nobody → Gerry Boland (gerboland)
Changed in platform-api:
status: New → In Progress
Changed in qtubuntu:
status: New → In Progress
Revision history for this message
Gerry Boland (gerboland) wrote :

> The orientation lock value (it needs to be one of the 4 available
> orientations to store and recover between sessions, for example)
> will be stored in gsettings, written to by settings app, reset by
> settings app and $indicator, TBC.

I agree with everything except this bit. I think the GSetting API should be a boolean, orientation lock on/off.

It will be up to shell to save the last locked orientation somewhere separately, and use that if session restored.

Reason I propose this is: applications are not guaranteed to know the orientation of the shell/device. Main example is tablet side-stage apps: they will be told they're portrait (as they would be on the phone), but the device is actually landscape.

IMO it really makes more sense for shell to just listen for an orientation lock on/off switch, and just do the right thing. I think otherwise there's a danger USS might choose the wrong orientation for shell to lock in.

Revision history for this message
Michał Sawicz (saviq) wrote : Re: [Bug 1288332] Re: Orientation lock not available (rotation/portrait lock)

> I agree with everything except this bit. I think the GSetting API should
> be a boolean, orientation lock on/off.
>
> It will be up to shell to save the last locked orientation somewhere
> separately, and use that if session restored.
>
> Reason I propose this is: applications are not guaranteed to know the
> orientation of the shell/device. Main example is tablet side-stage apps:
> they will be told they're portrait (as they would be on the phone), but
> the device is actually landscape.
>
> IMO it really makes more sense for shell to just listen for an
> orientation lock on/off switch, and just do the right thing. I think
> otherwise there's a danger USS might choose the wrong orientation for
> shell to lock in.

Hmm indeed, maybe in that case we just need a DBus API on the shell
(bool property) that the settings app/indicator will toggle, and shell
will do all it needs (using the already-available gsetting)?

Revision history for this message
Gerry Boland (gerboland) wrote :

That's my plan.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

The orientation lock option is there in system-settings now but doesn't work.

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

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

Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in qtubuntu (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu - 0.60+14.10.20140922.1-0ubuntu1

---------------
qtubuntu (0.60+14.10.20140922.1-0ubuntu1) utopic; urgency=low

  [ Gerry Boland ]
  * Expose Mir surface orientation property instead of connecting to
    orientation sensor directly (LP: #1288332)
 -- Ubuntu daily release <email address hidden> Mon, 22 Sep 2014 17:32:25 +0000

Changed in qtubuntu (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.4.3+14.10.20140922.1-0ubuntu1

---------------
qtmir (0.4.3+14.10.20140922.1-0ubuntu1) utopic; urgency=low

  [ Gerry Boland ]
  * Expose Mir surface orientation property to QML (LP: #1288332)
  * Add splash screen properties to Application

  [ Florian Boucault ]
  * Add splash screen properties to Application

  [ Daniel d'Andrada ]
  * Add splash screen properties to Application
 -- Ubuntu daily release <email address hidden> Mon, 22 Sep 2014 17:38:51 +0000

Changed in qtmir (Ubuntu):
status: Confirmed → Fix Released
Changed in qtmir:
status: In Progress → Fix Released
Changed in qtubuntu:
status: In Progress → Fix Released
Changed in platform-api:
status: In Progress → Fix Released
Changed in unity8 (Ubuntu):
status: Opinion → Fix Released
Michał Sawicz (saviq)
Changed in qtubuntu (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
no longer affects: qtubuntu
Michał Sawicz (saviq)
Changed in qtmir (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
importance: Undecided → High
no longer affects: qtmir
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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