Bug 673153 - emacs misdraws cursor and some other things when compositing is active
Summary: emacs misdraws cursor and some other things when compositing is active
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-intel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 676934 692232 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-27 14:57 UTC by Dan Winship
Modified: 2020-07-07 15:52 UTC (History)
14 users (show)

Fixed In Version: xorg-x11-drv-intel-2.14.0-5.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-15 21:43:01 UTC
Type: ---


Attachments (Terms of Use)
strace of running emacs (8.59 MB, text/plain)
2011-01-31 23:42 UTC, Matěj Cepl
no flags Details
upstream patch (1014 bytes, patch)
2011-03-30 13:47 UTC, Matěj Cepl
no flags Details | Diff

Description Dan Winship 2011-01-27 14:57:43 UTC
In rawhide, under either compiz or gnome-shell, emacs doesn't draw its cursor correctly. Sometimes it doesn't update it at all (and so when you move it around, it appears to stay where it was until you do Ctrl-L). Other times it leaves a trail of pixel junk behind as it moves.

Miscellaneous other bits of non-font-related drawing (underlines, parenthesis highlighting, etc) have the same problem; sometimes they don't get erased (either partially or entirely) when they should. I haven't noticed any problems with font drawing though. (And when I run in plain metacity or other non-composited wm, everything draws fine.)

emacs-23.2-17
xorg-x11-server-Xorg-1.9.99.1-3.20101201
xorg-x11-drv-intel-2.14.0-1 (on a Thinkpad X61 tablet with 965GM graphics)

Comment 1 Dan Winship 2011-01-31 16:22:31 UTC
actually, this happens if I run the F14 emacs under rawhide X too (whereas F14 emacs under F14 X is fine), so I guess it's X, not emacs that's messing up?

Comment 2 Matěj Cepl 2011-01-31 23:38:32 UTC
I could reproduce it very easily in gnome-shell with

jakoubek:sixties $ lspci |grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
jakoubek:sixties $ lspci -n |grep 00:02.0
00:02.0 0300: 8086:2a42 (rev 07)
jakoubek:sixties $ 

and

xorg-x11-server-Xorg-1.9.99.1-3.20101201.fc15.x86_64
xorg-x11-drv-intel-2.14.0-1.fc15.x86_64
emacs-23.2-17.fc15.x86_64

Just driving with cursor over the screen leaves behind traces of black rectangles.

However, I cannot reproduce it with any other program. I would suspect some bug between emacs and libX11 (or pango/cairo).

Comment 3 Matěj Cepl 2011-01-31 23:42:08 UTC
Created attachment 476289 [details]
strace of running emacs

Comment 4 Matěj Cepl 2011-01-31 23:43:37 UTC
I cannot attach ltrace and I don'ŧ see any errors in /var/log/XOrg.0.log or dmesg.

Comment 5 Dan Winship 2011-02-15 21:23:05 UTC
Using ssh between my f14 box and my rawhide box, running the f14 machine's emacs under the rawhide X server shows the bug, while running the rawhide machine's emacs under the f14 server does not. So it's definitely server or driver, not anything client-side.

Comment 6 Jonathan Corbet 2011-03-14 14:34:40 UTC
<me too>

Intel Q35 graphics, in case that's useful.  Let me know if there's any other useful information I can provide.

Comment 7 Dan Winship 2011-03-18 14:50:09 UTC
Another oddity: if you turn on the magnifier in gnome-shell, the magnified version of emacs draws correctly. cc:ing Owen since he may have more insight on what that tells us... (keeping in mind that it happens under compiz too, so it's not a clutter bug. GLX bug?)

Comment 8 Søren Sandmann Pedersen 2011-03-18 18:05:37 UTC
I'm wondering if damage is generated correctly for emacs' glyph drawing.

Recently, I happened to notice that in EXA/UXA, glyphs that are drawn with format=None may not generate damage events because EXA/UXA don't go through the Composite hook, but just call their own composite routines. That could explain this bug, but I haven't verified that the X server bug actually exists, or that emacs would trigger it.

If the magnification feature is less aggressive about clipping to damaged regions (which seems likely given that correctly scaling a damaged region would be a bit complicated), that could explain why it doesn't happen in that case.

Comment 9 Søren Sandmann Pedersen 2011-03-18 18:09:34 UTC
A way to verify that this is the issue would be to turn off 2D acceleration for the driver, but I don't know if you can do that without also turning off 3D.

Comment 10 Dave Airlie 2011-03-18 21:03:03 UTC
as an aside I've noticed that emacs over remote ssh misrenders its task-bar icons here, from rawhide client to EL6 server (no idea if its related).

Comment 12 Matěj Cepl 2011-03-30 13:47:03 UTC
Created attachment 488763 [details]
upstream patch

Comment 13 Dan Winship 2011-03-30 20:41:47 UTC
*** Bug 676934 has been marked as a duplicate of this bug. ***

Comment 14 Dan Winship 2011-03-30 20:42:08 UTC
*** Bug 692232 has been marked as a duplicate of this bug. ***

Comment 15 Michel Alexandre Salim 2011-04-06 11:10:02 UTC
Would be great if we can get this in -- it should not be affected by the beta freeze, right?

Comment 16 Michel Alexandre Salim 2011-04-06 11:38:40 UTC
I applied the patch to the latest F-15 xorg-x11-drv-intel build and did a Koji scratch build -- so far it's fixed the problem, and I've not noticed any regression:

  http://koji.fedoraproject.org/koji/taskinfo?taskID=2978237

Could an official update be issued?

Comment 17 Fedora Update System 2011-04-08 19:47:54 UTC
xorg-x11-drv-intel-2.14.0-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/xorg-x11-drv-intel-2.14.0-5.fc15

Comment 18 Fedora Update System 2011-04-09 05:26:58 UTC
Package xorg-x11-drv-intel-2.14.0-5.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xorg-x11-drv-intel-2.14.0-5.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/xorg-x11-drv-intel-2.14.0-5.fc15
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2011-04-15 21:42:55 UTC
xorg-x11-drv-intel-2.14.0-5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.