** Description changed:

  [ Impact ]
  * Automatic screen rotation does not work at all on affected tablets. When 
the user turns the tablet, the screen stays in the same orientation.
  
  * The same hardware rotates correctly on Ubuntu 24.04 (mutter 46.2).
  
  On some tablets and convertibles, the accelerometer comes from the Intel
  Sensor Hub (ISH) through iio-sensor-proxy. On these machines the sensor 
appears
  *late* — the GNOME session is already in tablet mode before the accelerometer
  is ready.
  
  In mutter 50 this ordering breaks an internal inhibit/uninhibit counter in the
  orientation manager. `update_panel_orientation_managed()` calls
  `uninhibit_tracking()` first, before the matching `inhibit` is pushed, so
  `inhibited_count` goes down to -1. The code that claims the sensor only runs
  when `inhibited_count == 0`, so mutter never claims the accelerometer and the
  screen never rotates.
  
  The problem is completely silent. Stock mutter prints no warning and no error.
  For the user, auto-rotate just does nothing when the tablet is turned, even
  though iio-sensor-proxy is working, the panel is orientation-managed, tablet
  mode is on, and orientation lock is off.
  
- 
  [ Test Plan ]
  
  Use an affected device (a tablet/convertible with an Intel ISH
  accelerometer) on Wayland GNOME session.
  
  1. Enable Auto Rotate in the system settings menu.
  2. Physically rotate the tablet 90°.
  3. Read the current transform: `gdctl show | grep Transform`
  
  Without the fix: the transform stays `normal` no matter how you turn the
  tablet. The screen never rotates, and nothing is logged.
  
  With the fix: the transform follows the physical orientation
  (`normal` ↔ `90` / `180` / `270`) and the screen rotates.
  
  [ Where problems could occur ]
  
- TBD
+ The patch changes the accounting of mutter’s orientation-tracking
+ inhibit counter. If this accounting is wrong, Mutter may think rotation
+ is still inhibited when it should claim the accelerometer.
  
  [ Other info ]
  
  - Upstream issue: https://gitlab.gnome.org/GNOME/mutter/-/issues/4350
  - Upstream fix (merge request):
-   https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4962
-   — "backends/monitor-manager: Fix auto-rotate on phones without tablet mode 
switch"
+   https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4962
+   — "backends/monitor-manager: Fix auto-rotate on phones without tablet mode 
switch"
  - MR!4962 was verified to fix the issue.

** Summary changed:

- [Draft] auto-rotate fails on tablets whose accelerometer appears late
+ auto-rotate fails on tablets whose accelerometer appears late

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2161055

Title:
  auto-rotate fails on tablets whose accelerometer appears late

To manage notifications about this bug go to:
https://bugs.launchpad.net/mutter/+bug/2161055/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to