Bug 339760 - kwin crashes after swithing between OpenGL 2.0 to 3.1 and vice versa
Summary: kwin crashes after swithing between OpenGL 2.0 to 3.1 and vice versa
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 343307 345554 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-07 15:59 UTC by athmanou
Modified: 2015-03-26 20:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
thomas.luebking: Intel+


Attachments
crash report (5.53 KB, text/plain)
2014-10-07 15:59 UTC, athmanou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description athmanou 2014-10-07 15:59:03 UTC
Created attachment 89014 [details]
crash report

Kwin always crashes when changing settings under Desktop Effects.
Mainly when swithcing from OpenGL 2.0 to OpenGL 3.1

Moreover, there are times that moving any window is quite slow
On the other hand, after a reboot -> problem is solved
But this happens radomly.
Comment 1 Thomas Lübking 2014-10-07 16:10:35 UTC
#5  0x00007f2787c0d31c in gen7_update_renderbuffer_surface () from /usr/lib64/dri/i965_dri.so
#6  0x00007f2787bfbc6d in brw_update_renderbuffer_surfaces () from /usr/lib64/dri/i965_dri.so
#7  0x00007f2787bc8bba in brw_upload_state () from /usr/lib64/dri/i965_dri.so
#8  0x00007f2787b77c57 in brw_draw_prims () from /usr/lib64/dri/i965_dri.so
#9  0x00007f27879ce973 in vbo_handle_primitive_restart () from /usr/lib64/dri/i965_dri.so
#10 0x00007f27879cfcd3 in vbo_validated_drawrangeelements () from /usr/lib64/dri/i965_dri.so
#11 0x00007f27879d0185 in vbo_exec_DrawElementsBaseVertex () from /usr/lib64/dri/i965_dri.so

driver bug.
you'll likely find a "gpu hang" in dmesg?

to be sure: you actually have a gen7 igp? (check glxinfo or lspci)
Comment 2 athmanou 2014-10-07 17:39:21 UTC
lspci output:
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:16.3 Serial controller: Intel Corporation 8 Series HECI KT (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-LM (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)
03:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)

no output of dmesg | grep gpu
Comment 3 Thomas Lübking 2014-10-07 18:08:47 UTC
Yes, is 7th gen

Try "grep -i" - it's uppercase (but i'm lazy on the phone "keyboard" ;-)
Also of course after such crash and before a reboot.
Comment 4 athmanou 2014-10-07 18:29:55 UTC
Still no output from dmesg| grep -i gpu

Now switching from OpenGL2.0 to OpenGL3.1 there was no crash,
But after rebooting moving a window is slower with ghosting and frame rate drop.

As you said, seems that's a graphics driver problem.
But the graphics card my laptop has is the: Intel® Integrated HD 4400 Graphics
and I have already installed xorg-x11-drv-intel.x86_64

Any ideas how I'm gonna solve this?
Comment 5 Thomas Lübking 2014-10-07 19:05:29 UTC
Do you also have trouble with GL 2.1? (GL 3.1 gets you no additional features - could be faster ... if not broken ;-)

Right now there's little you could do otherwise (except trying a different MESA version)

Fedora/RH bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1026530
(apparently reported before: https://bugzilla.redhat.com/show_bug.cgi?id=889726 )

Likely upstream bug:
https://bugs.freedesktop.org/show_bug.cgi?id=53055

(Though they're probably all caused by a hung GPU)
Comment 6 athmanou 2014-10-07 19:22:46 UTC
Thanks for the message.
Actually switching from OpenGL (any version) to XRender as composition type seems to work!!
and also have all the nice effects (... almost as some of them require OpenGL)

Should I wait for a new mesa? or stay with Xrender as default option?
Comment 7 Thomas Lübking 2014-10-07 21:39:57 UTC
If OpenGL compositing (actually any GL - this bug apparently hits chromium, openbox, ... as well)
doesn't work atm., XRender is certainly a viable option (as you figured, some effects don't work since XRender eg. doesn't have the concept of a frustum) there are no known XRender specific issues.


For less speculation on th nature of the issue (the fdo bug is actually on MESA 8.04), can you please record the output of

   qdbus org.kde.KWin /KWin supportInformation

(with enabled GL compositing!) and ideally install a debug version for mesa & intel-dri (so that you receive a backtrace with line numbers)?
Comment 8 Thomas Lübking 2015-01-27 10:54:06 UTC
*** Bug 343307 has been marked as a duplicate of this bug. ***
Comment 9 Thomas Lübking 2015-01-27 14:21:20 UTC
(In reply to Thomas Lübking from comment #8)
> *** Bug 343307 has been marked as a duplicate of this bug. ***

Comment #5 over there suggests potential relation to a resolution or dpi change during login:

   "By the way before KWin is crashing I can predict the crash, because the mouse cursor become smaller when KSplash has appeared (comparing to the Logon screen)."
Comment 10 Thomas Lübking 2015-01-28 16:14:55 UTC
Bug #343307 revealed glamor acceleration as culprit.

You may want to check
    grep -i glamor /var/log/Xorg.0.log
and if you are using glamor, revert to sna by adding

------- /etc/X11/xorg.conf.d/20-intel.conf ----------
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
EndSection
-----------------------------------------------------------------
Comment 11 Thomas Lübking 2015-03-26 20:01:33 UTC
*** Bug 345554 has been marked as a duplicate of this bug. ***