Bug 89904 - [IVB] intermittent return from blank shows non-rotated monitors glitch
Summary: [IVB] intermittent return from blank shows non-rotated monitors glitch
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-04 13:42 UTC by Chris Bainbridge
Modified: 2015-04-06 13:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
kernel.log (34.85 KB, text/plain)
2015-04-04 13:42 UTC, Chris Bainbridge
no flags Details
xorg.log (1.05 MB, text/plain)
2015-04-04 13:43 UTC, Chris Bainbridge
no flags Details

Description Chris Bainbridge 2015-04-04 13:42:53 UTC
Created attachment 114863 [details]
kernel.log

IvyBridge Macbook with triple rotated monitors (--rotate left). TearFree enabled. Latest git kernel and xorg intel driver.

Turn off screensaver/lock, then do:

$ xset s blank
$ xset s 5

Now wait for screen to blank, move mouse, wait for blank...

At some point the monitors will unblank and the displays will be showing with no rotation (--rotate normal). Moving the mouse to a monitor and clicking on it seems to trigger a redraw back to the rotated state.

Happens in XFCE and Gnome, kernel 3.16.0 and 4.0.0-rc6+. 

It is intermittent and sometimes difficult to trigger. On test in XFCE, it occurred 3 times out of 48. On Gnome test it seems easier to trigger, occurred 7/15 times.

Think I managed to get Xorg and kernel logs at the right time.
Comment 1 Chris Bainbridge 2015-04-04 13:43:12 UTC
Created attachment 114864 [details]
xorg.log
Comment 2 Chris Wilson 2015-04-05 16:54:14 UTC
Hmm the craziness in the other bug was due to bad interaction with the swcursor which should not apply here. :|

However I can hope so it is worth confirming this is still a problem.
Comment 3 Chris Wilson 2015-04-05 17:16:36 UTC
My guess is that the initial content supplied for switching on the CRTC doesn't represent the transformed view and the delay between the update to the real output is noticeable (even delayed until the next redraw far in the future).
Comment 4 Chris Bainbridge 2015-04-06 10:36:46 UTC
Unfortunately the bug is still present. I guess the screensaver/screenlock usually trigger a full redraw of the screens which is why this only gets noticed when the user is using blank only. Odd that it happens more often in Gnome than XFCE though.
Comment 5 Chris Wilson 2015-04-06 13:12:02 UTC
Ok, I noticed that it wasn't taking account of the rotation flag when choosing the initial contents for the scanout when waking up - so it was copying the frontbuffer without rotation onto the RandR shadow scanout before binding it to the CRTC. We did promptly try to redisplay the outputs (~16ms later but that is mostly due to the verbosity of the logging and CRTC enabling), but

[  2535.903] sna_mode_redisplay: shadow idle, skipping update

so that means the unrotated content would persist until redraw. I believe I understand the problem correct (kudos for getting the right bit of the log!):

commit e74ff581449e92d7933da1b5df6680cb880fc454
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Apr 6 13:58:35 2015 +0100

    sna: Force the TearFree redisplay when populating a rotated configuration
    
    We have to disable the "shadow idle; skipping" test if the CRTCs are
    showing stale content following a sna_crtc_attach().
    
    Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=89904
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 6 Chris Bainbridge 2015-04-06 13:37:20 UTC
Tested for 5 minutes with 5s between each blank and everything was perfect.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.