Bug 440294 - Failing to reactivate drm sessions
Summary: Failing to reactivate drm sessions
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-26 10:53 UTC by Aleix Pol
Modified: 2021-09-12 23:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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