pqrs-org/Karabiner-Elements

Having mouse enabled in Karabiner introduces heavy intermittent mouse lag on MacOS

Open

#2566 opened on Jan 4, 2021

View on GitHub
 (50 comments) (8 reactions) (0 assignees)C++ (22,112 stars) (909 forks)batch import
bughelp wantedneeds to be addressed

Description

I've seen this with several recent builds of Karabiner (^13.1.0), and I saw it before and after upgrading to Big Sur (currently on 11.1). I'm using the SteelSeries Rival 600 (the wired one), and have made sure both its firmware and companion software are up to date. I've filed a ticket with SteelSeries, but have since come to realize that removing Karabiner fixes my problem. It's a bummer, as I'd like to use Karabiner for keyboard mods, but now I can’t.

Edit: thanks to @Kossio for mentioning the option of disabling the device. I thought this was a conflict with having Karabiner even installed, but it looks like disabling the mouse device in Karabiner also solves the lag.

The problem description: the mouse sees intermittent heavy lag. I’m not talking the typical I'm-a-windows-user-that-doesn't like-Mac-acceleration-profiles lag, I mean when it happens I can move the mouse in circles and watch it start slowly playing back my actions at a rate far slower than my movement. It seems to buffer the input and play it back slowly. After moving the mouse a bunch I can take my hand off it and watch the cursor dance around the screen replaying my actions for 3-4 seconds.

This sort of lag behavior comes and goes. It'll be laggy for 8-10 seconds, then fine for a few minutes, or even sometimes an hour. To try to isolate this I've tried unplugging all peripherals from the computer (2018 Macbook Pro), and shutting down all running applications. The lag is still there as long as Karabiner is installed.

The kicker? I’m not even using Karabiner for any mouse button mappings.

I realize this may be a specific problem between the Rival 600 and Karabiner on MacOS, but I thought if I open the issue here it might be a kickoff point for anyone experiencing similar problems.

Edit: After observing this behavior more I’ve noticed that the lag occurs usually when something else is taking resources. For example just now I got a micro pop-up about adobe software updating and for the few seconds it was there my mouse was laggy. This could be anything though, not just Adobe. I noticed a spike during a video call that even interfered with audio delivery. I’ve seen this bog down when opening any of several standard applications like Safari or Slack. It’s very clear to me it’s not a problem with any of these other pieces of software, but actually a problem with resource management when the mouse is being managed by Karabiner. Very odd to see it mess with the audio of a video call though. It makes me wonder if having a mouse in Karabiner is actually causing system-level resource usage spikes and then in turn those spikes are responsible for the slowdowns.

I'm happy to work directly with any developer(s) to help pin this down. I have the time and am willing to test builds out and even take notes. Just let me know here.

To anyone helping maintain & provide Karabiner, thank you!

Contributor guide