| Summary: | after commit 03f77c flickering on external screen and when atomic modeset is disabled, kwin crashes | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | fanzhuyifan |
| Component: | compositing | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | kde, nate |
| Priority: | NOR | Keywords: | regression |
| Version First Reported In: | 6.5.80 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
external screen flickering
desktop transition setting backtrace for kwin crash when atomic modeset is disabled |
||
|
Description
fanzhuyifan
2025-12-05 06:44:43 UTC
>I tested the commit before 03f77cf9e7041d4eeefc7c9da9de4ee7284c9920 for quite a while and cannot see the issue. Hence I am fairly sure that 03f77c is the first bad commit.
You need to test the commit both sides to be able to be able to confirm that.
Can you test running 03f77c itself and confirm it *does* happen again.
Or run master and just revert that commit.
My change should not be affecting normal usage nor switching desktops, only the overview effect and a few other QtQuick places. I can't see why it would affect anything else.
(In reply to David Edmundson from comment #1) > >I tested the commit before 03f77cf9e7041d4eeefc7c9da9de4ee7284c9920 for quite a while and cannot see the issue. Hence I am fairly sure that 03f77c is the first bad commit. > > You need to test the commit both sides to be able to be able to confirm that. > Can you test running 03f77c itself and confirm it *does* happen again. I did test that, and the issue does happen. Sorry for not being clear about this. > Or run master and just revert that commit. On master I observed the issue quite frequently (like at least once every minute). After reverting the commit and running for >5 minutes, I cannot observe the issue. Note: there is a slight conflict that needs to be resolved when reverting 03f77c. > My change should not be affecting normal usage nor switching desktops, only > the overview effect and a few other QtQuick places. I can't see why it would > affect anything else. Does the sliding animation for transitioning desktops depend on QtQuick? See attachment for my setting. Also I am on a dual GPU system, and I think external monitors are connected to the nvidia dGPU. Not sure if that is relevant here. Created attachment 187375 [details]
desktop transition setting
Another piece of information: While using the touchpad to transition virtual desktops, the issue only happens when I release and let the desktop slide into place, and never in the middle when I am still actively sliding. The more serious issue seems be that after this commit, when I disable atomic mode setting (`KWIN_DRM_NO_AMS=1`), kwin consistently crashes. (I tested both on master, consistent crash, and with the commit reverted, consistent crash) For full backtrace, see attachment. The issue seems to be `gpu->m_defunctCommits` becomes corrupted at kwin/src/backends/drm/drm_gpu.cpp:544 (https://invent.kde.org/plasma/kwin/-/blob/1b4896c218dd705742dcd091665db27702c3525d/src/backends/drm/drm_gpu.cpp#L544) > +p gpu->m_defunctCommits > $1 = std::vector of length -137438961664, capacity -137438961625 = {Cannot access memory at address 0x10000010000 Created attachment 187438 [details]
backtrace for kwin crash when atomic modeset is disabled
(In reply to fanzhuyifan from comment #5) > (I tested both on master, consistent crash, and with the commit reverted, > consistent crash) Apologies -- I mean with commit reverted, consistent *no* crash Some additional debugging: Still observe glitches when internal and external screen both set to 60Hz. Adaptive sync setting for internal screen doesn't seem to change things (I tried always, automatic, and never) - only using nvidia dGPU through bias setting No glitches, but still crashes when `KWIN_DRM_NO_AMS=1` - forcing sync Setting KWIN_DRM_FORCE_GL_FINISH_MGPU_COPY=1 and KWIN_DRM_FORCE_GL_FINISH_PRESENT=1 No glitches. When `KWIN_DRM_NO_AMS=1`, still crashes. Looking at backtrace, segfault on same line (pageFlipHandler, handling defunct commits). Issue is commit->gpu() is null. - using Nouveau crashes, even when not setting `KWIN_DRM_NO_AMS=1`. In the backtrace, commit->gpu() is null. This does not happen with the commit 03f77c reverted. I think this indicates that the issue is not with the nvidia proprietary driver. - with 03f77c reverted, and https://invent.kde.org/plasma/kwin/-/merge_requests/7980 (commit ad1eb9b215043fafb017a1a3a51790739930d6e0) applied No glitches, and no crashes when setting `KWIN_DRM_NO_AMS=1` |