Bug 501282

Summary: plasmashell locks up for 5 seconds because of clipboard problems with freerdp + SDL 3 (Wayland mode)
Product: [Plasma] plasmashell Reporter: Shmerl <shtetldik>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, nate
Priority: NOR Keywords: wayland-only
Version First Reported In: 6.3.2   
Target Milestone: 1.0   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Shmerl 2025-03-10 00:12:50 UTC
When using freerdp 3.13.0 with SDL 3 (Wayland mode forced with SDL_VIDEODRIVER='wayland'), and trying to copy some text from remote Windows session, copying is failing, but at the same time plasmashell locks up for around 5-6 seconds (cursor works, but all widgets are frozen and can't be interacted with).

May be something is doing blocking I/O for clipboard operations on the plasmashell side? The underlying failure might be a problem with  SDL 3 (my current version is 3.2.8), but at the same time plasmashell could handle that better and not use blocking I/O and hang when some Wayland clients misbehave like that during cursor data operations.

OS: Debian testing
Plasma: 6.3.2
Qt: 6.8.2
SDL: 3.2.8
freerdp: 3.13.0
Comment 1 Shmerl 2025-03-10 00:17:00 UTC
I mean "clipboard data operations".
Comment 2 Nate Graham 2025-03-12 23:04:25 UTC
So you're RDPing into Plasma from somewhere else; what's the server running on Plasma? Is it KRDP or FreeRDP directly? If it's FreeRDP directly, does it work to use the build in KRDP server?
Comment 3 Shmerl 2025-03-12 23:07:31 UTC
(In reply to Nate Graham from comment #2)
> So you're RDPing into Plasma from somewhere else; what's the server running
> on Plasma? Is it KRDP or FreeRDP directly? If it's FreeRDP directly, does it
> work to use the build in KRDP server?

No, the other way around. I' RDPing from Plasma to somewhere else (Windows) and copying stuff to clipboard in the remote RDP session causes local plasmashell to hang for 5 seconds.

I'm using freerdp3-sdl directly.
Comment 4 Shmerl 2025-03-12 23:10:28 UTC
I.e. I'm using freerdp3-sdl client just to be clear.

Local Plasma / Wayland + freerdp3-sdl client → Remote Windows [rdp server].

Copying to clipboard on remote makes local plasmashell to hang briefly due to freerdp-sdl3 client doing something with clipboard operations.
Comment 5 Shmerl 2025-03-16 06:41:00 UTC
Corresponding freerdp bug: https://github.com/FreeRDP/FreeRDP/issues/11359
Comment 6 Shmerl 2025-03-16 06:45:03 UTC
Opened SDL bug too for completeness: https://github.com/libsdl-org/SDL/issues/12557
Comment 7 Shmerl 2025-03-23 18:17:48 UTC
Looks like this issue is KDE specific: https://github.com/libsdl-org/SDL/issues/12557#issuecomment-2746112741
Comment 8 Shmerl 2025-04-10 15:22:49 UTC
It was an issue on freerdp side and they worked around it. But it's about some lacking feature in SDL clipboard API.