Screen tears on xrandr orientation inverted

Bug #1395182 reported by Jeff Cook
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
Medium
xserver-xorg-video-intel (Ubuntu)
Confirmed
High
Unassigned

Bug Description

When xrandr -o inverted is run, the resulting image is split down the middle. This happens 95% of the time; it has worked once or twice without tearing. Rotation can be activated through unity-control-center Display Settings rotation field, and that reliably works fine. When xrandr -o normal is run, the display returns to normal (although bug #1376760 is observed). xrandr -o right and xrandr -o left also reliably work without issue; this only occurs on xrandr -o inverted. The same behaviors are observed with the longer form of the command xrandr --output eDP1 --rotation inverted, etc.

This has also been reported at https://github.com/pfps/yoga-laptop/issues/28, which uses xrandr commands to invert the display.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: xserver-xorg-video-intel 2:2.99.914-1~exp1ubuntu4.1
ProcVersionSignature: Ubuntu 3.16.0-24.32-generic 3.16.4
Uname: Linux 3.16.0-24-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Fri Nov 21 15:09:03 2014
DistUpgraded: Fresh install
DistroCodename: utopic
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:2217]
InstallationDate: Installed on 2014-11-21 (0 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
MachineType: LENOVO 20CDCTO1WW
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-24-generic.efi.signed root=UUID=d032fffc-748c-4ea7-9e61-3c53648c9e27 ro quiet splash vt.handoff=7
SourcePackage: xserver-xorg-video-intel
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/09/2014
dmi.bios.vendor: LENOVO
dmi.bios.version: B0ET22WW (1.09)
dmi.board.asset.tag: Not Available
dmi.board.name: 20CDCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: SDK0E50512 Std
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvrB0ET22WW(1.09):bd09/09/2014:svnLENOVO:pn20CDCTO1WW:pvrThinkPadS1Yoga:rvnLENOVO:rn20CDCTO1WW:rvrSDK0E50512Std:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 20CDCTO1WW
dmi.product.version: ThinkPad S1 Yoga
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.12+14.10.20140918-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.56-1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.3.0-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.3.0-0ubuntu3
version.xserver-xorg-core: xserver-xorg-core 2:1.16.0-1ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.9.0-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.4.0-2ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.914-1~exp1ubuntu4.1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.11-1ubuntu2
xserver.bootTime: Fri Nov 21 14:47:30 2014
xserver.configfile: default
xserver.errors:
 Wacom ISDv4 EC Pen stylus: Invalid type 'cursor' for this device.
 Wacom ISDv4 EC Pen stylus: Invalid type 'touch' for this device.
 Wacom ISDv4 EC Pen stylus: Invalid type 'pad' for this device.
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id 1079
 vendor LGD
xserver.version: 2:1.16.0-1ubuntu1

Revision history for this message
Jeff Cook (jeff-h) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Jeff Cook (jeff-h) wrote :

Created attachment 109827
screenshot of tearing effect

When xrandr -o inverted is run, the resulting image is split down the middle. This happens 95% of the time; it has worked once or twice without tearing. Rotation can be activated through unity-control-center Display Settings rotation field, and that reliably works fine. When xrandr -o normal is run, the display returns to normal (although bug #1376760 is observed). xrandr -o right and xrandr -o left also reliably work without issue; this only occurs on xrandr -o inverted. The same behaviors are observed with the longer form of the command xrandr --output eDP1 --rotation inverted, etc.

This has also been reported at https://github.com/pfps/yoga-laptop/issues/28, which uses xrandr commands to invert the display.

See also Launchpad: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1395182

lspci:

00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b) (prog-if 00 [VGA controller])

Screenshot attached.

Revision history for this message
In , Jeff Cook (jeff-h) wrote :

Woops, looks like that screenshot went up with the wrong mimetype. Can someone correct that?

Revision history for this message
In , Jeff Cook (jeff-h) wrote :

Created attachment 109828
screenshot of tearing effect

screenshot of tearing effect (correct mimetype)

Changed in xserver-xorg-video-intel:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Chris Wilson (ickle) wrote :
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → High
Revision history for this message
In , Jeff Cook (jeff-h) wrote :

Thanks for that Chris. Is there a recent patch I can try that is perhaps less "sketchy and completely broken"?

Revision history for this message
In , Chris Wilson (ickle) wrote :

Hmm, the other question here is whether fbc is enabled?

"FBC can show stale data when using 180 degree hardware rotation of the primary display plane.
WA: Do not enable FBC when using hardware 180 degree rotation on the primary display plane."

Revision history for this message
In , Jeff Cook (jeff-h) wrote :

I believe FBC is disabled. Here's what I found in /sys:

jeff@jeff-yoga:~$ sudo cat /sys/kernel/debug/dri/0/i915_fbc_status
FBC disabled: disabled per chip default
jeff@jeff-yoga:~$ sudo cat /sys/kernel/debug/dri/64/i915_fbc_status
FBC disabled: disabled per chip default

Changed in xserver-xorg-video-intel:
importance: Medium → Critical
Revision history for this message
In , Chris Wilson (ickle) wrote :

*** Bug 87662 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Chris Wilson (ickle) wrote :

Yikes, this regression made it into a stable release.

Revision history for this message
Andy Neitzke (neitzke) wrote :

Is the patch linked in comment #6 still the recommended fix?

Revision history for this message
In , Ander Conselvan de Oliveira (conselvan2) wrote :

(In reply to Chris Wilson from comment #8)
> Yikes, this regression made it into a stable release.

I was actually able to reproduce this with 3.14. I tried to reproduce this before with drm-intel-nightly on SNB, IVB and HSW, but failed. Turns out I needed a more recent xorg intel driver to uncover the bug. I bisected the first appearance of the bug to

commit 975b9798be77b30cbed485583d0ccb48318708f7
Author: Chris Wilson <email address hidden>
Date: Wed May 21 08:58:24 2014 +0100

    sna: Add support for Present

The problem goes away after commit

commit 105d478cdd70ac3b38be51c9014b22b7233c241e
Author: Chris Wilson <email address hidden>
Date: Wed Aug 6 09:10:30 2014 +0100

    sna: Enable kernel rotation support by default

but oddly, after

commit b6eeb7a1f7efa591504070b606be655e27e6e9c2
Author: Chris Wilson <email address hidden>
Date: Wed Nov 5 13:03:41 2014 +0000

    Disable DRI3 by default

turning the rotation on with xrandr causes a black screen that can be fixed by vt switching away and back to X.

Anyway, I haven't looked yet into why the support for the Present extension uncovers the bug, but it seems this bug has been in the kernel for a while.

Revision history for this message
In , Chris Wilson (ickle) wrote :

(In reply to Ander Conselvan de Oliveira from comment #9)
> (In reply to Chris Wilson from comment #8)
> > Yikes, this regression made it into a stable release.
>
> I was actually able to reproduce this with 3.14. I tried to reproduce this
> before with drm-intel-nightly on SNB, IVB and HSW, but failed. Turns out I
> needed a more recent xorg intel driver to uncover the bug. I bisected the
> first appearance of the bug to
>
> commit 975b9798be77b30cbed485583d0ccb48318708f7
> Author: Chris Wilson <email address hidden>
> Date: Wed May 21 08:58:24 2014 +0100
>
> sna: Add support for Present

I think that is a seperate bug, please could you file a new report with a full description of the behavior you see and a full debug log. (There is certainly a kernel regression due to planes)

Revision history for this message
In , Ander Conselvan de Oliveira (conselvan2) wrote :

(In reply to Chris Wilson from comment #10)
> (There is certainly a kernel regression due to planes)

Even so, the original report makes no mention of using nightly or a very recent kernel. Also, the link to github implies the problem started to happen after an upgrade from Ubuntu 14.04 to 14.10. The latter uses kernel 3.16 and xf86-video-intel version 2.99.914. I am able to reproduce the bug with that config, getting the screen divided horizontally like in the attached screenshot.

Adding

   Option "Present" "false"

to the device section of xorg.conf works around the problem.

Revision history for this message
In , Ander Conselvan de Oliveira (conselvan2) wrote :

Created attachment 111519
screenshot of the problem with kernel 3.16

Revision history for this message
In , Ander Conselvan de Oliveira (conselvan2) wrote :

Created attachment 111520
Xorg.log with --enable-debug=full

I tried to reproduce the problem with the driver compiled with --enable-debug=full. However, the session strangely dies after setting the rotation. There is no error reported in the log after setting rotation to inverted.

The log seems to indicate that a shadow buffer is being used since the rotation is not supported by the kernel.

Revision history for this message
In , Chris Wilson (ickle) wrote :

(In reply to Ander Conselvan de Oliveira from comment #11)
> (In reply to Chris Wilson from comment #10)
> > (There is certainly a kernel regression due to planes)
>
> Even so, the original report makes no mention of using nightly or a very
> recent kernel.

Duped the wrong bug. But since I was using this to track the kernel regression, hence the P1 blocker status, it would have been better to create a new bug.

Revision history for this message
In , Chris Wilson (ickle) wrote :

Then update the ddx...

Changed in xserver-xorg-video-intel:
importance: Critical → Medium
status: Confirmed → Fix Released
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.