Add graphics reset to the OpenGL compositing safety checks
AbandonedPublic

Authored by graesslin on Nov 7 2016, 7:58 AM.

Details

Reviewers
hein
Group Reviewers
Plasma
KWin
Summary

If a graphics reset happens during compositing startup it is possible
that the next try to start compositing will run into the same graphics
reset. In that case KWin would be in an endless restart compositor loop.

This change makes use of the frames to test for safety. If a graphics
reset happens while there are still frames to test we consider the
OpenGL context broken and don't re-enable compositing.

It is not clear whether the number of frames to test is sufficient. In
the bug report we have for the problem, it seems to be during effect
loading. After each loaded effect a frame could be rendered, so maybe
the three frames to test by default are not sufficient.

In master we should also show a notification why compositing got
disabled.

CCBUG: 372145

Diff Detail

Repository
R108 KWin
Branch
safety-check-graphics-reset-5.8
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin updated this revision to Diff 7951.Nov 7 2016, 7:58 AM
graesslin retitled this revision from to Add graphics reset to the OpenGL compositing safety checks.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin. · View Herald TranscriptNov 7 2016, 7:58 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
hein added a subscriber: hein.Nov 7 2016, 9:30 AM

Would it make sense to increase the number of test frames right now, if we're uncertain about whether there's enough? What's the trade-of there?

This is now replaced by 19147f5f85bd87a1fedb460939dfdcef76ed7242 by antlarr

err no, that is building up on top of that change.

In D3288#61183, @hein wrote:

Would it make sense to increase the number of test frames right now, if we're uncertain about whether there's enough? What's the trade-of there?

no, the test frames have a real cost, so we want to have them as low as possible. This change will still be able to detect and protect against graphics reset during startup and at least the very first frame. That's an improvement over how it currently is.

Unfortunately we cannot properly test the condition. Thus we need to gain experience here.

hein accepted this revision.Nov 7 2016, 10:14 AM
hein added a reviewer: hein.

Aye, thx.

This revision is now accepted and ready to land.Nov 7 2016, 10:14 AM
graesslin abandoned this revision.Nov 8 2016, 6:19 AM

User tested the change and having the thread protection from 5.8.3 in place is sufficient to detect the freeze completely without this change.