Bug 33275 - [ilk] kwin GLSL Shaders cause hung of GPU resulting in X freeze
Summary: [ilk] kwin GLSL Shaders cause hung of GPU resulting in X freeze
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 7.10
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Ian Romanick
QA Contact:
Depends on:
Reported: 2011-01-19 09:12 UTC by KaiUweBroulik2
Modified: 2013-05-02 05:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

glxinfo output (11.69 KB, text/plain)
2011-01-19 09:14 UTC, KaiUweBroulik2

Description KaiUweBroulik2 2011-01-19 09:12:31 UTC
To enable KWin to render the Blur effect on my Intel graphics in my notebook, I upgraded from Intel driver version 7.09 which is in the current Ubuntu repositories to the 7.11-devel from the bleeding edge thing PPA.
When triggering the Present Window Grid which displays all windows in an Mac Expose like style or triggering a taskbar window preview X server, or at least KDM, freezes. Those effects involve GLSL Shaders.
The error I get from the kernel then is
[drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
Comment 1 KaiUweBroulik2 2011-01-19 09:14:34 UTC
Created attachment 42199 [details]
glxinfo output
Comment 2 Eric Anholt 2011-07-19 11:17:32 UTC
I've heard that GPU hangs in kwin have been fixed (though we don't know exactly when) as of the 7.11 stabilization branch.  Could you give that a try and see if it fixes your issues?
Comment 3 Martin Flöser 2011-07-19 13:37:33 UTC
The functionality which is triggering the freeze (Lanczos filter) has been disabled downstream for 4.6 (see git commit https://projects.kde.org/projects/kde/kdebase/kde-workspace/repository/revisions/e68ced9351cb29cea4b952a1daa7bdafbf14c0ad ) when Intel driver is used.

AFAIK Kai Uwe is testing from Kubuntu daily builds (project neon) so it should be possible to push a patch into a build, so that this can properly tested. Also an environment variable might be handy here in the downstream code.
Comment 4 KaiUweBroulik2 2011-07-19 14:51:37 UTC
Sorry, forgot my password :D

Just wanted to note that like Martin said, the lanczos filter has been disabled on Intel hardware to workaround this crash.

@Martin: Yes, I test with Project Neon (on both my main machine and notebook with Intel where this problem occurred), so feel free to add a patch, so I can do testing.
But keep in mind that it may take a day or two or three for the updated binaries to arrive on my machine *g*
Comment 5 Martin Flöser 2011-07-20 13:45:51 UTC
new environment variable KWIN_FORCE_LANCZOS available in master, set to 1 to overwrite the checks. See:

Comment 6 KaiUweBroulik2 2011-07-21 17:23:27 UTC
So, I just tested it:
Scale Mode: Accurate

Triggering Present Windows makes KWin crash once the transition has completed and Lanczos is going to be applied. But at least it does not make the whole system freeze anymore.

Martin: A backtrace can be found here: http://bugs.kde.org/278234
Comment 7 Eric Anholt 2012-11-27 06:37:35 UTC
Hmm, the code in that backtrace has been deleted in Mesa master.  How are things now? :)
Comment 8 Martin Flöser 2012-11-27 07:49:23 UTC
oh that bug is old, I'm giving an update on how it looks in KWin right now. We activated the shader in question by default for Sandybridge or later since last release - so far everything seems fine.

Current master (which will become 4.10) has a runtime check for at least Mesa 8.0, though most distribution will combine it with Mesa 9.0.

So if the code in question has already been removed from Mesa 8.0 it will no longer cause problems with KWin :-)
Comment 9 Eric Anholt 2013-05-02 05:28:17 UTC
The crashy code has been deleted, and I think in the pull constant rewrite people told me they'd tested with this shader on ILKs.  Feel free to reopen if it's still an issue.

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.