[Differential] [Request, 43 lines] D3132: [platformx/x11] Add a freeze protection against OpenGL
antlarr (Antonio Larrosa Jimenez)
noreply at phabricator.kde.org
Fri Oct 21 19:20:23 UTC 2016
antlarr created this revision.
antlarr added reviewers: KWin, Plasma, davidedmundson.
antlarr added subscribers: davidedmundson, plasma-devel, kwin.
antlarr added a project: Plasma.
Restricted Application edited projects, added KWin; removed Plasma.
REVISION 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
REPOSITORY
rKWIN KWin
BRANCH
arcpatch-D3127_1
REVISION DETAIL
https://phabricator.kde.org/D3132
AFFECTED FILES
composite.cpp
composite.h
platform.h
plugins/platforms/x11/standalone/x11_platform.cpp
plugins/platforms/x11/standalone/x11_platform.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: antlarr, #kwin, #plasma, davidedmundson
Cc: kwin, plasma-devel, davidedmundson, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161021/9b497ab5/attachment.html>
More information about the Plasma-devel
mailing list