Bug 439332 - Ghost windows and popups
Summary: Ghost windows and popups
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.22.5
Platform: Manjaro Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 416219 430192 441379 463299 464254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-30 13:35 UTC by Tim
Modified: 2023-02-04 05:06 UTC (History)
22 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim 2021-06-30 13:35:34 UTC
SUMMARY
From time to time - Pretty often (and even more often in IntelliJ) closed windows, tooltips or popups turn into some weird ghost form, that isn't interactable or removable unless you reload the compositor.

STEPS TO REPRODUCE
1. Open a window/hover over something

OBSERVED RESULT
Sometimes a popup/window shows up, that doesn't want to hide anymore.
It seems to be bound to the parent window

EXPECTED RESULT
It should just close the window

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Garuda Linux
(available in About System)
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Seems to be related to this: https://bugs.kde.org/show_bug.cgi?id=101510
Video "proof": https://streamable.com/g7dwti
Comment 1 archerdm 2021-07-13 15:02:14 UTC
I believe I'm seeing the same bug.

For me, it happens sometimes when I click to minimize a window. Kwin/Plasma acts as if the window minimized successfully, but the window remains visible on screen, and when I click on something on this "ghost" window, I'm actually interacting with the window or desktop behind it that is blocked from view. This started recently, I believe when I upgraded kwin/plasma to 5.22.

Specs:
Artix linux
Kwin 5.22.3
kernel 5.12.14
Qt 5.15.2
Ryzen 3600, 16GB RAM
Nvidia GTX 1060 with 470.42.01 driver
Comment 2 Justin 2021-07-21 12:39:31 UTC
Yeah getting the same issue even on fresh install of Arch, they will turn translucent first and when you close the application it will enter the ghost mode state.

Operating System: Arch Linux
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.12.15-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 1700 Eight-Core Processor
Memory: 31.4 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2
Comment 3 dasskelett 2021-07-30 14:48:18 UTC
Same happening for me. Most commonly in JetBrains IDE windows, for quick-suggestion pop-ups, or right-click context menus; but also with drop-downs in Firefox, or even when minimizing Spectacle once (the whole window stayed as ghost).

I think it happened after updating nvidia drivers to 470, but can't confirm this yet. Going to downgrade to 460 and see if it helps. So this may or may not be yet another nvidia bug after all.

Operating System: Kubuntu 21.04
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-22-generic (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31.3 GiB of RAM

NVIDIA Driver Version: 470.57.02
Graphics Processor: NVIDIA GeForce GTX 1660 SUPER
Comment 4 Tim 2021-07-31 19:26:19 UTC
Oh yeah, I forgot to mention, I am on an AMD RX 560
Comment 5 Jason Buckingham 2021-08-02 03:50:36 UTC
I am also experiencing this bug.

In case anyone is interested, I posted details to r/kde (link: https://www.reddit.com/r/kde/comments/ow1g01/possible_kwin_plasma_bug_image_ghosting_after/)
Comment 6 Matt W 2021-08-09 17:44:45 UTC
Happening here to me. Windows will go ghosted, and when i minimize them, the whole window will stay there but ghosted, like transparent.  Super annoying.


One app that it happens on frequently is the Telegram Desktop.  I have downloaded and installed the Telegram Desktop app from their site.  When I use my mouse to scroll through conversations, it ghosts in and out and the mouse gets lost and attached.  Very odd behavior that is pretty consistent.

Someone posted this to help workaround the issue, so posting here:

kwin_x11 --replace


Fedora 34
KDE Plasma 5.22.4
Nvidia Drivers
KDE Framework 5.83.0
QT: 5.15.2
Comment 7 Yuxin Wu 2021-08-11 06:47:23 UTC
I believe I'm seeing the same issue.

One way for me to reproduce it is to open telegram-desktop and minimize it. I can see a "minimization" animation, but then the window is still visible and ghosted.

Another way that I can very reliable reproduce this issue is to just switch to a different virtual desktop. All windows in the previous virtual desktop are ghosted.

By "ghosted" I mean the window are visible but I cannot interact with them. Clicking them is equivalent to clicking the actual non-ghosted window (or the desktop) at that location.

Environment:
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.10.55-1-lts (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-7700 CPU @ 3.60GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2

The issue disappears if I `kwin_x11 --replace`, but will re-appear after a while.
Comment 8 Matt W 2021-08-12 15:11:45 UTC
I'd like to follow up that I feel that while the ghosting bug is still going on, there are a lot of X issues I'm also facing.  I can't say it's related, but very well could be.

One of the issues I'm seeing is when I detach a chrome tab, and drag it, it goes SUPER slow and drags slowly.  Then it snaps back weird. 

I also highlight text, click and pull it it also goes slowly.  

These are bugs that I'm not sure how to report, or if I should report, but odd behaviors that have recently (like last month or 2) started happening.

Curious if others see weird issues too?
Comment 9 Tim 2021-08-12 15:59:26 UTC
(In reply to Matt W from comment #8)
> I'd like to follow up that I feel that while the ghosting bug is still going
> on, there are a lot of X issues I'm also facing.  I can't say it's related,
> but very well could be.
> 
> One of the issues I'm seeing is when I detach a chrome tab, and drag it, it
> goes SUPER slow and drags slowly.  Then it snaps back weird. 
> 
> I also highlight text, click and pull it it also goes slowly.  
> 
> These are bugs that I'm not sure how to report, or if I should report, but
> odd behaviors that have recently (like last month or 2) started happening.
> 
> Curious if others see weird issues too?

I can also reproduce that tab dragging lagginess with ungoogled-chromium: https://streamable.com/51d8go
The selection drag lag though; nope.
Comment 10 jediafr 2021-09-05 08:31:48 UTC
Same behavior as the others, some windows are being ghosted randomly it seems.
The virtual desktop is also affected as switching to another one is bringing a copy after the affected one over.

I have found some related entry in the journalb when it happens : 

sept. 05 10:13:09 jda-pc kwin_x11[1897]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2768, resource id: 65011718, major code: 18 (ChangeProperty), mi>
sept. 05 10:13:09 jda-pc kwin_x11[1897]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2773, resource id: 65011719, major code: 18 (ChangeProperty), mi>
sept. 05 10:15:20 jda-pc plasmashell[1948]: file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:27:1: QML Panel: Binding loop detected for pr>
sept. 05 10:16:24 jda-pc plasmashell[1948]: file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:27:1: QML Panel: Binding loop detected for pr>
sept. 05 10:16:55 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 14988, resource id: 17339280, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:16:55 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 14991, resource id: 17339168, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:16:55 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 15638, resource id: 17339207, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:17:00 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 17817, resource id: 17339523, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:17:06 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 19779, resource id: 17339570, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:17:37 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 29042, resource id: 17340256, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:17:50 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 33817, resource id: 17340547, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:17:50 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 34648, resource id: 17340647, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:17:51 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 35128, resource id: 17340672, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:18:03 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 44960, resource id: 17340978, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:18:22 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 53535, resource id: 17342085, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:18:23 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 54214, resource id: 17342120, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:18:23 jda-pc kwin_x11[1897]: kwin_core: XCB error: 3 (BadWindow), sequence: 54216, resource id: 17675909, major code: 129 (SHAPE), minor code: 6 (Input)
sept. 05 10:18:23 jda-pc kwin_x11[1897]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 54217, resource id: 17675909, major code: 2 (ChangeWindowAttribu>
sept. 05 10:18:23 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 55075, resource id: 17342174, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:18:23 jda-pc kwin_x11[1897]: kwin_core: XCB error: 3 (BadWindow), sequence: 55077, resource id: 17342172, major code: 129 (SHAPE), minor code: 6 (Input)
sept. 05 10:18:23 jda-pc kwin_x11[1897]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 55078, resource id: 17342172, major code: 2 (ChangeWindowAttribu>
sept. 05 10:18:24 jda-pc kwin_x11[1897]: kwin_core: XCB error: 152 (BadDamage), sequence: 55742, resource id: 17342226, major code: 143 (DAMAGE), minor code: 2 (Destroy)
sept. 05 10:18:24 jda-pc kwin_x11[1897]: kwin_core: XCB error: 3 (BadWindow), sequence: 55744, resource id: 17342224, major code: 129 (SHAPE), minor code: 6 (Input)
sept. 05 10:18:24 jda-pc kwin_x11[1897]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 55745, resource id: 17342224, major code: 2 (ChangeWindowAttribu>




Here's my specs : 
Kernel: 5.13.12-1-MANJARO 
DE: Plasma 5.22.4 
 CPU: Intel i7-4720HQ (8) @ 3.600GHz 
GPU: Intel 4th Gen Core Processor 
GPU: NVIDIA GeForce GTX 960M  (drivers 470).
Memory: 5025MiB / 15454MiB 
My desktop uses optimus manager in hybrid mode but the bug is unrelated to one drivers as it happens in INTEL ONLY, NVIDIA ONLY and also in hybrid (intel for screen and nvidia for 3d rendering).

I hope it helps to further nail down this bug which apparead first 3 updates ago on manjaro.
Comment 11 jediafr 2021-09-06 10:14:25 UTC
Bug still there after upgrade to plasma 5.22.5.
 
DE: Plasma 5.22.4
Comment 12 jediafr 2021-09-29 11:15:21 UTC
After 48 hurs it Seems fixed with upgrade to 5.22.5 or new intel video driver. (both were on the upgrade lot).
I cannot know which brought the fix...

Also did the following modification of xorg.conf prior to the update for the Intel drivers.

Section "Module"
    Load "modesetting"
EndSection

** I'll comment if the bug comes back **
Comment 13 Yuxin Wu 2021-09-29 17:34:49 UTC
I had upgraded to 5.22.5 for almost a month so I'm certain that 5.22.5 does not fix the issue.
Also I'm using Nvidia drivers.
Comment 14 jediafr 2021-10-04 08:36:04 UTC
The bug came back after a week on usage
My previous report is then Voided and null.


(In reply to jediafr from comment #12)
> After 48 hurs it Seems fixed with upgrade to 5.22.5 or new intel video
> driver. (both were on the upgrade lot).
> I cannot know which brought the fix...
>
Comment 15 Daniel Santos 2021-10-17 23:48:04 UTC
Same here, but with Radeon.  Nothing in dmesg.

Operating System: Gentoo Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.14.9 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 2700X Eight-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD PITCAIRN

# lspci -vs 2e:00.0
2e:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao PRO [Radeon R7 370 / R9 270/370 OEM] (prog-if 00 [VGA controller])
        Subsystem: Gigabyte Technology Co., Ltd Curacao PRO [Radeon R7 370 / R9 270/370 OEM]
        Flags: bus master, fast devsel, latency 0, IRQ 126, IOMMU group 15
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at fd400000 (64-bit, non-prefetchable) [size=256K]
        I/O ports at f000 [size=256]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [200] Physical Resizable BAR
        Capabilities: [270] Secondary PCI Express
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Kernel driver in use: radeon
        Kernel modules: radeon, amdgpu


x11-drivers/xf86-video-amdgpu-19.1.0::gentoo was built with the following:
USE="udev" ABI_X86="(64)"
CFLAGS="-march=native -O2 -ggdb3 -pipe"
CXXFLAGS="-march=native -O2 -ggdb3 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,lazy"
Comment 16 Mau 2021-10-21 22:59:01 UTC
Same here since last update from v5.21.5 to v5.23.0

Debian testing
KDE Plasma 5.23.0
KDE Frameworks 5.86.0
QT 5.15.2
Platform X11 v1.20.11
AMD Phenom II X4 965, 8GiB RAM
Nvidia GF106 (GeForce GTS 450) + nvidia-legacy-390xx-driver v390.144-2
Comment 17 Christian 2021-11-04 18:55:39 UTC
Is there any progress? It is pretty anoying for me lately. When I code a fiew hours in IntelliJ I have to reset the compositor about 10 times.
Comment 18 Mau 2021-11-04 19:35:18 UTC
I confirm that disabling the "translucent windows" effect solves this issue.
Comment 19 Daniel Santos 2021-11-05 22:02:39 UTC
(In reply to Mau from comment #18)
> I confirm that disabling the "translucent windows" effect solves this issue.

Wow, most interesting!  I rather like my translucent background windows, so I'll just keep using the work-around for now.  This makes sense as I've noticed that sometimes my foreground window is translucent when it shouldn't be.  I have my Konsole windows configured to be translucent always, but every thing else is only supposed to be translucent when it's in the background.
Comment 20 alkl58 2021-12-21 19:58:57 UTC
Interesting enough, I personally don't experience this issue anymore.

I had "translucent windows" effects disabled because of this issue, however I have re-enabled it since the latest "Manjaro Stable" update (2021-12-16) and did not experience this issue yet. 

Before it was pretty easy to trigger with Firefox, but for now it seems to work.

My guess it could be solved by either of those: 
- KDE Plasma update 5.23.4
- NVIDIA 495xx Driver update (that wouldn't explain why AMD Users had the same issue)
- x.org update (21.1.2)
- KDE Gear update 21.12

Other people which experienced this issue might want to re-test it they can reproduce this on similar versions like me. 

Operating System: Manjaro Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.10.84-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2
Comment 21 Vlad Zahorodnii 2023-01-17 12:50:55 UTC
*** Bug 441379 has been marked as a duplicate of this bug. ***
Comment 22 Nate Graham 2023-01-17 16:41:45 UTC
*** Bug 464254 has been marked as a duplicate of this bug. ***
Comment 23 Nate Graham 2023-01-17 16:41:49 UTC
*** Bug 463299 has been marked as a duplicate of this bug. ***
Comment 24 Vlad Zahorodnii 2023-01-18 14:28:00 UTC
*** Bug 430192 has been marked as a duplicate of this bug. ***
Comment 25 Nate Graham 2023-01-19 14:24:07 UTC
*** Bug 416219 has been marked as a duplicate of this bug. ***
Comment 26 Tom Englund 2023-01-22 08:51:08 UTC
easiest way to trigger it is simply start dragging a window and press alt + f4 while doing so to close it, that will leave a ghost window around.
Comment 27 Bug Janitor Service 2023-02-03 15:24:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3537
Comment 28 Marco Martin 2023-02-03 15:54:41 UTC
Git commit 1332d7de2c2a3ba46497db1ca9ee09f897fbee67 by Marco Martin.
Committed on 03/02/2023 at 15:23.
Pushed by vladz into branch 'master'.

Also cancel translucencyMoveResizeAnimations

When a window goes away it was stoppping translucencyWindowTypeAnimation
and translucencyInactiveAnimation but any translucencyMoveResizeAnimations

was hanging there forever, causing ghost windows

M  +4    -0    src/effects/translucency/package/contents/code/main.js

https://invent.kde.org/plasma/kwin/commit/1332d7de2c2a3ba46497db1ca9ee09f897fbee67
Comment 29 Vlad Zahorodnii 2023-02-03 15:57:14 UTC
Git commit 69d7234b9b62b1f12322e2ba8aa7c7b99eba6f31 by Vlad Zahorodnii, on behalf of Marco Martin.
Committed on 03/02/2023 at 15:57.
Pushed by vladz into branch 'cherry-pick-1332d7de'.

Also cancel translucencyMoveResizeAnimations

When a window goes away it was stoppping translucencyWindowTypeAnimation
and translucencyInactiveAnimation but any translucencyMoveResizeAnimations

was hanging there forever, causing ghost windows


(cherry picked from commit 1332d7de2c2a3ba46497db1ca9ee09f897fbee67)

M  +4    -0    src/effects/translucency/package/contents/code/main.js

https://invent.kde.org/plasma/kwin/commit/69d7234b9b62b1f12322e2ba8aa7c7b99eba6f31
Comment 30 Marco Martin 2023-02-03 16:04:49 UTC
Git commit 97eea0df02a79961d899bb827a8a3cb42ad9fc7d by Marco Martin.
Committed on 03/02/2023 at 16:04.
Pushed by mart into branch 'Plasma/5.27'.

Also cancel translucencyMoveResizeAnimations

When a window goes away it was stoppping translucencyWindowTypeAnimation
and translucencyInactiveAnimation but any translucencyMoveResizeAnimations

was hanging there forever, causing ghost windows

M  +4    -0    src/effects/translucency/package/contents/code/main.js

https://invent.kde.org/plasma/kwin/commit/97eea0df02a79961d899bb827a8a3cb42ad9fc7d