Mouse cursor corruption when switching users

Bug #929960 reported by Jonathan Voss on 2012-02-10
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xserver-xorg-driver-ati
Fix Released
Medium
xserver-xorg-video-ati (Ubuntu)
Low
Unassigned

Bug Description

I'm guessing the box is 64x64 pixels. It's got horizontal lines across it. The mouse pointer looks completely normal in screenshots, so I am including a picture taken with my phone.

It looked messed up in the same way on the other account, and continues to look messed up now that I have switched back. It still functions normally, but it's a little hard to know where you're clicking since the actual pointer seems to be a bit away from the upper left corner of this box.

By the way, I use a program called redshift, which causes a reddish hue at night, as can be seen in the picture. Redshift does not appear to affect the mouse pointer though. It may also cause this bug I guess.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+10ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-14.23-generic 3.2.3
Uname: Linux 3.2.0-14-generic i686
.tmp.unity.support.test.0:

ApportVersion: 1.91-0ubuntu1
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,move,compiztoolbox,snap,regex,place,imgpng,vpswitch,grid,gnomecompat,resize,animation,wall,unitymtgrabhandles,session,expo,fade,workarounds,ezoom,scale,unityshell]
CompositorRunning: None
Date: Thu Feb 9 21:35:01 2012
DistUpgraded: Log time: 2012-01-29 13:29:25.075442
DistroCodename: precise
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
GraphicsCard:
 Advanced Micro Devices [AMD] nee ATI R423 UK [Radeon X800SE (PCIE)] [1002:554b] (prog-if 00 [VGA controller])
   Subsystem: C.P. Technology Co. Ltd Device [148c:2154]
   Subsystem: C.P. Technology Co. Ltd Device [148c:2155]
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 003: ID 0bc2:0503 Seagate RSS LLC
 Bus 002 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
MachineType: System manufacturer System Product Name
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-14-generic root=UUID=9735bb88-e60b-48fc-8db3-4153611e79a3 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to precise on 2012-02-08 (1 days ago)
dmi.bios.date: 11/08/2005
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: ASUS A8N5X ACPI BIOS Revision 0502
dmi.board.name: A8N5X
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: 1.XX
dmi.chassis.asset.tag: 123456789000
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvrASUSA8N5XACPIBIOSRevision0502:bd11/08/2005:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnA8N5X:rvr1.XX:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
version.compiz: compiz 1:0.9.6+bzr20110929-0ubuntu8
version.libdrm2: libdrm2 2.4.30-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0~rc2-0ubuntu4
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0~rc2-0ubuntu4
version.xserver-xorg-core: xserver-xorg-core 2:1.11.3-0ubuntu10
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.99.901-1ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu3
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Jonathan Voss (jonathan-voss) wrote :
Bryce Harrington (bryce) wrote :

Yeah, prototypical mouse corruption issue.

Did this happen just the one time or does it happen repeatedly? Can you reproduce it switching to the Guest account and back, or only with a specific user? Does it make any difference if the login sessions are Unity 2D or 3D?

affects: xorg (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Jonathan Voss (jonathan-voss) wrote :

I've just reproduced it twice tonight. It seems to happen randomly when switching to other accounts or to the login screen. I can't get it to happen consistently however so it's hard to tell what's causing it. Since my last reboot, I've switched through a bunch of accounts, gnome3, unity, and unity 2d, without getting the mouse corruption.

I do tend to get some weird graphics immediately when logging in though. Something is being drawn without being initialized.

Also, I don't think xserver-xorg-video-intel is right. This computer has an older ATI card.

Bryce Harrington (bryce) wrote :

The screen corruption you see after clicking login that goes away may be bug #931967. I get that too. Fairly sure it's not going to be related to your mouse cursor corruption.

affects: xserver-xorg-video-intel (Ubuntu) → xserver-xorg-video-ati (Ubuntu)
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Download full text (4.1 KiB)

Forwarding this bug from Ubuntu reporter Jonathan Voss:
http://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/929960

[Problem]
Mouse cursor corruption when switching users with an older ATI card

[Original Description]
I'm guessing the box is 64x64 pixels. It's got horizontal lines across it. The mouse pointer looks completely normal in screenshots, so I am including a picture taken with my phone.

It looked messed up in the same way on the other account, and continues to look messed up now that I have switched back. It still functions normally, but it's a little hard to know where you're clicking since the actual pointer seems to be a bit away from the upper left corner of this box.

I've just reproduced it twice tonight. It seems to happen randomly when switching to other accounts or to the login screen. I can't get it to happen consistently however so it's hard to tell what's causing it. Since my last reboot, I've switched through a bunch of accounts, gnome3, unity, and unity 2d, without getting the mouse corruption.

By the way, I use a program called redshift, which causes a reddish hue at night, as can be seen in the picture. Redshift does not appear to affect the mouse pointer though. It may also cause this bug I guess.

DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+10ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-14.23-generic 3.2.3
Uname: Linux 3.2.0-14-generic i686
.tmp.unity.support.test.0:

ApportVersion: 1.91-0ubuntu1
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,move,compiztoolbox,snap,regex,place,imgpng,vpswitch,grid,gnomecompat,resize,animation,wall,unitymtgrabhandles,session,expo,fade,workarounds,ezoom,scale,unityshell]
CompositorRunning: None
Date: Thu Feb 9 21:35:01 2012
DistUpgraded: Log time: 2012-01-29 13:29:25.075442
DistroCodename: precise
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
GraphicsCard:
 Advanced Micro Devices [AMD] nee ATI R423 UK [Radeon X800SE (PCIE)] [1002:554b] (prog-if 00 [VGA controller])
   Subsystem: C.P. Technology Co. Ltd Device [148c:2154]
   Subsystem: C.P. Technology Co. Ltd Device [148c:2155]
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 003: ID 0bc2:0503 Seagate RSS LLC
 Bus 002 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
MachineType: System manufacturer System Product Name
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-14-generic root=UUID=9735bb88-e60b-48fc-8db3-4153611e79a3 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to precise on 2012-02-08 (1 days ago)
dmi.bios.date: 11/08/2005
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: ASUS A8N5X ACPI BIOS Revision 0502
dmi.board.name: A8N5X
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: 1.XX
dmi.chassis.asset.tag: 123456789000
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvr...

Read more...

summary: - I switched users and my mouse turned into a translucent box
+ Mouse cursor corruption when switching users
Bryce Harrington (bryce) wrote :

Jonathan Voss - I've forwarded this bug upstream to https://bugs.freedesktop.org/show_bug.cgi?id=46796 - please subscribe yourself to this bug, in case they need further information or wish you to test something. Thanks ahead of time!

Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Triaged

Created attachment 57834
BootDmesg.txt

Created attachment 57835
CurrentDmesg.txt

Created attachment 57836
IMAG0011.jpg

Created attachment 57837
XorgLog.txt

Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
status: Unknown → Confirmed

Created attachment 57853
Restrict offset for legacy hardware cursor.

Does this kernel patch fix the problem?

Created attachment 58066
Verbose test patch

In order to facilitate testing, here's another version of the fix which prints a message

[drm] Fixing large cursor offset 0xXXXXXXXX >= 0x08000000

when the suspected problem would have occurred. So if such a message appears in dmesg but the cursor is unharmed, we know this is indeed the proper fix.

This is a bit above my head I think. I got the source for xserver-xorg-video-ati from the Ubuntu repositories and tried to apply the patch to it. It looks like a lot of the right files are there, but there's no radeon_gem.c. The package version is 6.14.99~git20111219.aacbd629-0ubuntu2, which includes a date that I think indicates that it's not TOO old, however I cloned the git repository at git://anongit.freedesktop.org/xorg/driver/xf86-video-ati and had the same problem. I've also never tested a kernel mod so I'm not sure what I would do if I got the patch to compile.

(In reply to comment #7)
> I got the source for xserver-xorg-video-ati from the Ubuntu repositories and
> tried to apply the patch to it.

That can't work, as the patch is for the kernel, not the X driver.

You should be able to get the source for your running kernel with

apt-get source linux-image-$(uname -r)

> I've also never tested a kernel mod so I'm not sure what I would do if
> I got the patch to compile.

Boot the patched kernel (or load the patched radeon kernel module) and try to reproduce the problem. Look for the message from comment #6 in dmesg.

This patch causes my computer to crash at login. However, it's not a super bad crash because I was able to ssh in and check dmesg. The comment did not appear. Just to make sure it wasn't something I did when trying to compile a kernel, I reversed the patch and recompiled, and I'm running that kernel now, so I'm pretty sure it's the patch.

Created attachment 58312
Verbose test patch with crash fixed

(In reply to comment #9)
> This patch causes my computer to crash at login. However, it's not a super bad
> crash because I was able to ssh in and check dmesg.

Sorry about that, here's another test patch which shouldn't crash.

I think this patch works as intended. Well actually, it's hard for me to say it actually fixed the problem due to its random nature, but I haven't had the mouse corruption issue on this patched driver, and the message appears in dmesg:

[ 524.112945] [drm] Fixing large cursor offset 0x0d1e0000 >= 0x00000000
[ 537.020931] [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
[ 537.308976] [drm] Fixing large cursor offset 0x0cf80000 >= 0x00000000
[ 607.000940] [drm:drm_mode_getfb] *ERROR* invalid framebuffer id

I have to say that the log confuses me since 1 << 27 is not 0.

Created attachment 58436
Submitted fix

(In reply to comment #11)
> [...] I haven't had the mouse corruption issue on this patched driver, and the
> message appears in dmesg:

Okay, so an unpatched driver probably would use too large offsets sometimes, which would definitely explain the corrupted cursor. So the fix seems to be working.

> I have to say that the log confuses me since 1 << 27 is not 0.

Indeed, but that's just a bug of the DRM_INFO call. :) (Type mismatch between format string and values)

I'm attaching the fix as I submitted it for inclusion into the kernel.

Timo Aaltonen (tjaalton) on 2012-03-28
Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Low

Duplicate of #36769, perhaps?

A patch referencing this bug report has been merged in Linux v3.4-rc1:

commit c4353016dac10133fa5d8535af83f0c4845a2915
Author: Michel Dänzer <email address hidden>
Date: Wed Mar 14 17:12:41 2012 +0100

    drm/radeon: Restrict offset for legacy hardware cursor.

Resolving per comment #14, reopen if you're still seeing the problem with the fix.

Changed in xserver-xorg-driver-ati:
status: Confirmed → Fix Released

Jonathan Voss, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xserver-xorg-video-ati REPLACE-WITH-BUG-NUMBER

Please note, given that the information from the prior release is already available, doing this on a release prior to the development one would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

Changed in xserver-xorg-video-ati (Ubuntu):
status: Triaged → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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