kwin/plugins/platforms/x11/standalone
Antonio Larrosa 19147f5f85 [platformx/x11] Add a freeze protection against OpenGL
Summary:
With nouveau driver it can happen that KWin gets frozen when first trying
to render with OpenGL. This results in a freeze of the complete desktop
as the compositor is non functional.

Our OpenGL breakage detection is only able to detect crashes, but not
freezes. This change improves it by also added a freeze protection.

In the PreInit stage a thread is started with a QTimer of 15 sec. If the
timer fires, qFatal is triggered to terminate KWin. This can only happen
if the creation of the OpenGL compositor takes longer than said 15 sec.

In the PostInit stage the timer gets deleted and the thread stopeed
again.

Thus if a freeze is detected the OpenGL unsafe protection is written into
the config. KWin aborts and gets restarted by DrKonqui. The new KWin
instance will no longer try to activate the freezing OpenGL as the
protection is set.

If KWin doesn't freeze the protection is removed from the config as
we are used to.

Check for freezes for the first n frames, not just the first

This patch changes the freeze detection code to detect freezes in the
first 30 frames (by default, users can change that with the
KWIN_MAX_FRAMES_TESTED environment variable). This detects
successfully the freezes associated to nouveau drivers
in https://bugzilla.suse.com/show_bug.cgi?id=1005323

Reviewers: davidedmundson, #plasma, #kwin, graesslin

Reviewed By: #plasma, #kwin, graesslin

Subscribers: luebking, graesslin, kwin, plasma-devel, davidedmundson

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3132
2016-10-25 09:51:23 +02:00
..
CMakeLists.txt Move X11Cursor into the x11standalone platform plugin 2016-08-19 10:57:09 +02:00
edge.cpp Create screen edge through the Platform 2016-04-19 13:29:55 +02:00
edge.h Create screen edge through the Platform 2016-04-19 13:29:55 +02:00
glxbackend.cpp Remove the unredirect fullscreen windows functionality 2016-08-04 14:48:35 +02:00
glxbackend.h Move glxbackend to x11 standalone plugin 2016-04-15 07:46:02 +02:00
logging.cpp [plugins/platforms] Dedicated logging category for X11 standalone platform 2016-04-12 14:48:54 +02:00
logging.h [plugins/platforms] Dedicated logging category for X11 standalone platform 2016-04-12 14:48:54 +02:00
screens_xrandr.cpp
screens_xrandr.h
x11.json SVN_SILENT made messages (.desktop file) - always resolve ours 2016-10-24 12:07:39 +00:00
x11_platform.cpp [platformx/x11] Add a freeze protection against OpenGL 2016-10-25 09:51:23 +02:00
x11_platform.h [platformx/x11] Add a freeze protection against OpenGL 2016-10-25 09:51:23 +02:00
x11cursor.cpp Move X11Cursor into the x11standalone platform plugin 2016-08-19 10:57:09 +02:00
x11cursor.h Move X11Cursor into the x11standalone platform plugin 2016-08-19 10:57:09 +02:00
xinputintegration.cpp Add event filter for key press/release events while KWin grabbed keyboard on root window 2016-10-10 16:59:06 +02:00
xinputintegration.h Add event filter for key press/release events while KWin grabbed keyboard on root window 2016-10-10 16:59:06 +02:00