Bug 343307 - Kwin crashes on desktop startup
Summary: Kwin crashes on desktop startup
Status: RESOLVED DUPLICATE of bug 339760
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 4.11.14
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
: 347192 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-26 07:17 UTC by Attila
Modified: 2015-07-02 11:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output of qdbus (5.49 KB, text/plain)
2015-01-27 07:43 UTC, Attila
Details
Mouse cursor small (7.53 KB, image/png)
2015-01-28 14:04 UTC, Attila
Details
Mouse cursor default (7.86 KB, image/png)
2015-01-28 14:04 UTC, Attila
Details
New crash information added by DrKonqi (4.47 KB, text/plain)
2015-07-02 11:47 UTC, Bruno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Attila 2015-01-26 07:17:25 UTC
Application: kwin (4.11.14)
KDE Platform Version: 4.14.3
Qt Version: 4.8.6
Operating System: Linux 3.17.8-200.fc20.i686+PAE i686
Distribution: "Fedora release 20 (Heisenbug)"

-- Information about the crash:
- What I was doing when the application crashed:
Logged into KDE. Kwin crashes on desktop startup and 3D effects are disabled.

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash Handler]
#6  0xb3232e61 in gen7_update_renderbuffer_surface () from /usr/lib/dri/i965_dri.so
#7  0xb3221595 in brw_update_renderbuffer_surfaces () from /usr/lib/dri/i965_dri.so
#8  0xb31f9775 in brw_upload_state () from /usr/lib/dri/i965_dri.so
#9  0xb31a93d7 in brw_draw_prims () from /usr/lib/dri/i965_dri.so
#10 0xb2fdecbb in vbo_draw_arrays () from /usr/lib/dri/i965_dri.so
#11 0xb2fdefb2 in vbo_exec_DrawArrays () from /usr/lib/dri/i965_dri.so
#12 0x4bb31c86 in glDrawArrays () from /lib/libGL.so.1
#13 0x449a02d1 in KWin::GLVertexBuffer::draw(QRegion const&, unsigned int, int, int, bool) () from /lib/libkwinglutils.so.1
#14 0x449a3abf in KWin::GLVertexBuffer::render(QRegion const&, unsigned int, bool) () from /lib/libkwinglutils.so.1
#15 0x449a3b5a in KWin::GLVertexBuffer::render(unsigned int) () from /lib/libkwinglutils.so.1
#16 0x457d1d7e in KWin::SceneOpenGL2::doPaintBackground(QVector<float> const&) () from /lib/libkdeinit4_kwin.so
#17 0x457d5a23 in KWin::SceneOpenGL::paintBackground(QRegion) () from /lib/libkdeinit4_kwin.so
#18 0x457c373b in KWin::Scene::paintSimpleScreen(int, QRegion) () from /lib/libkdeinit4_kwin.so
#19 0x457c0c89 in KWin::Scene::finalPaintScreen(int, QRegion, KWin::ScreenPaintData&) () from /lib/libkdeinit4_kwin.so
#20 0x457e98ab in KWin::EffectsHandlerImpl::paintScreen(int, QRegion, KWin::ScreenPaintData&) () from /lib/libkdeinit4_kwin.so
#21 0x457c3959 in KWin::Scene::paintScreen(int*, QRegion const&, QRegion const&, QRegion*, QRegion*) () from /lib/libkdeinit4_kwin.so
#22 0x457d9678 in KWin::SceneOpenGL::paint(QRegion, QList<KWin::Toplevel*>) () from /lib/libkdeinit4_kwin.so
#23 0x457b95a8 in KWin::Compositor::performCompositing() () from /lib/libkdeinit4_kwin.so
#24 0x457babee in KWin::Compositor::slotCompositingOptionsInitialized() () from /lib/libkdeinit4_kwin.so
#25 0x4572d690 in KWin::Compositor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.47] () from /lib/libkdeinit4_kwin.so
#26 0x4ab6ff85 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib/libQtCore.so.4
#27 0x4abbffd6 in QFutureWatcherBase::finished() () from /lib/libQtCore.so.4
#28 0x4aa2b7cc in QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent*) () from /lib/libQtCore.so.4
#29 0x4aa2baac in QFutureWatcherBase::event(QEvent*) () from /lib/libQtCore.so.4
#30 0x4b0feb84 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/libQtGui.so.4
#31 0x4b105ab9 in QApplication::notify(QObject*, QEvent*) () from /lib/libQtGui.so.4
#32 0x4685e830 in KApplication::notify(QObject*, QEvent*) () from /lib/libkdeui.so.5
#33 0x457662ea in KWin::Application::notify(QObject*, QEvent*) () from /lib/libkdeinit4_kwin.so
#34 0x4ab5a1f6 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib/libQtCore.so.4
#35 0x4ab5d73a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/libQtCore.so.4
#36 0x4ab5dc3d in QCoreApplication::sendPostedEvents(QObject*, int) () from /lib/libQtCore.so.4
#37 0x4b1b5b6a in QEventDispatcherX11::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/libQtGui.so.4
#38 0x4ab58a90 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/libQtCore.so.4
#39 0x4ab58e21 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/libQtCore.so.4
#40 0x4ab5ec4b in QCoreApplication::exec() () from /lib/libQtCore.so.4
#41 0x4b0fcea5 in QApplication::exec() () from /lib/libQtGui.so.4
#42 0x4576769a in kdemain () from /lib/libkdeinit4_kwin.so
#43 0x0804884c in main ()

Possible duplicates by query: bug 339760, bug 331881, bug 331837, bug 331189, bug 331031.

Reported using DrKonqi
Comment 1 Thomas Lübking 2015-01-26 16:10:46 UTC
Driver bug - did you enable OpenGL 3.1?

What's the output of
   qdbus org.kde.KWin /KWin supportInformation
Comment 2 Attila 2015-01-27 07:43:01 UTC
Created attachment 90687 [details]
Output of qdbus
Comment 3 Attila 2015-01-27 07:44:09 UTC
(In reply to Thomas Lübking from comment #1)
> Driver bug - did you enable OpenGL 3.1?
> 
> What's the output of
>    qdbus org.kde.KWin /KWin supportInformation

OpenGL 3.1 is enabled. After KWin crashed, desktop effects are off. Windows are wobbling. Logout seems also not to work. I see a black screen and the mouse cursor.
Comment 4 Thomas Lübking 2015-01-27 10:54:06 UTC
the support information indicate that
a) the compositor is active
b) the wobbly winow effect is not loaded (thus likely disabled)

please set the compositor backend to opengl 2.0, reboot and see whether the crash still occurs

theblack screen + cursor on logout indicates that the session is not terminated what may or maybe not related to this problem (we'll see ;-)

*** This bug has been marked as a duplicate of bug 339760 ***
Comment 5 Attila 2015-01-27 14:14:41 UTC
(In reply to Thomas Lübking from comment #4)
> the support information indicate that
> a) the compositor is active
> b) the wobbly winow effect is not loaded (thus likely disabled)
> 
> please set the compositor backend to opengl 2.0, reboot and see whether the
> crash still occurs
> 
> theblack screen + cursor on logout indicates that the session is not
> terminated what may or maybe not related to this problem (we'll see ;-)
> 
> *** This bug has been marked as a duplicate of bug 339760 ***

The crash still occurs with compositor backend OpenGL 2.0 and reboot.
I changed the settings to OpenGL 3.1 again and did a reboot. At this time no crash of KWin, 3D effects are on. It seems that it some times works. 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).

Regarding the wobbly window effect: That was a misunderstanding. I did not mean the nice wobbly effect. I wanted to say that it looks like a kind of wobbly effect when moving a window on the desktop, because the "repainting" of the window is very slow.
Comment 6 Thomas Lübking 2015-01-27 14:27:34 UTC
(In reply to Attila from comment #5)

> wobbly effect when moving a window on the desktop, because the "repainting"
> of the window is very slow.

That's "expectable" - w/o compositor every window needs to repaint newly exposed regions. Depending on the toolkit, gui style and actual content, that can be very slow.
Rather use XRender compositing in that case.

Other things you might want to check are
- Qt Graphics System: native -> raster
- whether you're using glamor or sna acceleration: "grep -i glamor /var/log/Xorg.0.log"
Comment 7 Attila 2015-01-27 15:13:24 UTC
(In reply to Thomas Lübking from comment #6)
> (In reply to Attila from comment #5)

> Other things you might want to check are
> - Qt Graphics System: native -> raster
> - whether you're using glamor or sna acceleration: "grep -i glamor
> /var/log/Xorg.0.log"

Qt Graphics System is native.

Output of Xorg.0.log:
[    35.198] (II) LoadModule: "glamoregl"
[    35.562] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[    35.564] (II) Module glamoregl: vendor="X.Org Foundation"
Comment 8 Thomas Lübking 2015-01-27 15:23:13 UTC
(In reply to Attila from comment #7)

> Qt Graphics System is native.
Yes - the idea was to try the raster graphcissystem instead.

> Output of Xorg.0.log:
> [    35.198] (II) LoadModule: "glamoregl"
> [    35.562] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
> [    35.564] (II) Module glamoregl: vendor="X.Org Foundation"

------- /etc/X11/xorg.conf.d/20-intel.conf ----------
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
EndSection
-----------------------------------------------------------------
Comment 9 Attila 2015-01-27 16:00:44 UTC
(In reply to Thomas Lübking from comment #8)
> (In reply to Attila from comment #7)
> 
> > Qt Graphics System is native.
> Yes - the idea was to try the raster graphcissystem instead.
> 
> > Output of Xorg.0.log:
> > [    35.198] (II) LoadModule: "glamoregl"
> > [    35.562] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
> > [    35.564] (II) Module glamoregl: vendor="X.Org Foundation"
> 
> ------- /etc/X11/xorg.conf.d/20-intel.conf ----------
> Section "Device"
>    Identifier  "Intel Graphics"
>    Driver      "intel"
>    Option      "AccelMethod"  "sna"
> EndSection
> -----------------------------------------------------------------

The Qt Graphics System is still nativ. I have created the file 20-intel.conf.
The output is now:
[    45.493] (**) intel(0): Option "AccelMethod" "sna"
[    45.493] (II) intel(0): SNA initialized with Haswell (gen7.5, gt2) backend
[    45.789] (II) intel(0): SNA initialized with Haswell (gen7.5, gt2) backend

Did my second reboot and it seems to work at every reboot. Please do not close this report. I will check tomorrow again.
Comment 10 Attila 2015-01-28 14:02:43 UTC
No crash with SNA acceleration.
However the default setting for acceleration is glamoregl. Is it a KWin or driver bug by Intel?

The other thing I mentioned is that different mouse cursor size. For example when I point to the title bar the mouse cursor becomes smaller (see attached file "MouseCursorSmall"). Sometimes I reboot the system twice (to reproduce) and the mouse cursor has the same size (see attached file "MouseCursorDefault") pointing to the title bar or to somewhere else. This is a different behavior. I am not sure, is that a KWin bug or should I report it somwhere else?
Comment 11 Attila 2015-01-28 14:04:10 UTC
Created attachment 90747 [details]
Mouse cursor small
Comment 12 Attila 2015-01-28 14:04:58 UTC
Created attachment 90748 [details]
Mouse cursor default
Comment 13 Thomas Lübking 2015-01-28 16:18:39 UTC
(In reply to Attila from comment #10)
> No crash with SNA acceleration.
> However the default setting for acceleration is glamoregl. Is it a KWin or
> driver bug by Intel?

Intel. Glamor is still pretty new.

> The other thing I mentioned is that different mouse cursor size.
This is likely caused by the early start of KWin and a later change of the global cursor size (resp. ignorance of that by the early configuration)

Since the entire stuff around cursors changed *drastically* in KDE5, there won't be any fix in that regard for 4.x (only security bugsfixes are "permitted")

-> If that happens with 5.2, please report an extra bug.
If it happens with 5.1, please try 5.2 first ;-) (due to recent patches)

For 4.x it would likely be sufficient to
------ ~/.kde/env/set_cursor_size.sh ----------
#!/bin/sh
export XCURSOR_SIZE=32
---------------------------------------------------------

while that should be done by /usr/bin/startkde
Comment 14 Thomas Lübking 2015-05-06 20:50:48 UTC
*** Bug 347192 has been marked as a duplicate of this bug. ***
Comment 15 Bruno 2015-07-02 11:47:50 UTC
Created attachment 93454 [details]
New crash information added by DrKonqi

kwin (4.11.11) on KDE Platform 4.14.2 using Qt 4.8.6

- What I was doing when the application crashed: Login to KDE

- Unusual behavior I noticed: Whenever I login The desktop is all black and displays the message "Kwin has crashed." After Desktop back to normal.

- Custom settings of the application: Bespin Theme

-- Backtrace (Reduced):
#7  KWin::Scene::paintSimpleScreen (this=this@entry=0x9a29748, orig_mask=orig_mask@entry=0, region=...) at ../../kwin/scene.cpp:261
#8  0xb7628987 in KWin::Scene::finalPaintScreen (this=0x9a29748, mask=mask@entry=0, region=..., data=...) at ../../kwin/scene.cpp:198
#9  0xb764fc53 in KWin::EffectsHandlerImpl::paintScreen (this=0x9dc1d20, mask=0, region=..., data=...) at ../../kwin/effects.cpp:375
#10 0xb762b3cc in KWin::Scene::paintScreen (this=this@entry=0x9a29748, mask=mask@entry=0xbf964870, damage=..., repaint=..., updateRegion=updateRegion@entry=0xbf964874, validRegion=validRegion@entry=0xbf964878) at ../../kwin/scene.cpp:148
#11 0xb7640287 in KWin::SceneOpenGL::paint (this=this@entry=0x9a29748, damage=..., toplevels=...) at ../../kwin/scene_opengl.cpp:389
Comment 16 Thomas Lübking 2015-07-02 11:52:25 UTC
See https://bugs.kde.org/show_bug.cgi?id=339760#c10