Bug 81886

Summary: After rotating the screen the cursor is doubled
Product: xorg Reporter: brbrbr.10.Toranaga-San
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Description Flags
A screenshot illustrating the problem none

Description brbrbr.10.Toranaga-San 2014-07-29 19:45:22 UTC
Created attachment 103655 [details]
A screenshot illustrating the problem
Comment 1 brbrbr.10.Toranaga-San 2014-07-29 19:50:27 UTC
If you turn the screen by 90 degrees and then turn it back to normal, a second cursor (rotated by 90 degrees as well) appears.

To reproduce:

xrandr --output <output> --rotate left

# do something, click a few buttons...

xrandr --output <output> --rotate normal

The attached screenshot shows the problem. (Sorry for the quality, capturing the cursor as well is apparently pretty hard to do , even with disabled hardware cursor)


xorg-xrandr 1.4.2
xorg-server 1.16.0
xf86-video-intel 2.99.914
Comment 2 brbrbr.10.Toranaga-San 2014-07-29 19:52:35 UTC
Link to the picture: http://www.image-share.com/ijpg-2643-6.html
Comment 3 Chris Wilson 2014-07-29 20:11:05 UTC
Please try (xf86-video-intel):

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 8964e77..eed68d3 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4294,7 +4294,7 @@ static struct sna_cursor *__sna_get_cursor(struct sna *sna, xf86CrtcPtr crtc)
                image = sna->cursor.scratch;
                cursor->last_width = cursor->last_height = size;
-       if (width < cursor->last_width || height < cursor->last_height)
+       if (width < cursor->last_width || height < cursor->last_height || rotation != cursor->rotation)
                memset(image, 0, 4*size*size);
        if (rotation == RR_Rotate_0) {
                if (argb == NULL) {
Comment 4 brbrbr.10.Toranaga-San 2014-07-29 21:44:31 UTC
Well, I (manually) patched sna_display.c and recompiled the driver. As far as I can see the fix works. Thanks a lot for the quick response, I have never seen a bug fixed 5 hours after the initial report. Very impressive :)
Comment 5 Chris Wilson 2014-07-30 05:58:18 UTC
commit a88795c64123e4084044451d8861838ea904abd9
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jul 29 21:11:09 2014 +0100

    sna: Clear cursor image after rotation
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81886
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 6 elichai2 2015-04-08 17:56:19 UTC
This bug still affects me.

Description:	Ubuntu 14.10
Linux Lenovo-G510 3.16.0-34-generic #45-Ubuntu SMP Mon Mar 23 17:21:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Comment 7 Chris Wilson 2015-04-08 18:10:04 UTC
Yet the bug is fixed upstream.

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.