Bug 497477 - Clipboard content gets reset when hovering over the desktop if plasmashell is ran with QT_QPA_PLATFORM=wayland-egl
Summary: Clipboard content gets reset when hovering over the desktop if plasmashell is...
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-14 23:21 UTC by Aidan Harris
Modified: 2024-12-17 15:35 UTC (History)
2 users (show)

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


Attachments
Screen recording illustrating the bug (3.75 MB, video/webm)
2024-12-14 23:21 UTC, Aidan Harris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aidan Harris 2024-12-14 23:21:39 UTC
Created attachment 176619 [details]
Screen recording illustrating the bug

Operating System: Gentoo 2.17
KDE Plasma Version: 6.2.80
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.13.0-rc2-a446e965a188+ (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT
Manufacturer: ASUS

Steps to reproduce:

1. Start Plasma without a display manager as follows:

export QT_QPA_PLATFORM=wayland-egl
exec /usr/bin/startplasma-wayland

2. Copy something to the clipboard

3. Hover over the desktop

4. Clipboard contents will be replaced with old Klipper history

Workaround:

Don't start startplasma-wayland with QT_QPA_PLATFORM set. I noticed that this isn't set when logging in from sddm. I had this set in a startup script I use to start Wayland compositors. I don't remember why I had this set (likely a remnant from the past) but perhaps plasmashell could unset it to prevent causing issues although maybe that's not possible if it needs to be done before Qt?
Comment 1 Nate Graham 2024-12-16 20:23:16 UTC
"wayland-egl" isn't supported anymore, yeah. I'd recommend removing it from any of your scripts. The default "wayland" is preferred now.
Comment 2 Aidan Harris 2024-12-16 22:00:50 UTC
(In reply to Nate Graham from comment #1)
> "wayland-egl" isn't supported anymore, yeah. I'd recommend removing it from
> any of your scripts. The default "wayland" is preferred now.

Do you know why it breaks the clipboard though? It just occurred to me that the start plasma Wayland script count and probably should sanitise this. I know some stuff in KDE calls qunsetenv so maybe that needs to be done here in case somebody else makes the same mistake by accident. This way the correct QPA (unset, with Qt internally defaulting to Wayland) always gets set.
Comment 3 Nate Graham 2024-12-17 15:35:47 UTC
I don't, sorry. Offering robustness against known invalid configs is indeed a worthy goal, though. However it's also an infinite task since there are an infinite number of issues, which means dev team resources for it are always limited. Feel free to help us out by submitting a merge request to harden this up if you'd like! That would be grand.