Fix greeter crashing with software rendering on wayland
ClosedPublic

Authored by fvogt on Dec 23 2017, 10:42 PM.

Details

Summary

kscreenlocker_greet crashes inside Mesa when running with llvmpipe or softpipe.
This is because it creates file-backed buffers for DRI2 surfaces.
So just allow creation of files for the affected targets.

Test Plan

Ran a windowed kwin_wayland session and started kscreenlocker_greet with
LIBGL_ALWAYS_SOFTWARE=1. Now it works.

Diff Detail

Repository
R133 KScreenLocker
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
fvogt created this revision.Dec 23 2017, 10:42 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 23 2017, 10:42 PM
fvogt requested review of this revision.Dec 23 2017, 10:42 PM

Also needs https://phabricator.kde.org/D9495 as llvmpipe/softpipe are not detected properly without.

fvogt updated this revision to Diff 24348.Dec 23 2017, 10:49 PM

Re-add blank line.

graesslin accepted this revision.Dec 24 2017, 9:18 AM

It's telling me more and more: add apparmor ;-)

This revision is now accepted and ready to land.Dec 24 2017, 9:18 AM
This revision was automatically updated to reflect the committed changes.

I'm not sure what to do with the https://phabricator.kde.org/D9495 fixes for kscreenlocker.
Just copying over the files with the bug fixed won't work as it depends on XCB and libexpoxy now and needs to know whether it's running on EGL or GLX (KWin::NoOpenGLPlatformInterface should work, I guess).
Should I just "backport" the gallium fix into kwinglplatform.cpp for 5.11? What to do for master? Branching kwinglplatform.cpp here is probably not a good idea.

The kwinglutils.cpp in kscreenlocker are not a 1:1 copy from KWin. It has everything specific from KWin removed.

I think the best solution would be to take the same approach and "manually" cherry-pick the patch.

fvogt added a comment.Dec 24 2017, 1:51 PM

The kwinglutils.cpp in kscreenlocker are not a 1:1 copy from KWin. It has everything specific from KWin removed.

I think the best solution would be to take the same approach and "manually" cherry-pick the patch.

Ok, did that to Plasma/5.11 (no review as it's identical to P9496) and merged to master.