Bug 512390 - Ghost windows accumulate when using X11 display forwarding
Summary: Ghost windows accumulate when using X11 display forwarding
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.5.3
Platform: CachyOS Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-20 14:35 UTC by justaphysicsexpert
Modified: 2025-11-20 21:24 UTC (History)
1 user (show)

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


Attachments
Screenshot of Ghost windows described above (95.19 KB, image/png)
2025-11-20 14:35 UTC, justaphysicsexpert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description justaphysicsexpert 2025-11-20 14:35:05 UTC
Created attachment 186988 [details]
Screenshot of Ghost windows described above

SUMMARY
When using X11 display forwarding to run GUI apps on remote servers via the SSH -X or SSH -Y commands, ghost windows i.e. empty window boxes with the Xorg symbol appear in the task manager panel and while alt+tab-bing to switch windows; these ghost windows clutter the task-manager and task-switcher making it difficult to switch between different progras. The windows remain even after the SSH connection is closed. The only way to get rid of these extra windows is to restart the OS.

STEPS TO REPRODUCE
1. Login to a server via SSH from Konsole or any other terminal, with X11 display forwarding enabled
2. Launch remote GUI application from the terminal

OBSERVED RESULT
After using the application for a few minutes and opening and closing sub-menus within the GUI application, ghost window appears in icons only task-manager and alt-tab task switcher.

EXPECTED RESULT
No ghost windows appear, any and all windows associated with the SSH session should go away when the SSH session is disconnected.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Cachy OS with Kernel Version: 6.17.8-2-cachyos (64-bit) 
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
Tested this on both X11 and Wayland versions of KDE plasma and same behavior happens in both. But when using different desktop environment such as XFCE or Cinammon (both X11 and Wayland modes) this behavior is not observed.
Comment 1 TraceyC 2025-11-20 21:24:09 UTC
Thanks for the bug report. Moving to kwin that handles windows