Bug 477981 - SHIFT key can get stuck when using the session remotely
Summary: SHIFT key can get stuck when using the session remotely
Status: CONFIRMED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-03 11:54 UTC by Eduardo Sánchez Muñoz
Modified: 2024-09-21 22:11 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Sánchez Muñoz 2023-12-03 11:54:11 UTC
SUMMARY

SHIFT key can get stuck when using the session remotely. When that happens, every click and key stroke (local or remote) is handled as if SHIFT was pressed, making the session almost unusable.

Closing Krfb does not fix it. A log out or reboot is required to unstuck the key.

At this point, if the session gets locked, it will be impossible to unlock (unless your password can be typed with SHIFT pressed) and VT switching will not work, so the only way out is pulling the plug to reset the PC.

There are two ways this can happen:

a. Randomly after using the remote session for a while
b. Disconnecting the VNC client with SHIFT pressed

STEPS TO REPRODUCE
1. Launch Krfb
2. Connect from another PC with a VNC client
3. Close the VNC client with SHIFT pressed, or just use the the remote desktop for a while

OBSERVED RESULT

The SHIFT key gets stuck on the PC running Krfb.

EXPECTED RESULT

The SHIFT key should not get stuck.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11

ADDITIONAL INFORMATION

Wayland session and pw backend
Comment 1 Puspam Adak 2024-02-01 05:15:06 UTC
I can confirm that this happens all the time when I connect to KRFB using MultiVNC client. Maybe this problem happens with specific VNC clients, but Kwin should be cautious about not to latch any modifier key forever even after the session ends.
Comment 2 Stuben 2024-02-21 22:30:17 UTC
Also happens with other modifier keys like CTRL.
Comment 3 Aleix Pol 2024-07-09 12:45:53 UTC
Reassigning to xdg-desktop-portals-kde which are in charge of this. There might be mitigations that can happen in krfb/krdp but the underlying technology should just work.

See also: https://invent.kde.org/plasma/krdp/-/issues/20
Comment 4 Tanner Schultz 2024-08-26 15:14:20 UTC
This issue unfortunately makes krfb worse than useless for me, as I can consistently cause the issue in a few dozen keystrokes, necessitating a reboot. Since options for remote desktop on wayland are extremely limited this is causing me quite a bit of grief. Is there anything I can do to help diagnose the root cause of the problem?
Comment 5 Mike Smith 2024-09-04 04:54:44 UTC
I'm seeing the same issue with KRDP. I'm not sure if that helps. Using Fedora Plasma
Comment 6 saunders 2024-09-21 22:11:23 UTC
I also have this problem. I can type the alphabet and a couple letters will repeat almost every time. I can also disconnect and letters will continue to repeat like its still being held down. Tested with multiple vnc clients.

Looking at my notes I had this issue previously with x11vnc and fixed it by removing "--without-xkeyboard" from the ebuild and recompiling.