question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Laggy mouse window movement with mouse polling rate set to 1000 Hz

See original GitHub issue

The 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:open
  • Created a year ago
  • Reactions:1
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
elParaguayocommented, Jul 23, 2022

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.

0reactions
M1ndocommented, Oct 28, 2022

@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).

Read more comments on GitHub >

github_iconTop Results From Across the Web

1000hz mouse polling rate causes stuttering : r/WindowsHelp
Moving the mouse faster (quick, cross mousepad movements) will cause stutters that are extremely jarring (drops from 90+ fps down to 15fps), ...
Read more >
Why is 500hz and 1000hz mouse polling rate causing lag
I don't see any higher cpu usage when using 1000hz. Now my mouse polling rate is set at 1000hz, no stutter/fps drops at...
Read more >
1000Hz Mouse Polling Lag Epidemic - Linus Tech Tips
- 1000Hz polling seems to cause horrible input lag and stuttering. For a while now, I've been trying to figure out what was...
Read more >
fluctuating mouse polling rate? FIXED - Blur Busters Forums
This is normal for wireless mice. It is done to save the battery life, since 1000hz is very hard on the battery and...
Read more >
My solution to a huge lag in slave (Polling Rate - mouse at ...
So when polling rate is 1000 Hz, the network traffic consumption is 2 Mbits, in both programs. ID is only a little laggy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found