Bug 482142 - drag in drop files in Google Chrome renders Chrome unusable
Summary: drag in drop files in Google Chrome renders Chrome unusable
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.4
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-01 12:17 UTC by Jetchko Jekov
Modified: 2024-05-13 04:00 UTC (History)
48 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jetchko Jekov 2024-03-01 12:17:06 UTC
Dragging a file from Dolphin to Google Chrome renders Chrome unusable.
Mouse clicks are not accepted anymore by Chrome. Keyboard work though.

This started after the plasma 6 upgrade.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-21-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics
Manufacturer: Dell Inc.
Product Name: Inspiron 14 5401
Comment 1 Patrick Silva 2024-03-01 14:19:48 UTC
Can reproduce by dragging a .png file to Vivaldi browser running natively on Wayland.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland
Comment 2 florian.flatscher 2024-03-09 13:13:26 UTC
Reproducible on Fedora 39 for:
Google Chrome Version 122.0.6261.111 (Official Build) (64-bit)
Google Chrome (unsable) Version 124.0.6342.3 (Official Build) dev (64-bit)
Chromium Version 122.0.6261.69 (Official Build) Fedora Project (64-bit)

Interestingly, in chromium, the window becomes responsive/clickable again after I move the dropped file to another directory using drag & drop. To reproduce:

1) Open Chromium
2) Create a new empty Text-File on Desktop
3) Open Dolphin (Downloads folder)
4) Drag Text-File onto Chromium
Comment 3 florian.flatscher 2024-03-09 13:15:49 UTC
Reproducible on Fedora 39 for:
Google Chrome Version 122.0.6261.111 (Official Build) (64-bit)
Google Chrome (unsable) Version 124.0.6342.3 (Official Build) dev (64-bit)
Chromium Version 122.0.6261.69 (Official Build) Fedora Project (64-bit)

Interestingly, in chromium, the window becomes responsive/clickable again
after I move the dropped file to another directory using drag & drop. To
reproduce:

1) Open Chromium
2) Create a new empty Text-File on Desktop
3) Open Dolphin (Downloads folder)
4) Drag Text-File onto Chromium
    -> Chromium becomes unresponsive/unclickable
5) Move the Text-File from Desktop to Dolphins Downloads folder using drag & drop
    -> Chromium becomes responsive/clickable again
Comment 4 Ulrich Schreiner 2024-03-10 14:08:40 UTC
Drag/Drop inside the apps also do not work. So drag/drop a link in chrome to the tab-Bar to open it does not work. Same happens with VSCode, so it looks like the bug appears with electron-based apps.

workaround: dot NOT start apps with 

--enable-features=UseOzonePlatform --ozone-platform=wayland

so they run as X11 apps. then everything works. you can check with

kwin-debug-console='qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole'

if the electron-app (chrome, vscode) run native wayland -> drag/drops does not work. if they run as X11, everythings fine.
Comment 5 simon+kde 2024-03-11 17:04:10 UTC
Reproducable on Gentoo. Draging & droping a file from Dolphin to Chrome makes Chrome no longer accept mouse inputs, but keyboard input still works. The same issue also appears when draging a screenshot from Spectactle to Chrome (e.g. to a Jira Issue).

SOFTWARE/OS VERSIONS
Operating System:  Gentoo
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.4 (gentoo-sources)
Graphics Platform: Wayland
Processors: AMD Ryzen 9 PRO 6950H
Memory: 31.1 GiB of RAM
Graphics Processor: AMD 6500M/680M Hybrid
Manufacturer: Lenovo
Product Name: Z16 gen1
Comment 6 Hyuri 2024-03-13 16:29:37 UTC
This is happening in Plasma 5.27 as well (Kubuntu 23.10).
Comment 7 Riccardo 2024-03-14 11:47:44 UTC
Reproducible on Neon User Edition and Unstable 6.0.2

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland

Chrome, Microsoft Edge (stable and beta):    --enable-features=UseOzonePlatform --ozone-platform=wayland
Comment 8 ungoogled1 2024-03-18 16:31:23 UTC
In plasma-5 there was already a bug with chrome Wayland where it would randomly get stuck into dragging events and ignore further pointer events. This was partially fixed in the latest dev build https://chromiumdash.appspot.com/commit/d6bdbc12fabc1bfa1a17aca5c47afee6e17824fb

In plasma-6 there where some regressions that are not fixed with the patch above:
- dragging text from a page or the url bar to a new tab or bookmark does not work
- dragging file from filemanager and dropping it on the browser makes it unresponsive to further mouse events

which are tracked by the chromium team under
https://issues.chromium.org/issues/329703410
dupe with video: https://issues.chromium.org/issues/327605550

Although they suggest in these issues thats a kwin/plasma-6 issue.
Comment 9 Nick Yamane 2024-03-18 16:48:30 UTC
I've also documented other observations that may indicate other KWin bugs, or even underspecified behaviors/cases that must be addressed at the protocol level instead, at https://notes.nickdiego.dev/chromium/wayland-events-during-drag#KWin.
Comment 10 ungoogled1 2024-03-18 16:53:32 UTC
I just tried it again and this bug seems to be resolved for me in the new KDE 6.0.2
Comment 11 Patrick Silva 2024-03-18 16:56:20 UTC
The bug persists with Chromium and Vivaldi on my system.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland
Comment 12 ungoogled1 2024-03-18 16:57:42 UTC
Looking at my earlier message:
1. dragging text from a page or the url bar to a new tab or bookmark does not work
2. dragging file from filemanager and dropping it on the browser makes it unresponsive to further mouse events

Bug 1 was fixed with kde 6.0.2
Bug 2 is still an issue
Comment 13 Horváth Péter 2024-03-28 10:35:49 UTC
Dragging from file manager to Chrome indeed disables mouse actions. But if you drag a file into the window again, without dropping it , then mouse can be used again.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland
Comment 14 Riccardo 2024-03-29 10:59:08 UTC
It seems the problem is no more present on latest beta versions of chrome and ms-edge.

KDE Plasma Version: 6.0.3
Graphics Platform: Wayland
Comment 15 hmnd 2024-04-21 01:46:34 UTC
(In reply to Riccardo from comment #14)
> It seems the problem is no more present on latest beta versions of chrome
> and ms-edge.

I am still able to reproduce this on Chrome v126 + KDE Plasma 6.0.4 + NVIDIA
Comment 16 Eric Donkersloot 2024-04-23 19:05:30 UTC
Unfortunately, this bug is still not fixed. I can reproduce it as well.

Operating System: openSUSE Tumbleweed 20240419
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.7-1-default (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31,2 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Manufacturer: ASUS
Comment 17 duhdugg 2024-04-26 16:15:08 UTC
I am also seeing this issue. Accidental click drag on a link also causes it and leads to eventual browser crash.

Reproducible on the Arch chromium package, brave-bin from the AUR, google-chrome-bin from the AUR, and ungoogled-chromium from flathub.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.6.28-1-lts (64-bit)
Graphics Platform: Wayland
Comment 18 hexchain 2024-04-28 15:07:36 UTC
I suspect there are multiple issues. The fix for https://issues.chromium.org/issues/329703410 has already landed in 124 (stable) and 125 (dev), but apparently, people are still seeing a similar issue.

Filed https://issues.chromium.org/issues/336449364 for their awareness.
Comment 19 Yaroslav Fedevych 2024-04-28 20:34:11 UTC
I have whatever the very latest Fedora 40 + updates has, and it's happening regardless whether Chrome is launched as a pure Wayland or an X11 client (!).

Any accidental dragging gesture at all (usually I'm butterfingering the touchpad, or accidentally place a finger on the touchpad just as I'm making a left click) makes left click stop working. What also stops working is trying to invoke the main menu via keyboard shortcuts — Alt+F, for example. If I persist in left-clicking long enough, Chrome will eventually crash.

The funniest thing is that I remember the bug being there before, and in some 5.2x version of Plasma it got fixed. Now it looks like a regression.
Comment 20 mike cirioli 2024-04-30 12:07:06 UTC
chrome Version 124.0.6367.91 (Official Build) (64-bit) on kwin 6.04 - I can reproduce this issue by simply dragging any page element in chrome.  The issue is present for both wayland and x11
Comment 21 Anya 2024-05-03 14:13:12 UTC
Can reproduce this with Chromium and Discord when they're running with --enable-features=UseOzonePlatform --ozone-platform=wayland. When attempting to drag and drop a file from Dolphin to Discord or Chromium the mouse cursor changes to the red stop sign thing and the file isn't dropped. It works without the arguments, running in Xwayland.

Operating System: EndeavourOS 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 22 flex 2024-05-05 02:20:15 UTC
Chrome on wayland can reproduce this

Chrome version 124.0.6367.118 
Kwin 5.27.11
QT 6.7.0
Comment 23 thomas.steinborn 2024-05-05 09:05:07 UTC
See the corresponding Chromium bug https://issues.chromium.org/issues/336449364#comment12

Copying from the comment: There seems to have been some recent change in Kwin which has caused it to no longer send wl_data_source.{dnd_finished,cancelled} after wl_data_source.dnd_drop_performed in these cases described in the repro steps.
Comment 24 Yaroslav Fedevych 2024-05-05 15:16:46 UTC
Can we be sure that it's kwin as such and not, say, Qt itself? There's so many moving parts that thinking of trying to bisect it all is filling me with dread.
Comment 25 terranova 2024-05-09 15:49:26 UTC
Just wanted to add that I have the same issue on Arch Linux, KDE 6.0.4. Hopefully either KWin or Chrome can come to a resolution soon—I may take a crack at trying to debug myself from the KWin side but I don't know enough about Wayland or the KDE codebase to be that useful yet.
Comment 26 Jean-Francois Roy 2024-05-09 16:01:52 UTC
We ideally need a solution in KWin because other applications based on Chromium are also affected and those tend to be on much slower upgrade cycles. Anything Electron (Discord, Slack, VS Code) are affected.
Comment 27 Ted Parvu 2024-05-12 16:30:42 UTC
Reproducible by trying to drag and drop anything in Vivaldi.

Arch Linux
plasma-desktop 6.0.4-1
wayland 1.22.0-1

additionally I get this clue....

> 12/100737.466353:ERROR:wayland_data_drag_controller.cc(147)] Invalid state when trying to start drag. source=kMouse
Comment 28 Ted Parvu 2024-05-12 16:38:42 UTC
(In reply to Ted Parvu from comment #27)
> Reproducible by trying to drag and drop anything in Vivaldi.
> 
> Arch Linux
> plasma-desktop 6.0.4-1
> wayland 1.22.0-1
> 
> additionally I get this clue....
> 
> > 12/100737.466353:ERROR:wayland_data_drag_controller.cc(147)] Invalid state when trying to start drag. source=kMouse

Looks like this was  fixed https://chromium.googlesource.com/chromium/src/+/b3319430c1155a1716b441f225ef93f16493b5cb
Comment 29 Ed Tomlinson 2024-05-12 16:45:16 UTC
No this is NOT a fix.   As mentioned above see:  https://issues.chromium.org/issues/336449364
Comment 30 Ted Parvu 2024-05-12 23:26:36 UTC
(In reply to Ed Tomlinson from comment #29)
> No this is NOT a fix.   As mentioned above see: 
> https://issues.chromium.org/issues/336449364

So, where is this bug? 

It seems to be on all Chromium based browsers.... but that the bug is really in KWin?
Comment 31 Ted Parvu 2024-05-13 01:08:15 UTC
Found a work-a-round that is working for me.

https://bbs.archlinux.org/viewtopic.php?pid=2166339#p2166339
Comment 32 Jean-Francois Roy 2024-05-13 04:00:15 UTC
(In reply to Ted Parvu from comment #31)
> Found a work-a-round that is working for me.
> 
> https://bbs.archlinux.org/viewtopic.php?pid=2166339#p2166339

Completely disabling drag and drop is a pretty hard workaround to swallow and breaks a number of web apps that rely on it. I too am frustrated when I accidentally soft-lock Chrome, but this workaround should not lessen efforts to fix kwin.