Skip to content

Fix DrmOutput sometimes being freed with a pending pageflip, often when waking from sleep.

Andreas Haratzis requested to merge adre/kwin:fix_drm_unsafe_teardown into master

Hi all!

Back at it again with some hacky bug fixes :D

I noticed this assert would fire whenever I woke my multi-monitor workstation from sleep. It seems that through all the screen shuffling, something is prepared for render before an output is destroyed. I'm still trying to grok the DRM backend, so I'm not sure how this could happen. Perhaps this is the page flip before the computer went to sleep? Or perhaps the ordering of events is subtly wrong, but I can't see it.

Either way, I thiiink this should fix the issue. The page flip handler in the DrmOutput should immediately destroy itself, and I can't see any other lingering references or signals to the output. I've been using this for a few days and haven't been able to repo the assert since. That being said, there's no worries if this is not the right approach to deal with the issue. Happy to look into other approaches!

I've also attached a backtrace of the original assert below, for context. crash_after_waking

Merge request reports