Repository navigation
[Bug] Stutter when moving windows #167
Replies: 2 comments 15 replies
|
Please try 1.11.1. I think I fixed the issue. |
|
@fuddlesworth Ok, I finally figured out what's causing this. It's fsync on my slow ADATA m.2 drive. When you start dragging a window, plasmazonesd binds a temporary Escape shortcut so you can hit Esc to cancel the snap (the cancel_overlay_during_drag one), and it drops that shortcut again when you let go. Both of those go through KGlobalAccel, and kglobalaccel lives inside kwin, so kwin rewrites kglobalshortcutsrc ( It only happens at the start and end of a drag. Dragging around continuously is totally smooth because nothing touches the shortcut config mid-drag, which is exactly how it felt. Caught it with bpftrace. Off-cpu stack on the kwin thread the moment I drop a window: An fentry trace on btrfs_sync_file over ~8 drops showed kwin fsyncing kglobalshortcutsrc + kglobalshortcutsstaterc on every single one. And it's not my keybinds. That Esc shortcut is ad-hoc (persistent=false), separate from the configurable keybind table, so clearing them does nothing. I wiped every plasmazones global and tiling shortcut, restarted the daemon, and it still fsynced on every drag (~28 over a few drops). Why it hits me and probably not most people: my os drive has garbage fsync latency, around 60ms a flush (old ADATA SX8200 Pro, one of the silently downgraded SM2262G units). On a normal nvme an fsync is under 1ms, so all these writes still happen, you just never feel them. So this is going to be a "works on my machine" thing that depends entirely on your disk. Fix idea: don't route that per-drag Esc grab through KGlobalAccel, since it writes kglobalshortcutsrc to disk every time. Either register it once and leave it bound, or grab Esc during the drag some other way that doesn't touch the shortcut config. Even on a fast disk it's redundant writes a few times per drag. If anyone wants to repro in the meantime: get those two config files onto fast storage and it goes away. I put ~/.config and ~/.local/state on tmpfs with anything-sync-daemon and the stutter completely disappeared. A decent ssd does the same thing for real. Still have the bpftrace scripts if they're useful. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
There is a noticeable stutter when moving application windows.
The issue occurs in two stages:
While dragging the window – The window movement is not smooth and visibly stutters.
After releasing the window – The mouse cursor briefly stutters before returning to normal behavior.
I have attached logs captured while moving Konsole around.
Expected Behavior
Window movement and mouse cursor should remain smooth and responsive during and after dragging.
Steps to Reproduce
PlasmaZones Version
1.11.0
Display Server
Wayland
Desktop Environment
Plasma 6.5.5
Distribution
CachyOS
Relevant Logs
Configuration
No response
Checklist
All reactions