after a screen rotation we get a double mouse pointer

Bug #1376760 reported by Nicolas Produit on 2014-10-02
This bug affects 38 people
Affects Status Importance Assigned to Milestone
Fix Released
xserver-xorg-video-intel (Ubuntu)
Robert Hooker
xserver-xorg-video-intel-lts-utopic (Ubuntu)

Bug Description

On ubuntu version 14.10
after a screen rotation when we come back to normal rotation our mouse pointer is doubled: the old
rotated one and the actual one.
This bug was already reported in:
with a complete solution.
I checked that code compiled for 14.10 does not contain the fix in file:

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: xserver-xorg-video-intel 2:2.99.914-1~exp1ubuntu3
Uname: Linux 3.17.0-031700rc7-generic x86_64

ApportVersion: 2.14.7-0ubuntu2
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: Thu Oct 2 16:35:59 2014
DistUpgraded: 2014-09-23 12:09:08,269 DEBUG disabling apt cron job (0o755)
DistroCodename: utopic
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
 Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:3977]
InstallationDate: Installed on 2013-11-14 (322 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MachineType: LENOVO 2191
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.17.0-031700rc7-generic root=UUID=42f32e25-c311-4811-9c71-19fd8ef53c6d ro quiet acpi_backlight=vendor
SourcePackage: xserver-xorg-video-intel
UpgradeStatus: Upgraded to utopic on 2014-09-23 (9 days ago) 01/21/2013
dmi.bios.vendor: LENOVO
dmi.bios.version: 66CN54WW
dmi.board.asset.tag: No Asset Tag INVALID
dmi.board.vendor: LENOVO
dmi.board.version: 31900003WIN8 STD MLT
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo IdeaPad Yoga 13
dmi.modalias: dmi:bvnLENOVO:bvr66CN54WW:bd01/21/2013:svnLENOVO:pn2191:pvrLenovoIdeaPadYoga13:rvnLENOVO:rnINVALID:rvr31900003WIN8STDMLT:cvnLENOVO:ct10:cvrLenovoIdeaPadYoga13: 2191
dmi.product.version: Lenovo IdeaPad Yoga 13
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-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.3.0-0ubuntu2
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~exp1ubuntu3
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.11-1ubuntu2
xserver.bootTime: Thu Oct 2 12:37:20 2014
xserver.configfile: default

xserver.logfile: /var/log/Xorg.0.log
 product id 864
 vendor LGD
xserver.version: 2:1.16.0-1ubuntu1

Created attachment 103655
A screenshot illustrating the problem

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

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) {

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 :)

commit a88795c64123e4084044451d8861838ea904abd9
Author: Chris Wilson <email address hidden>
Date: Tue Jul 29 21:11:09 2014 +0100

    sna: Clear cursor image after rotation

    Signed-off-by: Chris Wilson <email address hidden>

Launchpad Janitor (janitor) wrote :

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

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Micha Moskovic (micha-mosk) wrote :

This annoying bug has been resolved upstream with a very simple one-line change .
It would be great if it could be applied to the ubuntu package.

Changed in xserver-xorg-video-intel:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → High
Consumology (hgms72-4oneway) wrote :

There is a "workaround": When I move an all day event in Thunderbird's month view to another day, it brings up another "shadow" symbol of the courser during moving that disappears when the date is dropped and then also the "double" courser icon is gone!

Tomodachi (tomodachi) wrote :

This is deb built from the ubuntu 14.10 Sources of the same package with the patch applied.
64 bit only though!

Yusuf (yusuf2) wrote :

Hi, i have still same problem even installed the package which Tomodachi suggested.

When using xrandr to rotate screen, two cursor is appering.

Any solutions other than compiling driver?

Yusuf (yusuf2) wrote :

By the way, my system is:

Linux ygpc 3.16.0-28-generic #38-Ubuntu SMP Fri Dec 12 17:37:40 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

and kernel: 3.16.0-28-generic

Still the same problem except only the "normal" pointer is contextual. The other one stays as it was before the rotation.

Ryan Cook (cookrn) wrote :

I'm able to confirm this issue on a fresh/vanilla 14.10 install on a Lenovo Thinkpad X230T. Without installing the modified driver linked above, I'm able to workaround the issue by targeting the cursor on the corner of a detached (non-fullscreen) window such that the two-directional drag-to-resize cursor appears. Subsequently, the other visible cursor disappears until the next time I rotate the screen.

Brandon Schlinker (bschlinker) wrote :

I see this bug with a fresh install of Ubuntu 14.04 LTS, as it appears that the bad package has been backported to LTS?

Checked my installation history and it was added during the fresh install last night

Arthur Fabre (arthur-b) wrote :

I am also seeing this on a fresh install of 14.04.

Arthur Fabre (arthur-b) on 2015-03-19
tags: added: trusty
Allan Bogh (ajbogh) wrote :

This bug still affects me. 14.10 x64 Yoga Pro 2.

elichai2 (elichai2) wrote :

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

This bug affects me also. Fresh install yesterday.

Description: Ubuntu 14.04.2 LTS
Lenovo X230t
3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Robert Hooker (sarvatt) on 2015-05-28
Changed in xserver-xorg-video-intel-lts-utopic (Ubuntu):
status: New → Confirmed
Robert Hooker (sarvatt) on 2015-05-28
Changed in xserver-xorg-video-intel (Ubuntu):
assignee: nobody → Robert Hooker (sarvatt)
status: Confirmed → In Progress
Robert Hooker (sarvatt) on 2015-06-30
Changed in xserver-xorg-video-intel-lts-utopic (Ubuntu):
status: Confirmed → Fix Committed
Changed in xserver-xorg-video-intel (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-video-intel - 2:2.99.914-1~exp1ubuntu4.5

xserver-xorg-video-intel (2:2.99.914-1~exp1ubuntu4.5) utopic; urgency=medium

  [ Timo Aaltonen ]
  * sna-gen8-clear-instancing-enabled-bit-between-batches.diff: Fix
    corruptions and missing letters on 2nd head. (LP: #1432194)

  [ Robert Hooker ]
  * sna-clear-cursor-image-after-rotation.patch: Fix a double cursor problem after
    rotating the screen (LP: #1376760) (LP: #1443345) backport from
    a88795c641 upstream.

 -- Timo Aaltonen <email address hidden> Fri, 26 Jun 2015 14:22:42 +0300

Changed in xserver-xorg-video-intel (Ubuntu):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for xserver-xorg-video-intel has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-video-intel-lts-utopic - 2:2.99.914-1~exp1ubuntu4.5~trusty1

xserver-xorg-video-intel-lts-utopic (2:2.99.914-1~exp1ubuntu4.5~trusty1) trusty; urgency=medium

  * Backport utopic package for lts-utopic stack.

 -- Timo Aaltonen <email address hidden> Mon, 11 May 2015 14:35:11 +0300

Changed in xserver-xorg-video-intel-lts-utopic (Ubuntu):
status: Fix Committed → Fix Released
Andrej Krutak (andree182) wrote :

Confirming 2:2.99.914-1~exp1ubuntu4.5~trusty1 fixed the issue.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.