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
edge.h
glx_context_attribute_builder.cpp
glx_context_attribute_builder.h
glxbackend.cpp
glxbackend.h
logging.cpp
logging.h
non_composited_outline.cpp
non_composited_outline.h
overlaywindow_x11.cpp
overlaywindow_x11.h
screenedges_filter.cpp
screenedges_filter.h
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
windowselector.h
x11.json
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
x11cursor.h
xinputintegration.cpp
xinputintegration.h