Bug 63397 - Screen corruption with LibreOffice/OpenOffice (with glamor enabled)
Summary: Screen corruption with LibreOffice/OpenOffice (with glamor enabled)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Acceleration/glamor (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 20:28 UTC by Bjoern Voigt
Modified: 2016-08-29 15:09 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Libreoffice calc after scrolling (55.41 KB, image/png)
2013-04-10 20:28 UTC, Bjoern Voigt
no flags Details
OpenOffice calc after some scrolling (55.92 KB, image/png)
2013-04-10 20:29 UTC, Bjoern Voigt
no flags Details
Seamonkey suite file browser after some scrolling (65.35 KB, image/png)
2013-04-10 20:30 UTC, Bjoern Voigt
no flags Details
Xorg log (40.34 KB, text/x-log)
2013-04-10 20:31 UTC, Bjoern Voigt
no flags Details
Graphics related 'dmesg' messages (5.77 KB, text/plain)
2013-04-10 20:36 UTC, Bjoern Voigt
no flags Details
Packages (kernel, xorg, seamonkey, openoffice, libreoffice) (3.44 KB, text/plain)
2013-04-10 20:41 UTC, Bjoern Voigt
no flags Details
HW-Info (Radeon HD 3450) (1.90 KB, text/x-log)
2013-04-10 20:44 UTC, Bjoern Voigt
no flags Details
GIMP window before scrolling (78.69 KB, image/png)
2013-06-21 14:41 UTC, Öyvind Saether
no flags Details
GIMP window after scrolling (63.73 KB, image/png)
2013-06-21 14:42 UTC, Öyvind Saether
no flags Details
Libreoffice Dialog with black-on-black text (9.13 KB, image/png)
2016-03-25 14:32 UTC, Klaus Kusche
no flags Details
glamor: Disable logic ops when doing compositing (1.96 KB, patch)
2016-05-16 21:05 UTC, Keith Packard
no flags Details | Splinter Review

Description Bjoern Voigt 2013-04-10 20:28:26 UTC
Created attachment 77771 [details]
Libreoffice calc after scrolling

LibreOffice and OpenOffice are nearly unusable with Radeon driver, if Glamor-option is turned on:

Section "Device"
  Identifier "Default Device"
  Driver "radeon"
  Option "AccelMethod" "glamor"
EndSection

After scrolling a little bit with the cursor keys or mouse wheel, the Libreoffice/OpenOffice screens show some corruption. Without the AccelMethod "glamor" (default "EXA") no screen corruption can be found. Some other programs (tested: KDE 4.10 desktop, Firefox 20) run without problems.

The file browser of Seamonkey suite (probably GTK+ based) has redrawing problems with "glamor" too.

System: openSUSE 12.3
Kernel: openSUSE Kernel 3.8.6-2-desktop
Graphics card: ATI RV620 LE [Radeon HD 3450]
Desktop Environment: KDE 4.10.2 with 3D effects enabled
Xorg: org-x11-driver-video-7.6, xf86-video-ati-7.1.0, Mesa-9.1.1
Tested software: Libreoffice 4.0.2.2, OpenOffice 3.4.1, Seamonkey 2.17
Comment 1 Bjoern Voigt 2013-04-10 20:29:42 UTC
Created attachment 77772 [details]
OpenOffice calc after some scrolling
Comment 2 Bjoern Voigt 2013-04-10 20:30:47 UTC
Created attachment 77773 [details]
Seamonkey suite file browser after some scrolling
Comment 3 Bjoern Voigt 2013-04-10 20:31:33 UTC
Created attachment 77774 [details]
Xorg log
Comment 4 Bjoern Voigt 2013-04-10 20:36:00 UTC
Created attachment 77775 [details]
Graphics related 'dmesg' messages
Comment 5 Bjoern Voigt 2013-04-10 20:41:08 UTC
Created attachment 77776 [details]
Packages (kernel, xorg, seamonkey, openoffice, libreoffice)
Comment 6 Bjoern Voigt 2013-04-10 20:44:07 UTC
Created attachment 77777 [details]
HW-Info (Radeon HD 3450)
Comment 7 Michel Dänzer 2013-05-23 07:42:52 UTC
Does this still happen with current upstream glamor Git?
Comment 8 Öyvind Saether 2013-06-21 14:41:12 UTC
This happens to me too, using radeonsi, radeon 7850, glamor.

This card does not appear to have any option of accelration with EXA and glamor is quite frankly hopeless because of screen corruption. Not only in libreoffice, but also in GIMP and a lot of other software.
Comment 9 Öyvind Saether 2013-06-21 14:41:47 UTC
Created attachment 81169 [details]
GIMP window before scrolling
Comment 10 Öyvind Saether 2013-06-21 14:42:59 UTC
Created attachment 81170 [details]
GIMP window after scrolling

This is how a GIMP window with an image appears after scrolling a bit. The same thing happens in Libreoffice and numerous other programs.

totally makes my radeon 7850 useless.
Comment 11 Michel Dänzer 2013-07-11 15:35:13 UTC
I can't reproduce this. Let me ask again: If you aren't using current upstream glamor Git yet, does that work better?
Comment 12 Bjoern Voigt 2013-07-11 19:01:00 UTC
My first attempt to test the Glamor Git (master) was unsuccessful. I compiled Glamor and copied the *.so libraries over the older versions (Glamor 0.5 - stable version). Some seconds after KDE start, the X-Server crashed. 

Probably I have to recompile xf86-video-ati or xf86-video-intel too. Are the version xf86-video-ati-7.1.0_git20130705-31.1.x86_64 or xf86-video-intel-2.21.11-74.1.x86_64 sufficient for Glamor Git?
Comment 13 Michel Dänzer 2013-07-12 08:20:47 UTC
(In reply to comment #12)
> Probably I have to recompile xf86-video-ati or xf86-video-intel too.

No, that shouldn't be necessary. Please provide more details about how you configured, built and installed glamor, and about the crash.
Comment 14 Dave Witbrodt 2013-08-06 00:41:47 UTC
I have a new HD 7850, and I am not seeing any of the problems described here.  Possibly it has been fixed in newer versions of the software?  I am using:

  Linux 3.10.5 (+ Radeon-related cherry picks from 3.11)
  libdrm 2.4.46
  Mesa 9.2-devel, up to commit adfd0123 of July 18
  glamor-egl 0.5.0
  xorg-server 1.14.2.901
  xf86-video-ati 7.1.99-devel, up to commit 2ae6bb18 of July 31

The only problem I was having was fixed in bug 65438; a simple upgrade to a newer LLVM 3.4 cured it.

Maybe the folks having trouble could find and try newer versions.
Comment 15 Dave Witbrodt 2014-02-16 17:16:31 UTC
My apologies on comment 14:  I _was_ having a problem with LibreOffice, where the menus were appearing in all black instead of black on gray.  A person could stand and get outside the sweetspot of my LCD monitor and actually read the menu bar, so the foreground and background colors were being rendered in two different colors, one black and the other almost black.

This corruption has now disappeared, and I cannot say whether it was a change in LibreOffice itself, or libgtk2, or part of the graphics stack such as my latest update of Mesa to 10.2-devel or glamor 0.6.0.  I rarely use LibreOffice lately and much has changed since the last time I tried it in August.

Just glad to see the bug go away!

Thanks devs!
Dave W.
Comment 16 Michel Dänzer 2014-08-04 09:59:29 UTC
I think this should be fixed, please reopen if it still happens with glamor from xserver 1.16.0 or later.
Comment 17 Klaus Kusche 2014-08-20 17:13:45 UTC
(In reply to comment #16)
> I think this should be fixed, please reopen if it still happens with glamor
> from xserver 1.16.0 or later.

Still happens here:
* Menu line is almost completely black after minimizing and restoring LO.
* All dialog buttons are completely black and unreadable,
  I can't use any dialog (save, print, convert to pdf, ...) in LO.
* Some toolbar or tool buttons and all pulldown arrow buttons 
  are partially black.

I have noticed some minor font rendering problems in other applications
(which go away when I scroll or repaint), but no such serious background
corruption in any other application - seems to affect libreoffice only.

Turning glamor off solves all problems.

HW: VERDE (ChipID = 0x6825)
SW: 
xorg-server 1.16.0 with integrated glamor (not external glamor lib)
xf86-video-ati 7.4.0
mesa 10.2.6

Is there any way to turn off just glamor 2D accel 
without loosing opengl, vdpau, xv etc?
Comment 18 Michel Dänzer 2014-08-21 09:03:31 UTC
(In reply to comment #17)
> * Menu line is almost completely black after minimizing and restoring LO.
> * All dialog buttons are completely black and unreadable,
>   I can't use any dialog (save, print, convert to pdf, ...) in LO.
> * Some toolbar or tool buttons and all pulldown arrow buttons 
>   are partially black.

Can't seem to reproduce any of this with glamor from xserver Git master.

Which desktop environment / window/compositing manager / LO/toolkit theme are you using?


> I have noticed some minor font rendering problems in other applications
> (which go away when I scroll or repaint), [...]

That would need to be tracked in a separate report.


> Is there any way to turn off just glamor 2D accel 
> without loosing opengl, vdpau, xv etc?

No.
Comment 19 Klaus Kusche 2014-08-21 09:20:57 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > * Menu line is almost completely black after minimizing and restoring LO.
> > * All dialog buttons are completely black and unreadable,
> >   I can't use any dialog (save, print, convert to pdf, ...) in LO.
> > * Some toolbar or tool buttons and all pulldown arrow buttons 
> >   are partially black.
> 
> Can't seem to reproduce any of this with glamor from xserver Git master.

I tried xserver git and ati driver git yesterday (by using gentoo's 9999 build),
they compiled but did not come up (screen black, keyboard and mouse ignored,
poweroff required).

Any version you can recommend? Any hints to get it going?
Should I try xserver git with ati 7.4.0?

> Which desktop environment / window/compositing manager / LO/toolkit theme
> are you using?

XFCE with XFWM, LibreOffice 4.2.5.2 with gtk2 
(currently recompiling it with gtk3).
I have a lot of gtk2 applications in use, and only LibreOffice is affected.
Comment 20 Klaus Kusche 2014-08-21 10:53:47 UTC
The gtk3 version of LibreOffice doesn't have those problems,
everything is displayed correctly
(but it doesn't obey my desktop theme settings for gtk3:
Everything is way too small and infinitely ugly...).

And when comparing gtk2 and gtk3 I noticed another problem in gtk2:
In all dialogs, all tickmarks in choices are missing.
Even if the square is clicked, no tickmark appears.
Comment 21 Bjoern Voigt 2014-08-21 12:02:58 UTC
The reported problem does not occur on my unchanged hardware anymore. I have updated Xorg and Glamor:

xorg-x11-server-7.6
Comment 22 Klaus Kusche 2014-08-21 12:50:42 UTC
Got xorg-server git and xf86-video-ati git running.

All "black background" problems are gone.

However, one very annoying problem remains:
All tickmarks in dialogs are missing:
The squares are all white and remain white,
no matter if the corresponding option is selected or not,
even when clicking on the square.

Seems to be a glamor problem:
With accel off, the tickmarks are displayed correctly.
Comment 23 Michel Dänzer 2014-08-22 03:27:34 UTC
(In reply to comment #22)
> All tickmarks in dialogs are missing:

Please file your own report for that. The problem this report is about is fixed per comment 21.
Comment 24 Klaus Kusche 2016-03-25 14:30:47 UTC
Regression:

The "black font on black background" error (Comment 15) 
came back a few weeks ago:
In some dialogs (not all), part of the text is shown as black rectangles only
(see attachment), exactly as it was 2-3 years ago.
Only libreoffice affected.

Dragging the dialog off screen and back again helps:
After repaint, the text is correct.

Xorg 1.18.2, mesa 11.1.2, xf86-video-ati 7.6.1, LO 5.1.1.3 with GTK 2, Xfce, 
ATI Cap Verde with Glamor
Comment 25 Klaus Kusche 2016-03-25 14:32:59 UTC
Created attachment 122545 [details]
Libreoffice Dialog with black-on-black text
Comment 26 Michel Dänzer 2016-03-26 03:48:47 UTC
(In reply to Klaus Kusche from comment #24)
> Regression:

Can you try if it's still broken with xserver Git master?

If yes, or if you can't try that, can you bisect?
Comment 27 Klaus Kusche 2016-03-27 11:08:13 UTC
(In reply to Michel Dänzer from comment #26)
> (In reply to Klaus Kusche from comment #24)
> > Regression:
> 
> Can you try if it's still broken with xserver Git master?

Yes.
Installed gentoo's xorg-server-9999, mesa-9999, libdrm-9999, and the 9999 
of all drivers, which should pull current git versions,
and the problem is still there.

Experimented a little:

* The problem is gone when glamor is not used
(can't test glamor with llvmpipe, 
because llvmpipe is killed immediately on a pax kernel).

* Interestingly, the problem is also gone when setting "ShadowPrimary" to "on"
in the radeon driver. However, this horribly breaks firefox 
(firefox window remains completely black).

* Problem still exists with all other options I tried with radeon.

* Problem also exists with the modesetting driver with glamor on,
no matter what combination of ShadowFB and PageFlip options is used.

> If yes, or if you can't try that, can you bisect?

I'm afraid I can't.

I was very busy during the last few weeks and hence ignored the problem
for quite some time. I can't remember if it came back 4 weeks or 4 months ago.

If you don't have any quick guesses to try, I'll live with the problem: 
It just affects some static texts in some dialogs,
it does not affect menues, text fields or other texts.
Comment 28 Keith Packard 2016-05-16 21:05:13 UTC
Created attachment 123796 [details] [review]
glamor: Disable logic ops when doing compositing

I reproduced this bug on my machine and created this patch which fixes it for me.
Comment 29 Klaus Kusche 2016-05-20 06:33:31 UTC
(In reply to Keith Packard from comment #28)
> Created attachment 123796 [details] [review] [review]
> glamor: Disable logic ops when doing compositing
> 
> I reproduced this bug on my machine and created this patch which fixes it
> for me.

The patch fixes it for me, too.
Comment 30 Michel Dänzer 2016-05-27 08:41:25 UTC
commit 743b6f231e999d8b2909228412266dc13cc433c5
Author: Keith Packard <keithp@keithp.com>
Date:   Fri May 13 04:25:43 2016 -0700

    glamor: Disable logic ops when doing compositing [v4]
Comment 31 Tristan Miller 2016-08-28 18:17:11 UTC
In what version of the X.Org server will the fix for this issue appear?  I believe I'm still seeing the problem in the latest stable release, 1.18.4, installed from openSUSE 42.1 packages (xorg-x11-server-7.6_1.18.4-465.3.x86_64).
Comment 32 Tristan Miller 2016-08-28 18:23:18 UTC
Oh, just noticed the release notes for 1.18.4 at <https://lists.x.org/archives/xorg-announce/2016-July/002699.html> refer to this bug and claim it's been fixed.  So either Keith's fix doesn't work for all cases, or I'm suffering from a different problem with the same symptoms.

Like Klaus reported in Comment #20, the problem doesn't occur when telling LibreOffice to use gtk3 (via SAL_USE_VCLPLUGIN), but it does occur with every other toolkit (kde, kde4, gtk2, gen).

Should this report be reopened?
Comment 33 Michel Dänzer 2016-08-29 02:10:49 UTC
(In reply to Tristan Miller from comment #32)
> Should this report be reopened?

No, because the reporter of this one said it's fixed for him. Please file your own report.
Comment 34 Tristan Miller 2016-08-29 15:09:25 UTC
(In reply to Michel Dänzer from comment #33)
> Please file your own report.

Done at Bug 97533.


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.