Bug 440294

Summary: Failing to reactivate drm sessions
Product: [Plasma] kwin Reporter: Aleix Pol <aleixpol>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Aleix Pol 2021-07-26 10:53:47 UTC
The easiest way to reproduce is by switching back and forth from the tty, but it can be reproduced when changing screen modes as well.

I did a bit of research and it seems the first failing instance is here:
* KWin::DrmBackend::deactivate
* KWin::DrmOutput::hideCursor
* KWin::DrmPipeline::setCursor
* drmModeSetCursor

strerror claims to be "Permission denied" there. DRM follows and just starts crashing after that. Reminds me of the problem I solved with 
b3ddb11b7cf8f9a817142903fa356bf764691cf7, which is now gone since several refactorings.
Comment 1 Zamundaaa 2021-09-12 23:33:58 UTC
Git commit e10f2ce06e6e69050698c41921d55527aab069db by Xaver Hugl.
Committed on 12/09/2021 at 23:28.
Pushed by zamundaaa into branch 'master'.

platforms/drm: correct property blob handling

If a property blob got created by another drm master we can't rely on
re-using it, so create a new blob of our own with the data copied over
when the kernel destroys it.
Also free property blob objects when we don't need them anymore.

M  +23   -0    src/plugins/platforms/drm/drm_object.cpp

https://invent.kde.org/plasma/kwin/commit/e10f2ce06e6e69050698c41921d55527aab069db