I fixed the same thing in GNOME a few years ago across GLib, GTK, and Mutter/GNOME Shell. It required getting glib onto ppoll() finally.
It would be cool to see this test with a CRT connected to a VGA port (adapters make it slower) and a PS/2 input device.
Last time i checked X11 without a desktop compositor (very important) still provides the least latency of any environment, so even if KDE Plasma (not KDE as a whole AFAICT) drops support, there are other WMs/DEs that will work with it and have minimal latency on desktop.
Zed definitely does funny things to KWin. It's not the only app that does, but this point in particular would be worth more investigation. I've noticed it causing weird issues with the frame pacing as well sometimes.
Things like this are so maddening. I don't worry too much about performance on Linux, reserving a Windows machine when I want full hardware acceleration and optimization.
It required a reboot to get USB to work again, after a completely unrelated process using mostly the GPU crashed. I let Codex spend 2-3 hours trying to get to a root cause of it, but zero luck, just "USB subsystem became unresponsive when the process crashed"...
I mean something derogatory. Contemptuous. I have said in the past that alternating of destruction and creation, refining and revolting, is natural and necessary to converge yet escape static cycles. Applying a kind of cynicism toward the commensal bottom dwellers is somewhere mid-revolt, rejecting the deficient and impossible to focus on what may work.
I continue converging on solutions to the problem of how the paying consumer will retain great open development. No solutions I come across, no models even for solutions are within the same galaxy of framing as the mindset of the consumer, and yet the real consumer's views, not necessarily the self-selected who speak on the internet, will decide outcomes. Some revolution and contempt is necessary to push through activation barriers.
Contrast with the perspective of the builder. Switching programs is not an option because the program one is building must be made to work. The builders are very much not on the same page with the user. We are not in alliance at all. The user expects that we find some business opportunity elsewhere to drive the water wheels and yet the software we emit should cater to their needs, and when it does not, "it's so frustrating."
Sales often involves finding the best lies to deliver the truth. Natural language is not a particularly precise instrument, so these kind of heuristic tickling approaches in conjunction with building more self-evident things for people to simply believe at first sight are the best that can be done. A craving for chaos and undefinition is an appropriate reaction to the need to explore more forcefully and less in line with the impossible expectations of consumers who would write their own ruin if left alone.
I say that because I play some timing tight action games natively on elf(glibc)/linux. Let's take an example with one of the toughest: Silksong.
I was trying to beat lost lace, her timings were too tight and nearly at each try I was locked in some hardly humanly dodge-able pattern combination. I knew all of her patterns by heart after zillions of tries.
Then, I started to have strong suspicions: I closed all background apps, disconnected the network and try again... did beat her, first try, super ez, like she was transparent to me and slow, I could "read" her and react in time easily.
I am running a Zen2, 12 cores at ~4GHz... and native x11 with xorg, sooo... the main culprit seems to lie in game engine programming and then would not completely tied to wayland programming (don't worry, I am coding my own wayland compositor, so, I am going to move to wayland, well actually designing a 'binary layout' for a wayland compositor to be accurate).
I am now in a Silksong steel soul run, and you bet I'll keep this experience in mind, because when I watch video streams of other people fighting some bosses, I can cleary "read" their moves like it is "slower" and which seems much less "aggressive", but once I fight them on my system, nope, I get a much harder time at reading the boss patterns. The "closing all apps and disconnecting the network cable" did not change a thing here, because I am currently fighting "ez' bosses then I always manages to get rid of them before I get really used to their patterns again... we will see with later and harder bosses.
But this could be another [obvious] culprit: stress. I know I am very, VERY, sensitive to stress: it disrupts severely my mind and worse with very little of it. In other words, I would have "brain fog" while fighting a boss because of stress, and the time I did beat lost lace in one shot ez: I was "testing" something without the stress instead of actually trying to beat her... a abysmal difference.
FWIW, I have similar frame pacing issues with Gnome/Mutter/Wayland with a AMD CPU + Nvidia GPU but that very issue doesn't happen with Xorg at all.
Might surface even larger issues if you go towards Wayland instead :)
Turns out it was due to a combination of things.
I was using niri (Wayland window compositor) and this input latency was present with or without v-sync turned on. It happened when I was using a 60hz 4k monitor with an NVIDIA GPU.
Then I tried playing the same game on a laptop (same distro and dotfiles) with an AMD GPU and no external monitor. The delay disappeared.
Then I played the same game on that laptop but hooked it up to the 4k monitor and I had the same keyboard input latency only when v-sync was enabled. When I turned off v-sync and capped my FPS then the input latency was reduced by an amount that I could no longer perceive the delay.
Then I put an AMD GPU in the original desktop I was testing and reproduced the same results as the laptop.
However, when I switched to using KDE Plasma with X or Wayland, the keyboard input latency disappeared. This was with the 4k monitor and both NVIDIA and AMD GPUs.
I reported it to niri but it hasn't gotten traction, I just know I can reproduce it on 2 completely different systems with different GPU vendors and hardware when the common ground is having a 4k 60hz monitor hooked up.
But for VR stuff I've been going back to X11, and I was just last night trying to finish a screen capture program on wayland (w/ kde plasma) and idk I just have to do repeated screenshots ana analyze those > horrible fps, but at least I think I got that working finally after many attempts last year.
Gaming is not really an issue now with DEs that help ppl disable compositions and wine/proton.
Maybe AI coding agents will make the situation better, but because open source maintainers are too dim to understand the complex changes the AI makes, and too poor to have their own AIs to help them, they won't take the changes. I make improvements to open source but am forced to keep them to myself.