Bug 282461 - Desktop Grid unusable - Only shows the +/- buttons and then becomes unresponsive
Summary: Desktop Grid unusable - Only shows the +/- buttons and then becomes unresponsive
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-window-management (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 286023 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-21 08:58 UTC by Vishesh Handa
Modified: 2011-11-12 15:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments
Kwin backtrace (2.06 KB, application/octet-stream)
2011-09-21 12:12 UTC, Vishesh Handa
Details
Backtract after calling refresh (3.70 KB, application/octet-stream)
2011-09-21 17:45 UTC, Vishesh Handa
Details
New crash information added by DrKonqi (11.19 KB, text/plain)
2011-10-07 22:35 UTC, Alex G
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vishesh Handa 2011-09-21 08:58:20 UTC
Version:           git master (using Devel) 
OS:                Linux

This has been happening to me for a couple of weeks now, and its intensity seems to be increasing. Quite often when I active the desktop grid - Only the +/- signs are visible in the lower right corner. Plus, you can't do *anything* once the desktop grid gets activated. 

You cannot click on the +/- icons, nor can you click on any of the windows in the current desktop. No shortcuts works. Basically you system becomes unusable. The only method to get out of this is to restart the x server.

I run trunk, so I'm willing to test out patches. 

Reproducible: Always

Steps to Reproduce:
Active the desktop grid.

Actual Results:  
The +/- buttons are visible over the current desktop. All the desktops are not shown.

Expected Results:  
All the desktops should be shown.

If you want, I can take a photo of my laptop, when it is in that state.
Comment 1 Thomas Lübking 2011-09-21 11:47:43 UTC
sounds like kwin is in some live-lock (eg. the animation does never end?)

can you ctrl+alt+f1  (-> VT1); "gdb --pid `pidof kwin`"; "bt" to check where it's hanging around?

also: do you use present windows alongside the desktop grid (ie. are the windows arranged on each desktop)?
Comment 2 Vishesh Handa 2011-09-21 11:52:21 UTC
I think this was a problem on my end. Even plasma was crashing occasionally.

I did a complete reinstall of KDE - Removed my ~/kde directory (apart from the src), and all the build directories. That seems to have fixed it.

Sorry for the noise. If it happens again, I'll reopen the bug, and provide a backtrace.

( Yes, I do use present windows. )
Comment 3 Vishesh Handa 2011-09-21 12:12:03 UTC
Created attachment 63814 [details]
Kwin backtrace
Comment 4 Vishesh Handa 2011-09-21 12:12:49 UTC
It seems as though I spoke to soon. It happened again.
Comment 5 Thomas Lübking 2011-09-21 16:28:20 UTC
Seems stuck in Qt's event dispatcher.

- Is it Qt 4.8?
- How recent is the git master checkout? ("up-to-date"?, is this commit in: https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/562cabc9e76c8af356a68e91147934e80ae4e78b )
- if you "continue" gdb and "bt" again - is it still in the same function?
Comment 6 Vishesh Handa 2011-09-21 16:46:27 UTC
(In reply to comment #5)
> Seems stuck in Qt's event dispatcher.
> 
> - Is it Qt 4.8?

Nope. Qt 4.7.4-3 from the Arch repositories. If you want I could run Qt trunk. I do have the code. I just find it easier to stick with my distro packages.

> - How recent is the git master checkout? ("up-to-date"?, is this commit in:
> https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/562cabc9e76c8af356a68e91147934e80ae4e78b
> )

It has that commit. My checkout is about 8 hours old. Current head - 0a993565e89b90c621f26c3202d765ccb1f65733

> - if you "continue" gdb and "bt" again - is it still in the same function?

It seems to be working again. The moment it occurs, I'll try getting multiple backtraces. Maybe I could even call some dbus methods to check if kwin is responsive.
Comment 7 Vishesh Handa 2011-09-21 17:45:36 UTC
Created attachment 63824 [details]
Backtract after calling refresh

It happened again. I get the same backtrace each time.

I called 'qdbus org.kde.kwin /KWin refresh', and that didn't return for about 30 seconds, until I closed it forcibly ( Ctrl-C ). After that I took another backtrace, which I've attached.

Let me know, I can do anything else to better diagnose this bug.
Comment 8 Thomas Lübking 2011-09-21 19:16:13 UTC
#0  0x00007f6cfb645563 in poll () from /lib/libc.so.6
#1  0x00007f6cf6bfaba2 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007f6cf6bfc14f in xcb_wait_for_reply () from /usr/lib/libxcb.so.1
#3  0x00007f6d00c89c2d in _XReply () from /usr/lib/libX11.so.6
#4  0x00007f6d00c6da95 in XGetImage () from /usr/lib/libX11.so.6

Seems like the Qt eventloop is open, but the XServer is completely blocked.

Trying Qt4.8 is no good idea - probably adds more bugs ;-)

What hardware/driver (mesa/nvidia) do you use and also can you check whether this occurs only with the OpenGL or the XRender backend?
Anything else (other process, sth. special - please don't ask me ;-) that could perform an XGrabServer on this occasion?

Last:
in utils.cpp you'll find grabXServer() and ungrabXServer() (or similar)
if you'd add qWarning("grabbing x server"); and qWarning("ungrabbing x server"); and start KWin from VT1 ("export DISPLAY=:0; kwin --replace &") you could see whether kwin keeps the server grabbed or not (the last line should always start "unrgabbing"...)
Comment 9 Alex G 2011-10-07 22:35:10 UTC
Created attachment 64325 [details]
New crash information added by DrKonqi

kwin (4.7.41 (4.7.41 (KDE 4.8 >= 20110807)) on KDE Platform 4.7.41 (4.7.41 (KDE 4.8 >= 20110807) using Qt 4.8.0

Same experience as original poster; Ctrl+F8 to bring up desktop grid with present windows enabled. The mouse pointer changes and +/- icons appear, but the desktop grid does not. The kwin effect keeps focus, forcing an ALT+F1 and kwin --replace which produces the attached backtrace. 

Desktop grid used to work fine until very recently. Perhaps a week or two... initially the bug was intermittent.  Does not work with "present windows" disabled either.  I partly ruled out kwin commit 57f631497d18086db7de6bc4a8331721c53f53e8.

Qt 4.8 repository git://gitorious.org/qt/qt.git at commit:     55ea900361418aed0c23c0f0023a88b022c2b55d

Kwin repository git://anongit.kde.org/kde-workspace at the commit: d17dc35f704e4a7379ac618fb0de8547737eca3b

Have tried various nvidia blobs which I know used to work.  Happens both with xorg-server 1.11.1 and 1.10.4. All other kwin opengl effects work fine (present all windows, cube, etc).

-- Backtrace (Reduced):
#11 0x00007f8ec3eec184 in KWin::GLShader::setUniform (this=<optimized out>, location=5, value=<optimized out>) at /usr/src/debug/kde-base/kwin-9999/kwin-9999/kwin/libkwineffects/kwinglutils.cpp:516
#12 0x00007f8ec7439175 in KWin::SceneOpenGL::Window::restoreShaderRenderStates (this=<optimized out>, type=KWin::SceneOpenGL::Window::Content, opacity=<optimized out>, brightness=<optimized out>, saturation=<optimized out>, shader=<optimized out>) at /usr/src/debug/kde-base/kwin-9999/kwin-9999/kwin/scene_opengl.cpp:1046
#13 0x00007f8ec7440b25 in KWin::SceneOpenGL::Window::performPaint (this=0x17adae0, mask=545, region=..., data=<optimized out>) at /usr/src/debug/kde-base/kwin-9999/kwin-9999/kwin/scene_opengl.cpp:595
#14 0x00007f8ec7428cdb in KWin::Scene::finalDrawWindow (this=<optimized out>, w=<optimized out>, mask=545, region=<optimized out>, data=...) at /usr/src/debug/kde-base/kwin-9999/kwin-9999/kwin/scene.cpp:391
#15 0x00007f8ec744ed78 in KWin::EffectsHandlerImpl::drawWindow (this=<optimized out>, w=0x17c45a0, mask=545, region=<optimized out>, data=<optimized out>) at /usr/src/debug/kde-base/kwin-9999/kwin-9999/kwin/effects.cpp:282
Comment 10 Alex G 2011-10-24 11:44:53 UTC
After some testing I've narrowed it down to the commit which introduced the issue: bb6d4873259691b189a8b706f9dfc2e858f54609.

Desktop Grid works with at commit 5e8be6288cc34702bfabcc730bb1168e1c4e9eee.

So the issue lies somewhere in 'git diff bb6d4873259691b189a8b706f9dfc2e858f54609 5e8be6288cc34702bfabcc730bb1168e1c4e9eee'. A closer look at the changes between those two revisions should lead to a fix.
Comment 11 Martin Flöser 2011-10-24 15:48:07 UTC
Thanks for doing the bisecting and yeah that makes sense.

Could you please provide a list of the effects you have activated, so that I 
can compare with mine as it works for me (I guess there is some sideffect that 
another effect makes desktop grid work).
Comment 12 Alex G 2011-10-24 22:38:33 UTC
Hi Martin,

The list of effects kwin loads are:

"kwin4_effect_zoom"
"kwin4_effect_flipswitch"
"kwin4_effect_slidingpopups"
"kwin4_effect_logout"
"kwin4_effect_login"
"kwin4_effect_presentwindows"
"kwin4_effect_desktopgrid"
"kwin4_effect_minimizeanimation"
"kwin4_effect_translucency"
"kwin4_effect_screenshot"
"kwin4_effect_scalein"
"kwin4_effect_dashboard"
"kwin4_effect_boxswitch"
"kwin4_effect_cube"
"kwin4_effect_coverswitch"
"kwin4_effect_slide"
"kwin4_effect_outline"
"kwin4_effect_dialogparent"
"kwin4_effect_startupfeedback"

Hopefully you manage to recreate the issue. I can provide more logs/details, and test any patches. Thanks,

Alex.
Comment 13 Alex G 2011-11-06 23:30:35 UTC
Desktop grid now works again with my configuration. I don't know if it was a commit which resolved the issue or the latest nvidia driver 290.06.

This was tested as working with kde-workspace commit f6a3166cf614fffaa95d4fbd1e2bd7fd18491045.
Comment 14 Martin Flöser 2011-11-12 15:17:12 UTC
*** Bug 286023 has been marked as a duplicate of this bug. ***
Comment 15 Martin Flöser 2011-11-12 15:18:27 UTC
Git commit a710c2f721fbde954085bc677d3e7babef1b77aa by Martin Gräßlin.
Committed on 12/11/2011 at 16:17.
Pushed by graesslin into branch 'master'.

Fix desktop grid without present windows mode

Effect was not marked as active.
BUG: 282461
FIXED-IN: 4.8.0

M  +1    -1    kwin/effects/desktopgrid/desktopgrid.cpp

http://commits.kde.org/kde-workspace/a710c2f721fbde954085bc677d3e7babef1b77aa