Bug 521954 - KWin crashed in KWin::Workspace::activeWindow when I logged out manually.
Summary: KWin crashed in KWin::Workspace::activeWindow when I logged out manually.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.7.0
Platform: Fedora RPMs Linux
: HI crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
: 521986 522121 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-06-21 23:50 UTC by Filipo Becerra
Modified: 2026-06-27 21:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.1
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/447987/events/81a9c30b16454802ad05cae2c91bb472/


Attachments
New crash information added by DrKonqi (72.92 KB, text/plain)
2026-06-21 23:50 UTC, Filipo Becerra
Details
KWin X11 logs, coredump info, and NVIDIA/DRM kernel excerpts (7.19 KB, application/gzip)
2026-06-25 05:24 UTC, Ed
Details
Photo of initial Cold Boot (2.71 MB, image/jpeg)
2026-06-26 02:08 UTC, Ed
Details
Recovered logout/login output logs for comparison with bad cold-boot state (9.03 KB, application/gzip)
2026-06-26 18:33 UTC, Ed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filipo Becerra 2026-06-21 23:50:31 UTC
Application: kwin_wayland (6.7.0)

ApplicationNotResponding [ANR]: false
Qt Version: 6.11.1
Frameworks Version: 6.27.0
Operating System: Linux 7.0.12-201.fc44.x86_64 x86_64
Windowing System: Wayland
Distribution: "Fedora Linux 44 (KDE Plasma Desktop Edition)"
DrKonqi: 6.7.0 [CoredumpBackend]

-- Information about the crash:
Before logging out, I manually closed all active applications, then refreshed the system and logged out (without restarting).

When I logged back in, plasma-drkonki reported that KWin had crashed unexpectedly.

The reporter is unsure if this crash is reproducible.

-- Backtrace (Reduced):
#4  KWin::Workspace::activeWindow (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/workspace.h:793
#5  KWin::RenderLoop::activeWindowControlsVrrRefreshRate (this=<optimized out>) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/core/renderloop.cpp:279
#6  0x00007f5157e86fb4 in operator() (__closure=0x555e4e053f10) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/compositor.cpp:600
#7  operator() (__closure=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:117
#11 QtPrivate::QCallableObject<KWin::Compositor::setupLayers(KWin::SceneView*, KWin::LogicalOutput*, KWin::BackendOutput*, const QList<KWin::OutputLayer*>&, const std::unordered_map<KWin::OutputLayer*, KWin::Item*>&, const std::shared_ptr<KWin::OutputFrame>&, SetupType, std::unordered_set<KWin::OutputLayer*>&)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x555e4e053f00, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:548
#12 0x00007f5154f84eb7 in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=0x555e4d588790, a=<optimized out>) at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/corelib/kernel/qobjectdefs_impl.h:462
#13 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/corelib/kernel/qobject.cpp:4372
#14 0x00007f515805877a in KWin::Item::scheduleRepaintInternal (this=0x555e4cb67ea0, region=...) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/scene/item.cpp:457
#15 0x00007f51580587cf in KWin::Item::scheduleRepaint (this=<optimized out>, region=...) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/scene/item.cpp:433
#16 0x00007f5158058815 in KWin::Item::scheduleRepaint (this=<optimized out>, region=...) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/scene/item.cpp:615
#17 0x00007f515806be14 in KWin::ItemTreeView::setExclusive (this=0x555e4d588790, enable=<optimized out>) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/scene/scene.cpp:579
#18 0x00007f515806be75 in KWin::ItemTreeView::~ItemTreeView (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/scene/scene.cpp:492
#19 0x00007f5157e7e8e9 in KWin::ItemTreeView::~ItemTreeView (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kwin-6.7.0-1.fc44.x86_64/src/scene/scene.cpp:493
#20 std::default_delete<KWin::ItemView>::operator() (this=<optimized out>, __ptr=0x555e4d588790) at /usr/include/c++/16/bits/unique_ptr.h:92
#21 std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> >::~unique_ptr (this=<optimized out>, this=<optimized out>) at /usr/include/c++/16/bits/unique_ptr.h:408
#22 std::pair<KWin::OutputLayer* const, std::unique_ptr<KWin::ItemView, std::default_delete<KWin::ItemView> > >::~pair (this=<optimized out>, this=<optimized out>) at /usr/include/c++/16/bits/stl_pair.h:305


Reported using DrKonqi
Comment 1 Filipo Becerra 2026-06-21 23:50:33 UTC
Created attachment 193505 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Vlad Zahorodnii 2026-06-22 06:29:54 UTC
*** Bug 521909 has been marked as a duplicate of this bug. ***
Comment 3 TraceyC 2026-06-22 18:50:32 UTC
*** Bug 521986 has been marked as a duplicate of this bug. ***
Comment 4 TraceyC 2026-06-22 18:53:22 UTC
There has been a significant uptick of events for this backtrace in Sentry since June 18. 87% of all events are in Plasma 6.7.0.
Comment 5 Vlad Zahorodnii 2026-06-23 05:45:16 UTC
Git commit 4279106e8a3b4db4fd869ef661f07368a703a024 by Vlad Zahorodnii.
Committed on 23/06/2026 at 05:17.
Pushed by vladz into branch 'master'.

Stop compositing before destroying the workspace and compositor

Both the Compositor and the Workspace are coupled very strongly,
unfortunately. This creates a series of issues when kwin starts and
stops. It's an architectural problem.

At shutdown, the compositor is destroyed after the workspace, but the
render scheduling code needs the workspace. This change makes kwin stop
compositing before destroying the two to make the teardown process less
surprising.

M  +3    -0    autotests/integration/kwin_wayland_test.cpp
M  +2    -4    src/compositor.cpp
M  +3    -0    src/main_wayland.cpp

https://invent.kde.org/plasma/kwin/-/commit/4279106e8a3b4db4fd869ef661f07368a703a024
Comment 6 Vlad Zahorodnii 2026-06-23 05:45:18 UTC
Git commit 5df5a6923eb2c4e2bd8ecdf528d4d70b7e327871 by Vlad Zahorodnii.
Committed on 23/06/2026 at 05:17.
Pushed by vladz into branch 'master'.

Add a guard against having no workspace in RenderLoop

M  +6    -2    src/core/renderloop.cpp

https://invent.kde.org/plasma/kwin/-/commit/5df5a6923eb2c4e2bd8ecdf528d4d70b7e327871
Comment 7 Vlad Zahorodnii 2026-06-23 07:32:00 UTC
Git commit 8a97461b305d173609da339cdcc9aa53223b7c26 by Vlad Zahorodnii.
Committed on 23/06/2026 at 07:01.
Pushed by vladz into branch 'Plasma/6.7'.

Stop compositing before destroying the workspace and compositor

Both the Compositor and the Workspace are coupled very strongly,
unfortunately. This creates a series of issues when kwin starts and
stops. It's an architectural problem.

At shutdown, the compositor is destroyed after the workspace, but the
render scheduling code needs the workspace. This change makes kwin stop
compositing before destroying the two to make the teardown process less
surprising.
(cherry picked from commit 4279106e8a3b4db4fd869ef661f07368a703a024)

M  +3    -0    autotests/integration/kwin_wayland_test.cpp
M  +2    -4    src/compositor.cpp
M  +3    -0    src/main_wayland.cpp

https://invent.kde.org/plasma/kwin/-/commit/8a97461b305d173609da339cdcc9aa53223b7c26
Comment 8 Vlad Zahorodnii 2026-06-23 07:32:02 UTC
Git commit cc6e2e5cdf42d89b7531586af5f3ee0451868897 by Vlad Zahorodnii.
Committed on 23/06/2026 at 07:01.
Pushed by vladz into branch 'Plasma/6.7'.

Add a guard against having no workspace in RenderLoop
(cherry picked from commit 5df5a6923eb2c4e2bd8ecdf528d4d70b7e327871)

M  +6    -2    src/core/renderloop.cpp

https://invent.kde.org/plasma/kwin/-/commit/cc6e2e5cdf42d89b7531586af5f3ee0451868897
Comment 9 Ed 2026-06-24 01:55:45 UTC
Thank you, Vlad and KDE/Fedora team.

I updated to the Fedora packages with KWin 6.7.0 / Plasma 6.7.0 / Qt 6.11.1, rebooted, and tested my triple-monitor NVIDIA X11 setup.

Ctrl+Alt+F3/F2 works again, logout/login works again, and the display corruption issue appears resolved on my system.

I really appreciate how quickly this was confirmed, fixed, and pushed out.
Comment 10 Zamundaaa 2026-06-24 15:52:05 UTC
*** Bug 522121 has been marked as a duplicate of this bug. ***
Comment 11 Ed 2026-06-25 05:12:35 UTC
Thanks again. I checked my local package and I am currently running:

kwin-x11-6.7.0-1.fc44.x86_64

The Fedora changelog for this package only shows the 6.7.0 build from Jun 16, 2026. So I suspect I may still be running a package from before the fix you pushed to master.

Do you know whether this fix will be included in a future Fedora kwin-x11 update, such as 6.7.0-2 or 6.7.1, or whether it has already been backported somewhere?

I will hold off opening a new bug unless the issue remains after Fedora ships a package containing the fix.
Comment 12 Ed 2026-06-25 05:17:12 UTC
I checked my local package and I am currently running kwin-x11-6.7.0-1.fc44.x86_64.

The Fedora changelog appears to show this as the Jun 16 6.7.0 build, so I suspect I may still be running a package from before the fix that was pushed to master.

I will leave the bug status as RESOLVED/FIXED. Can someone confirm whether the fix is expected to appear in a future Fedora package update, such as 6.7.0-2 or 6.7.1?

I will only reopen or file a new bug if the issue remains after I receive a Fedora build that includes the fix.
Comment 13 Ed 2026-06-25 05:22:41 UTC
Thanks again for the fix.

I checked my local Fedora package and I am still on `kwin-x11-6.7.0-1.fc44`, so I understand I may not yet have a Fedora build that contains the master-branch fix.

One clarification: my remaining issue may be separate from the resolved logout/teardown crash. The fix described here sounds targeted at compositor/workspace destruction order during shutdown/logout. My main remaining symptom is a cold-boot / login display layout problem on a triple-monitor NVIDIA setup, where display sizing/layout is wrong until I log out and log back in.

My current journal also shows KWin X11 restart/replacement behavior with messages such as:

`Could not delete render time query because no context is current`
`Could not delete framebuffer because no context is current`

However, I do not want to assume this is the same bug if the fix here is only for teardown ordering.

Should I open a separate bug for the cold-boot display sizing/layout problem, or is that still considered part of this issue?
Comment 14 Ed 2026-06-25 05:24:33 UTC
Created attachment 193677 [details]
KWin X11 logs, coredump info, and NVIDIA/DRM kernel excerpts


I checked my local Fedora package and I am still on kwin-x11-6.7.0-1.fc44, so I understand I may not yet have a Fedora build that contains the master-branch fix.

One clarification: my remaining issue may be separate from the resolved logout/teardown crash. The fix described here sounds targeted at compositor/workspace destruction order during shutdown/logout. My main remaining symptom is a cold-boot / login display layout problem on a triple-monitor NVIDIA setup, where display sizing/layout is wrong until I log out and log back in.

My current journal also shows KWin X11 restart/replacement behavior with messages such as:

Could not delete render time query because no context is current
Could not delete framebuffer because no context is current

However, I do not want to assume this is the same bug if the fix here is only for teardown ordering.

Should I open a separate bug for the cold-boot display sizing/layout problem, or is that still considered part of this issue?
Comment 15 Ed 2026-06-26 02:08:14 UTC
Created attachment 193714 [details]
Photo of initial Cold Boot
Comment 16 Ed 2026-06-26 18:33:00 UTC
Created attachment 193743 [details]
Recovered logout/login output logs for comparison with bad cold-boot state

Thanks, Tracey.

Earlier I attached the BAD cold-boot state files:
- kscreen-doctor output
- drm_info output
- xrandr output

I then logged out and back in, which restored the display layout visually, and captured the RECOVERED state files as well.

One important observation: the BAD cold-boot `kscreen-doctor -o` output and the RECOVERED logout/login `kscreen-doctor -o` output appear identical. They report the same enabled outputs, priorities, modes, scales, and geometries.

So the visible problem may not be reflected in KScreen’s logical output configuration. I am attaching the recovered/logout-login files now for comparison.