Bug 95062

Summary: GPU HANG: reason: Ring hung (with LibreOffice on KDE Plasma)
Product: Mesa Reporter: Moritz Bunkus <moritz>
Component: Drivers/DRI/i965Assignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED INVALID QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: andyrtr, bas, intel-gfx-bugs
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: dmesg showing the hang
dmesg showing the hang
content of /sys/class/drm/card0/error after the hang
Xorg.0.log file from the process with the hang

Description Moritz Bunkus 2016-04-22 08:46:02 UTC
Created attachment 123140 [details]
dmesg showing the hang

Hey,

Since the upgrade of xorg-server from 1.18.1 (on Arch Linux) to anything newer I'm experiencing hangs in LibreOffice in KDE/Plasma 5 whenever LibreOffice opens a popup dialog (e.g. CSV import settings, editing a text style etc.). The popup dialog is drawn incompletely, the desktop seems to freeze for a couple of seconds. Often Plasma says it had to restart the graphics stack. If I press ESC the popup dialog often vanishes after a couple of seconds and I can continue using the system normally.

Note that popup _menus_ shown by LibreOffice aren't affected, only full dialogs.

journalctl reports "GPU hang" (see attached journal log file).

Sometimes the X server even crashes completely.

This happens with both xorg-server 1.18.2 and the current 1.18.3. The problem vanishes as soon as I downgrade xorg-server-* packages back to 1.18.1.

The hang happens regardless of the kernel version used: I had hangs on the old LTS (4.1.x), Arch's current LTS (4.4.7) and Arch's current normal one (4.5).

LibreOffice is at 5.0.5.

There are several similar bugs with similar driver messages, so feel free to mark this as a duplicate of the appropriate one.

Steps to reproduce:

- Install KDE/Plasma 5 & LibreOffice on computer with a i915 running Arch Linux
- Start Plasma, start LibreOffice
- Open a dialog in LibreOffice, e.g. by pressing F11, then right-clicking on a style and chosing "edit" from the popup menu. Observe hang.
Comment 1 Chris Wilson 2016-04-22 09:06:54 UTC
Please attach the /sys/class/drm/card0/error from after the hang, and your Xorg.0.log. This is curious for the 1.81.1 -> 1.18.2 transition being a trigger. Is it just the nature of the freeze that changes, i.e. do you see hangs with 1.18.1 but they happen to be handled better?
Comment 2 Moritz Bunkus 2016-04-22 10:46:28 UTC
Thanks for such quick feedback.

This is the first time I've ever encountered GPU hangs with Intel cards. I've tried to reproduce such a hang with 1.18.1 over the last hour by double-clicking on a CSV file (which starts LibreOffice which immediately displays its CSV import dialog), but no luck. LibreOffice's CSV import dialog flickers shortly when it's displayed on 1.18.1, but there's no hang, and the dialog is usable immediately.

By contrast on 1.18.3 the CSV import dialog looks broken, the whole X hangs. If I cancel the dialog by pressing ESC the GPU will usually be reset, LibreOffice closed and I can continue working in X. If I don't press ESC and simply wait then X will crash.

I'm attaching new files as requested: Xorg.0.log.old and the content of /sys/class/drm/card0/error (along with a fresh dmesg output). Please note that this time X crashed, and systemd immediately restarted the display manager. The Xorg.0.log.old file is from the run that crashed, not from the new instance by the restarted display manager. However, I don't know whether restarting has an effect on the content of "error". If so I can turn off auto-restarts of the display manager and try again.
Comment 3 Moritz Bunkus 2016-04-22 10:47:01 UTC
Created attachment 123144 [details]
dmesg showing the hang
Comment 4 Moritz Bunkus 2016-04-22 10:47:31 UTC
Created attachment 123145 [details]
content of /sys/class/drm/card0/error after the hang
Comment 5 Moritz Bunkus 2016-04-22 10:47:56 UTC
Created attachment 123146 [details]
Xorg.0.log file from the process with the hang
Comment 6 Chris Wilson 2016-04-22 11:15:01 UTC
Oh, you are using the -modesetting driver hence it triggering with the change in xorg and why it will fail after a GPU hang.
Comment 7 Bas Zoetekouw 2016-06-29 08:00:00 UTC
I can also reliably reproduce this on Ubuntu (Xorg 1.18.3) using the fbdev driver (both 0.4.4 and yesterday's git).

Please let me know if there is anything I can do to help debug this.
Comment 8 Bas Zoetekouw 2016-07-23 17:22:02 UTC
Any progress on this?  Is there anything I can do to help?
Comment 9 Matt Turner 2016-11-03 02:12:59 UTC
(In reply to Bas Zoetekouw from comment #8)
> Any progress on this?  Is there anything I can do to help?

Can you try to capture an apitrace (https://github.com/apitrace/apitrace) that reproduces the issue?

Please test a new version of Mesa (12 or 13) and mark as REOPENED if it happens more frequently or if you discover a way to reproduce it.
Comment 10 Annie 2017-02-10 22:39:18 UTC
Dear Reporter,

This Mesa bug has been in the "NEEDINFO" status for over 60 days. I am closing this bug based on lack of response but feel free to reopen if resolution is still needed. Please ensure you're supplying the correct information as requested.

Thank you.
Comment 11 Danna Gifford 2017-06-07 12:20:41 UTC
A work-around seems to be starting Libre Office without hardware acceleration with the variable LIBGL_ALWAYS_SOFTWARE

e.g. to start Impress from the terminal
$ LIBGL_ALWAYS_SOFTWARE=1 loimpress

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.