kwin/plugins/platforms/x11/standalone
Martin Flöser a7117e4304 Don't use the global KConfig object on the OpenGL freeze detection thread
Summary:
This is meant to address Bug 372114. The problem here is that the KConfig
object (and its derivatives), that the freeze detection thread needs to
record the freeze, are not thread safe. When it happens that the main
thread is in fact not frozen, it is possible that the two stomp on each
other's KConfig object.

The solution applied here is to use the KSharedConfig::openConfig
function, which is thread safe, on the freeze detection thread. As was
mentioned by Martin Flöser in the discussion, the thread needs to obey
the name of the main config file of KWin, which can change in the future.

As a secondary issue, this patch also turns off KCrash reporting for
aborts due to a freeze being detected. IMO it is not very user friendly
to still show a crash report to the user, even after this bug is fixed,
for the deliberate SIGABRT. Maybe a less intrusive notification could be
used to tell the user why effects are suddenly disabled?

I've been using kwin with this change for several weeks now and it makes
the restarts of kwin due to freezes unobtrusive. However, most (I would
say almost all) of these freezes are actually instances where the system
 is being slow after eg. screen resolution is changed.

BUG: 372114
FIXED-IN: 5.11.3

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: ngraham, graesslin, anthonyfieroni, cfeck, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8356
2017-11-05 10:25:24 +01:00
..
CMakeLists.txt Don't use the global KConfig object on the OpenGL freeze detection thread 2017-11-05 10:25:24 +01:00
edge.cpp [platforms/x11] Fix incorrect screen edge approaching with switch desktop on window move 2017-07-06 19:12:28 +02:00
edge.h [platforms/x11] Fix incorrect screen edge approaching with switch desktop on window move 2017-07-06 19:12:28 +02:00
glx_context_attribute_builder.cpp [platforms/x11] Use a GlxContextAttributeBuilder 2017-08-19 11:34:51 +02:00
glx_context_attribute_builder.h [platforms/x11] Use a GlxContextAttributeBuilder 2017-08-19 11:34:51 +02:00
glxbackend.cpp [platforms/x11] Use a GlxContextAttributeBuilder 2017-08-19 11:34:51 +02:00
glxbackend.h Remove KWin::display from kwinglobals 2016-11-16 18:00:00 +01: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
non_composited_outline.cpp Move NonComposited Outline into the X11 standalone platform 2017-09-01 17:07:23 +02:00
non_composited_outline.h Move NonComposited Outline into the X11 standalone platform 2017-09-01 17:07:23 +02:00
overlaywindow_x11.cpp Move event filtering for overlay window into an X11EventFilter 2017-08-12 11:32:53 +02:00
overlaywindow_x11.h Move event filtering for overlay window into an X11EventFilter 2017-08-12 11:32:53 +02:00
screenedges_filter.cpp Move X11 specific event filtering for ScreenEdges into x11 standalone platform 2017-09-01 17:01:01 +02:00
screenedges_filter.h Move X11 specific event filtering for ScreenEdges into x11 standalone platform 2017-09-01 17:01:01 +02:00
screens_xrandr.cpp Try fixing build failure on CI 2017-09-12 21:20:18 +02:00
screens_xrandr.h Port some displayWidth/displayHeight usages to Screens::size() 2017-09-01 17:11:10 +02:00
windowselector.cpp Support interactive window selection through the Platform 2016-11-17 08:08:56 +01:00
windowselector.h Support interactive window selection through the Platform 2016-11-17 08:08:56 +01:00
x11.json SVN_SILENT made messages (.desktop file) - always resolve ours 2017-08-30 08:05:15 +02:00
x11_decoration_renderer.cpp Move the X11 Decoration Renderer into the X11 standalone platform 2017-09-01 17:49:32 +02:00
x11_decoration_renderer.h Move the X11 Decoration Renderer into the X11 standalone platform 2017-09-01 17:49:32 +02:00
x11_platform.cpp Don't use the global KConfig object on the OpenGL freeze detection thread 2017-11-05 10:25:24 +01:00
x11_platform.h Move screen inversion through XRandr into X11 standalone platform 2017-09-01 18:04:28 +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 [platformx/x11] Fix touch events for internal Qt windows 2017-05-02 20:32:58 +02:00
xinputintegration.h Split modifier only handling into a dedicated InputEventSpy 2017-02-14 17:02:18 +01:00