| Summary: | Clipboard contents will not paste into Wine | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | jcyphers |
| Component: | xwayland | Assignee: | Vlad Zahorodnii <vlad.zahorodnii> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | a.skembris, bugs.kde.org, deadlinev007, kamil.mich93, kde, legenderonz, linx.system.adm, madness742, marco.difresco, nate, nickpage3232, qydwhotmail, r.email+kde, strudelkuchen, tddzmely |
| Priority: | VHI | Keywords: | regression, wayland-only |
| Version First Reported In: | 6.5.0 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/d4a8ef29e1f6ef7a0690900a7a335d6da1eb244b | Version Fixed/Implemented In: | 6.5.2 |
| Sentry Crash Report: | |||
|
Description
jcyphers
2025-10-25 02:00:01 UTC
Sorry for the failure to delete the instructional text at the top of the description, got distracted and failed to delete it before submitting. I've got the same issue. I can copy stuff from wine/proton and paste it into native apps. Copying from native and pasting into wine/proton doesn't work. I think I am having a similar issue! I can't paste from my KDE guest to my VirtualBox host. I can only paste from guest to host. Tried some of the usual suspect from clipboard tomfoolery like toggling Middle Click paste and sync Selection and Clipboard but neither had any effect. I can paste into X11 applications like Steam itself for example but cannot paste into Wine/Proton applications. Can verify that I can copy text from the wine/proton application and it goes to the clipboard. Just cannot get anything from the clipboard into the wine/proton applications. Same on CachyOS. Endeavour forum suggested workaround: yay -S wl-clipboard clipboard-sync systemctl --user enable --now clipboard-sync (In reply to DeadlineV from comment #6) > Same on CachyOS. Endeavour forum suggested workaround: > yay -S wl-clipboard clipboard-sync > systemctl --user enable --now clipboard-sync I've seen that 'workaround' but unfortunately it doesn't work. It's been pulled from Manjaro forums and the issue was with Plasma 5. I can confirm that the clipboard worked before the 6.5 update. Disabling klipper doesn't fix it so not related to klipper. Experiencing the same issue, when trying to copy into wine nothing is happening (In reply to Fushan Wen from comment #8) > Disabling klipper doesn't fix it so not related to klipper. It's probably related to some fixes that we made to address a bug where copy pasting from X apps to Wayland apps doesn't work. I have some rough idea where things could break. Does this happen with any wine app? (In reply to Vlad Zahorodnii from comment #10) > (In reply to Fushan Wen from comment #8) > > Disabling klipper doesn't fix it so not related to klipper. > > It's probably related to some fixes that we made to address a bug where copy > pasting from X apps to Wayland apps doesn't work. I have some rough idea > where things could break. > > Does this happen with any wine app? I can confirm that it's all wine/proton apps I've tried. I've tried games mainly (cs 1.6, Dragon Ball Ultimate Online, Turtle WoW) Also happens with apps (Rockstar Launcher, Ubisoft Connect, notepad). (In reply to Vlad Zahorodnii from comment #10) > (In reply to Fushan Wen from comment #8) > > Disabling klipper doesn't fix it so not related to klipper. > > It's probably related to some fixes that we made to address a bug where copy > pasting from X apps to Wayland apps doesn't work. I have some rough idea > where things could break. > > Does this happen with any wine app? I can confirm that it is happening with anything I have running Proton 10+, but I was able to paste into the Affinity Apps running a legacy version of Elemental Warrior. Okay, got it. Thanks. Can replicate this issue on both my PC and another PC (both almost exactly the same builds, one with AMD GPU and the other nVidia, both with CachyOS). Here are the tests we've tried: π = did not paste β= pasted correctly Via Steam (Runtime) and CachyOS Proton 10 (Steam Runtime) π Kate, Librewolf β Elite Dangerous π Kate, Konsole β Enshrouded π Clipboard, Konsole, Kate β Teddy's Haven β Teddy's Haven β Enshrouded β All of the above Steam games β Kate, Konsole, Librewolf Via Steam (Native) and Proton 8.0-5 π Librewolf β Elite Dangerous Via Steam and Proton GE 10.21 π Librewolf, Alacritty. Wezterm, Chromium β Elite Dangerous β Elite Dangerous β Elite Dangerous Via Wine 10.17-1.1 β Microsoft Notepad β Librewolf, Kate, Wezterm π Wezterm, Librewolf β Microsoft Notepad Via Steam Proton and Wine β Enshrouded, Elite Dangerous β Microsoft Notepad Interestingly we can paste into Steam games (tried Teddy's Haven and Enshrouded) but only once and only the current copy after we've first started the game. Steps to reproduce this are: - Copy text (in this test it was from Konsole) - Start game (Steam is already running) - Edit an in-game text field and paste. As soon as we alt-tab and copy something else, we can no longer paste anything. This 'trick' did not work however if we tried it directly through Wine and Microsoft Notepad, only if we copied and then started a Steam game. So we can copy paste within Wine or Proton apps (doesn't matter what combo of Proton/Proton or Wine/Proton) all fine. We can copy from Wine/Proton to native apps. We can copy from native apps to Proton apps ONCE after the app is first run - thereafter no more pasting will work. We cannot copy from native apps to Proton after the app has already been started. We cannot copy from native apps to Wine apps at all. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8317 Git commit bb6e9d3ec1f637d9af00b7f47962c84eb18b817b by Vlad Zahorodnii. Committed on 28/10/2025 at 11:45. Pushed by vladz into branch 'master'. xwayland: Update clipboard when active window changes Amends 947d2c5ad0746d807b04f6bb382e1d4ddb1b7f29. The clipboard was decoupled from active window changes in order to fix copy-pasting not working from X to Wayland clients. With that approach, if a wayland client sets new clipboard contents, kwin will update the CLIPBOARD selection immediately but also expect that clients won't access the selection until they are focused. WINE breaks that assumption. It wants to access the selection as soon as SelectionNotify events arrive, it doesn't access it later when user presses Ctrl-V in a focused window. This change restores focus tracking bits but with a few twists: first, xcb_selection_set_owner() to unset the owner is no longer nuclear, i.e. kwin won't overwrite selection owner if somebody already claimed it; second, the X source won't be nuked when we unset the Wayland proxy source object. M +36 -3 src/xwayland/clipboard.cpp M +5 -5 src/xwayland/clipboard.h M +34 -3 src/xwayland/primary.cpp M +5 -5 src/xwayland/primary.h M +20 -8 src/xwayland/selection.cpp M +1 -0 src/xwayland/selection.h https://invent.kde.org/plasma/kwin/-/commit/bb6e9d3ec1f637d9af00b7f47962c84eb18b817b You sir are awesome, thank you for looking into this issue for us. Will be looking for the updated package. Git commit d4a8ef29e1f6ef7a0690900a7a335d6da1eb244b by Vlad Zahorodnii. Committed on 28/10/2025 at 14:25. Pushed by vladz into branch 'Plasma/6.5'. xwayland: Update clipboard when active window changes Amends 947d2c5ad0746d807b04f6bb382e1d4ddb1b7f29. The clipboard was decoupled from active window changes in order to fix copy-pasting not working from X to Wayland clients. With that approach, if a wayland client sets new clipboard contents, kwin will update the CLIPBOARD selection immediately but also expect that clients won't access the selection until they are focused. WINE breaks that assumption. It wants to access the selection as soon as SelectionNotify events arrive, it doesn't access it later when user presses Ctrl-V in a focused window. This change restores focus tracking bits but with a few twists: first, xcb_selection_set_owner() to unset the owner is no longer nuclear, i.e. kwin won't overwrite selection owner if somebody already claimed it; second, the X source won't be nuked when we unset the Wayland proxy source object. (cherry picked from commit bb6e9d3ec1f637d9af00b7f47962c84eb18b817b) M +36 -3 src/xwayland/clipboard.cpp M +5 -5 src/xwayland/clipboard.h M +34 -3 src/xwayland/primary.cpp M +5 -5 src/xwayland/primary.h M +20 -8 src/xwayland/selection.cpp M +1 -0 src/xwayland/selection.h https://invent.kde.org/plasma/kwin/-/commit/d4a8ef29e1f6ef7a0690900a7a335d6da1eb244b *** Bug 511325 has been marked as a duplicate of this bug. *** *** Bug 511375 has been marked as a duplicate of this bug. *** That fixed my issue in Steam games. Thanks Vlad! The fixes applied in 6.5.2 corrected the issue perfectly. I am marking this as resolved! Thanks to the KDE Team! It appears that clipboard handling broke in Plasma 6.5 not only for Wine but for others also. There is an issue "WaylandβWayland clipboard paste fails in RustDesk; X11/XWayland sources work" raised at https://github.com/rustdesk/rustdesk/issues/13338 of clipboard sharing not working in Plasma 6.5 I'm using RustDesk 1.4.3 and indeed, after I had upgraded from Plasma 6.4.5 to Plasm 6.5.3 the clipboard sharing stopped working. I'm not sure the problem with clipboard sharing in RustDesk is due to changes mentioned here but it's highly possible taking into consideration that problems seem to have started with Plasma 6.5 Should I file separate issue for this? Btw, I raised this issue at https://discuss.kde.org/t/clipboard-stopped-working-in-rustdesk-after-upgrade-from-plasma-6-4-to-6-5/41968?u=piotr_dobrogost All issues with pasting into wine went away with KDE 6.5.2 for most of us, not sure what else could be causing your issue. |