Constant UI lag/stuttering every 4 seconds caused by BTT (with logs)

Hi Andreas,

I’ve been struggling with a weird issue on my MacBook Pro M1 Max lately. Every 4 seconds, I get a noticeable system-wide lag that lasts for a fraction of a second. It makes moving windows or scrolling very choppy ( https://youtu.be/O5uidUf60E0 ) After some testing, I confirmed that the lag stops immediately as soon as I quit BetterTouchTool.

I looked into the macOS Console logs, and it seems BTT is hitting a loop, requesting window images (SLSWindowListCreateImageFromArray) dozens of times per second, which seems to be choking the WindowServer.

I recently set up an async webserver on an ESP32-S3 with 7 physical buttons. I enabled the built-in webserver in BTT to use these buttons as shortcuts (similar to a DIY Stream Deck). I also have some Floating Menus configured. Interestingly, even if I disable the BTT webserver, the lag and the polling loop persist.

Here are the relevant snippets from my Console:

Repetitive Window Image Requests:

Plaintextdefault 11:47:09.960891 BetterTouchTool [INFO] SLSWindowListCreateImageFromArrayProxying_block_invoke:244 request: <private>, error: (null), output: <private> default 11:47:10.026366 BetterTouchTool [INFO] SLSWindowListCreateImageFromArrayProxying_block_invoke:244 request: <private>, error: (null), output: <private>

RunningBoard Entitlement Errors:

Plaintexterror 11:47:13.013446 runningboardd [app<application.com.hegenberg.BetterTouchTool...]: client not entitled to get limitationsForInstance: <Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, ...}>

WindowServer struggling with the load:

Plaintexterror 11:47:20.412250 WindowServer Clearing datagram buffer for cid 0xd8803. Client state: Data count: 16616 connectionIsUnresponsive: 0 clientMayIgnoreEvents: 1 clientIsSuspended: 0

Do you have any idea what might be triggering this intense polling loop? Could it be related to how Floating Menus handle window previews or app icons?

I’m on the latest macOS and BTT versions is 246. Let me know if you need a full diagnostic export!

are you using the NotchBar feature or some of the status item management features?

Could you maybe provide the full BTT logs, then I can maybe see where it is coming from.

No, I do not use the notch bar with BTT, I sent you my log by email.

Ah sorry I meant the logs from ~/Library/Application Support/BetterTouchTool/Logs

Your logs seem to be mostly webview related (which again could point to the NotchBar, maybe try to disable it explicitly if you have tried that in the past:

Great, thank you. Yes, indeed, disabling the notch has resolved my issue. :clap:t3:

RESOLVED! Keeping info for posterity.

Apologies for hijacking this thread, but it seems quite close to what I’m experiencing, though turning off the notch / custom action did not resolve for me.

My issue is that dragging a window also seems to experience a stutter when BTT is running.

I tried disabling all my Presets just to rule out as much as possible.

An additional problem, which I’m not sure whether it’s related to BTT, because it continues to occur when I quit BTT, but perhaps there might be some Daemon still running, that second issue is that:

  • it only occurs on the Magic Trackpad (not the built-in trackpad)
  • I have tested the trackpad on another Mac Mini without BTT installed, and the 3-finger drag works fine, so a hardware issue is ruled out.
  • It occurs whether I’m connected with USB or Bluetooth
  • It continues to occur when I quit BTT, but the only reason I mention it is because its behavior is almost identical to the stuttery behavior when BTT is running.

Behavior:

The “Three Finger Drag” is enabled in accessibility > Mouse Pointer > Track Options

If I drag a window/icon, etc… the drag experiences the same behavior as was demonstrated in the screencast; Only difference is that it “releases” the finger drag, randomly… it basically stutters on the release, because the release is immediately followed by an item selection box, which tells me that it’s not completely releasing, but it’s releasing just enough to interrupt the drag, drop the item and switch to a window selection behavior.

The “click and drag” on the Magic Trackpad works fine, and is subject to the stutter in the screencast, and does in fact go away when I turn off BTT.

I’m not exactly sure what logs could be relevant to this, but I’m happy to share any/all.

Any thoughts? the issue isn’t a show stopper, but it definitely gets frustrating over time.

UPDATE: RESOLVED!!

I had multiple monitors connected to my laptop, so I thought to disconnect them and see if the issue occurs, and lo and behold, every problem described above went away. The culprit: (I think) is the Caldigit dock, which apparently needed to be power cycled. Once it came back up, and reconnected all the monitors, everything worked like a charm.

That was a completely unobvious root cause given all the tests I’ve done. Hopefully someone may benefit from this in the future.