Bug 101620

Summary: Corrupted display in graphical Emacs with HEAD intel and SNA
Product: xorg Reporter: Andy Wingo <wingo>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED MOVED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: fturco, julian
Version: git   
Hardware: Other   
OS: All   
i915 platform: i915 features:

Description Andy Wingo 2017-06-28 08:23:33 UTC

Since updating to intel xorg driver b57abe20e81f4b8e4dd203b6a9eda7ff441bc8ce and still the case with git master, graphical-mode Emacs shows corruption when using SNA (the default).  I am on a thinkpad x1 carbon 3rd gen, but many other people see this on other machines:


I see corruption ranging from what appears to be tiles not updating but also small issues like certain letters not rendering.  I work around it, very sadly, with M-x redraw-display, which always fixes the display.  I guess there is some incremental update path that graphical Emacs hits that I don't see usually.  I run in Gnome Shell FWIW so there is a compositor in the middle.

I don't know when this started, as I don't update very frequently.  It only happens in graphical Emacs; no other program.  Although Emacs had updated when I upgraded Xorg, I tried running the older, known-working copy as well and had the same issues with run under the new Xorg driver.  Setting the system to use UXA instead of SNA fixes the issue.

We have many people that would be happy to test any proposed fixes :)  Thanks for all your work over the years and thanks in advance for having a look!

Comment 1 Chris Wilson 2017-06-28 10:04:09 UTC
The issue is that gnome-shell is not synchrosing its texture reads with X rendering because mesa's glXWaitX() is broken.
Comment 2 Andy Wingo 2017-06-28 13:00:12 UTC
(In reply to Chris Wilson from comment #1)
> The issue is that gnome-shell is not synchrosing its texture reads with X
> rendering because mesa's glXWaitX() is broken.

Apologies for the ignorant question: is there a bug for the glXWaitX issue?  Is it https://bugs.freedesktop.org/show_bug.cgi?id=97914 ?

Is there a recommended workaround?  Switching to UXA seems to do it but maybe there is a different recommendation.
Comment 3 Francesco Turco 2017-07-16 19:56:32 UTC
I also experience random graphics curruption in Emacs with SNA. Switching to UXA seems to solve this problem, but it also produces another (worse) problem: black windows after some time. So UXA is not a workaround for me at this time.

Distribution: Gentoo Linux.

Desktop environment: GNOME 3.

- app-editors/emacs-25.2
- x11-drivers/xf86-video-intel-2.99.917_p20170313

# lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
Comment 4 Clément Lassieur 2017-08-07 21:41:38 UTC
When UXA is enabled, I experience the same black screen issue on my X200 (libreboot) laptop.

Steps to reproduce:

1. Run this command: 'xset dpms force off'
2. Close and reopen the laptop lid
3. Press any key

Screen remains black.

Workaround: press Ctrl-Alt-F1, then Ctrl-Alt-F7.

xf86-video-intel 2.99.917, commit 2100efa1

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
Comment 5 Martin Peres 2019-11-27 13:48:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/issues/143.

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.