Laggy mouse window movement with mouse polling rate set to 1000 Hz
See original GitHub issueThe issue:
I can’t say if this is a specific issue with Qtile, but I never had this issue when I was still using Ubuntu with Gnome. Nowadays I am on Manjaro and use Qtile (and KDE as secondary login) and have a new mouse. So that’s the backstory.
I purchased a new gaming mouse that is capable of setting the USB polling rate to 1000 Hz, which is double of standard USB rate (actually a regular mouse has a setting of 125 Hz, some gaming mices have higher rates such as 250 or 500 Hz and some even 1k like mine). When I set a window in Qtile to windowed mode and want to move it with mouse, then it is extremely laggy and the window is moving slowing to its final position where I dragged it with the mouse, following the path. When I set the mouse polling rate to 500 Hz, then the it is faster and not laggy that much. But it still is laggy. BTW setting the window size is the same problem.
- Your Qtile version
$ qtile --version
0.21.1.dev46+g2a0b9179
- Relevant logs
Nothing relevant (I think).
- If relevant, the problematic part of your config.
mouse = [
Drag([mod, numlock], "Button1",
lazy.window.set_position_floating(),
start=lazy.window.get_position(),
),
Drag([mod, numlock], "Button3",
lazy.window.set_size_floating(),
start=lazy.window.get_size(),
),
]
- Some system information as additional info:
OS: Manjaro Linux [x86_64]
Kernel: 5.18.7-1-MANJARO
Uptime: 22 hours, 51 mins
Packages: 2063 (pacman)[stable], 3 (flatpak)
Shell: zsh 5.9
Resolution: 2560x1440 @ 144Hz
DE: KDE Plasma 5.24.5
WM: Qtile 0.21.1.dev46+g2a0b9179 (X11)
Theme: breeze (GruvboxColors) [Plasma], Klaus [GTK2/3/4]
Icons: breeze [Plasma], Gruvbox [GTK2/3/4]
Font: Noto Sans (12pt) [Plasma], Noto Sans (12pt) [GTK2/3/4]
Cursor: default (24px)
Terminal: kitty
CPU: Intel Xeon E3-1230 v3 (8) @ 3.7GHz
GPU: Nvidia GeForce GTX 1070
Memory: 3924MiB / 15949MiB (24%)
Disk (/): 164GiB / 219GiB (74%)
Locale: de_DE.UTF-8
Note: I have searched for the issue and found this issue: https://github.com/qtile/qtile/issues/1584 I decided to create a new issue because it is more fleshed out with correct keywords and description of mouse polling rate.
I assume the functions to set and get window positions have to be reworked in some way.
Required:
- I have searched past issues to see if this bug has already been reported.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:17 (11 by maintainers)
Fair enough.
I think mcol mentioned a potential fix in that other thread (implementing the Sync extension).
I’ll take a look at adding it.
@thingsiplay @mcnuggetsx20 In Picom disabling vsync has nothing to do with the issue also this not a picom bug, it might remove the lag but you’ll get another terrible issue which is stuttering (Screen Tearing). Picom is just a compositor and this issue does not exist with other window managers (even with picom). You can also make sure that this issue still exists when Xorg TearFree Enabled which is vsync in picom. The main issue in qtile is mouse polling rate which is inconsistent from (125, 500, and 1000 and upwards).