[Dell XPS 15 9575] gnome-shell unrotates immediately after rotating

Bug #1797174 reported by Joe Barnett
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Won't Fix
Undecided
Unassigned
iio-sensor-proxy (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

on a dell xps 15 2-in-1 (model 9575), I've enabled iio-sensor-proxy functionality by doing:

modprobe intel-ish-ipc
echo "8086 a135" > /sys/bus/pci/drivers/intel_ish_ipc/new_id

This makes `monitor-sensor` display rotation events, and gnome-shell auto-rotate the screen upon receiving them. However, immediately after rotating, the screen rotates back to its normal orientation (unless I quickly lock rotation), displaying the following in journalctl:

Oct 10 09:06:19 taplop gnome-shell[2616]: Failed to apply DRM plane transform 1: Invalid argument
Oct 10 09:06:20 taplop kernel: [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).
Oct 10 09:06:20 taplop kernel: [drm] UVD and UVD ENC initialized successfully.
Oct 10 09:06:20 taplop kernel: [drm] VCE initialized successfully.
Oct 10 09:06:27 taplop kernel: amdgpu 0000:01:00.0: GPU pci config reset

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: gnome-shell 3.30.0-3ubuntu1
ProcVersionSignature: Ubuntu 4.18.0-8.9-generic 4.18.7
Uname: Linux 4.18.0-8-generic x86_64
ApportVersion: 2.20.10-0ubuntu11
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed Oct 10 09:06:40 2018
DisplayManager: gdm3
InstallationDate: Installed on 2018-09-26 (14 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to cosmic on 2018-09-28 (11 days ago)

Revision history for this message
Joe Barnett (thejoe) wrote :
Joe Barnett (thejoe)
summary: - gnome-shell unrotates immeditely after rotating
+ gnome-shell unrotates immediately after rotating
summary: - gnome-shell unrotates immediately after rotating
+ [Dell XPS 15 9575] gnome-shell unrotates immediately after rotating
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in iio-sensor-proxy (Ubuntu):
status: New → Confirmed
Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

Thank you. I had written bug #1792813 about the sensors not being found with kernel 4.18. This is fixed in the mainline 4.19 (see the other report).

The incorrect automatic back rotation also happens with 4.19. However, note that what exactly happens depends on whether the keyboard vs display angle is smaller or larger than 180 degrees. I am copying my description from the other bug with some edits for brevity and to fix errors:

monitor-sensor output detects the correct orientation in all attempts.
When the screen auto-rotates back, monitor-sensor does NOT output a switch to "normal". So I suppose the sensor outputs remain correctly detected and the switching back happens elsewhere.

The issue may be connected to a hardware quirk in how the rotation is implemented on the Dell XPS, which similarly also occurs in Windows (https://www.dell.com/community/XPS/Dell-XPS-13-9365-Rotation-lock-unavailable-grayed-out-EXPLAINED/td-p/6075400):
* Laptop mode, i.e. keyboard-to-screen angle SMALLER than 180 degrees: In Windows, this automatically engages the rotation lock, i.e. the screen does not rotate at all.
* Tent/tablet mode, i.e. keyboard-to-screen angle LARGER than 180 degrees: In Windows, this releases the rotation lock automatically.

In Ubuntu, the rotation lock in the Gnome panel does NOT automatically engage if the angle is smaller than 180 degrees, but rotation behavior depends on angle:

* Angle SMALLER than 180:
- Orientation "left-up": screen rotates to portrait correctly, but immediately switches back to normal.
- Orientation "right-up": screen rotates to portrait correctly and in most attempts stays like this, but occasionally it immediately switches back to normal.
- Orientation "bottom-up": screen rotates rotates upside-down correctly, but immediately switches back to normal.
- Orientation "normal": screen always rotates back correctly (if it didn't automatically switch back anyway).

* Angle LARGER than 180:
- Orientation "left-up": screen rotates to portrait correctly and in most attempts stays like this, but occasionally it immediately switches back to normal.
- Orientation "right-up": screen rotates to portrait correctly and apparently randomly either stays like this or immediately switches back to normal.
- Orientation "bottom-up": screen rotates rotates upside down correctly most of the time (but occasionally doesn't).
- Orientation "normal": screen always rotates back correctly (if it didn't automatically switch back anyway).

So the "left-up" and "right-up" behaviors seem somewhat (but not entirely) swapped depending on the keyboard-screen angle.

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

@Joe: Can you confirm that you see the unrotation behavior and the log entry,
"gnome-shell[5422]: Failed to apply DRM plane transform 1: Invalid argument"
only in a Wayland session?

I just realized that this is the case for me. In an X session, the rotation works perfectly whatever the display angle (below or above 180 degrees) and the error does not appear in the log.

Revision history for this message
Joe Barnett (thejoe) wrote :

I'll try to test on an X session in a bit. One thing I have noticed is that while I still get the log messages, the unrotate behavior seems much better when setting the `dc=0` amdgpu module parameter (was also behaving better with the module blacklisted, but not sure about log messages), as per comments in https://gitlab.gnome.org/GNOME/mutter/issues/357 and https://gitlab.gnome.org/GNOME/mutter/issues/365

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

I cannot reproduce this anymore on Ubuntu 19.04, gnome-shell 3.32

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

(I still get the "Failed to apply DRM plane", but the immediate unrotation does not happen anymore. This is at least in Wayland, could not check X)

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

Thank you for reporting this bug to Ubuntu.
Ubuntu 18.10 (cosmic) reached end-of-life on July 18, 2019.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in and change the bug status to Confirmed.

Changed in gnome-shell (Ubuntu):
status: Confirmed → Won't Fix
Changed in iio-sensor-proxy (Ubuntu):
status: Confirmed → Won't Fix
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.