Keyboard lags and repeats keys on Linux GUI Apps under WSLg
Author: tkonstaCreated Nov 11, 2023Updated Sep 25, 2026
Labelsbug
Windows build number:
10.0.22621.2428
Your Distribution version:
22.04
Your WSL versions:
WSL version: 2.0.7.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25880.1000-230602-1350.main Windows version: 10.0.22621.2428
Steps to reproduce:
- Start a Linux GUI App inside of WSL (I first ran into the problem on IntelliJ, however I can reproduce it in gedit as well)
- Start typing something fast (if I type slow enough, then the problem doesn't appear)
- First some of the typed keys are just not showing up, and at some moment one arbitrary key is just repeated until I hit another key
WSL logs:
pulseaudio.log stderr.log weston.log
WSL dumps:
No response
Expected behavior:
No lagging keyboard and no repeated keystrokes
Actual behavior:
see "steps to reproduce"
Additional information
- I experienced this problem first on a Ubuntu 22.04 distro, which I had in use for quite some time without the problem and all of a sudden this started to happen. Then I installed a fresh Ubuntu 23.10 distro thinking that maybe something within the installation is causing the problem, but the same thing happens again - in IntelliJ as well as in gedit.
- The problem also occurred in WSL 1.x. So I did the update to the 2.x pre-release version with the hope that the problem might be gone in 2.x, but that's also not the case.
- The same problem does not happen in all the programs running on windows. For example I use Visual Studio Code running on Windows, and using a project inside of WSL for coding and no problem at all.
- I also experience on most of the WSL startups a problem in the weston.log which is discussed in https://github.com/microsoft/wslg/issues/972. However there seems no relation between the rdp_allocate_shared_memory problem discussed in the other issue and this problem here. Even if the rdp_allocate_shared_memory problem does not occur, this problem still exists. Maybe they have a common root cause, but one seems not to be leading to the other.
Source: microsoft/wslg