Before the quarantine started, I decided I needed a proper work space at home for my new 16" MBP. A monitor, desk, keyboard, etc. Working from the couch on my laptop just didn't cut it in terms of screen space and ergonomics. So I went out and bought everything including a new Apple Magic Keyboard and Magic Trackpad 2.

Unfortunately, I found the keyboard to be somewhat laggy. It was only a minor annoyance when working, but frequently having keypresses queue up and take a few hundred extra miliseconds to appear is annoying... and makes gaming impossible. So I ended up hardwiring the keyboard and found the mouse to be okay. But at the same time, that's kind of BS. I bought the 16" MBP and a USB-C monitor because I wanted exactly 2 cords on my desk: Power to the monitor. And the monitor USB-C to the laptop to provide video and power. After spending several grand on this setup, it just didn't seem right to need a cord to keep my keyboard plugged in.

So how did I fix the lag?

Eventually I contacted Apple. They suggested the usual stuff. Turn the bluetooth devices and radio off and on again. Restart the computer. Make sure the devices are well or fully charged. Forget and pair the devices again. When that didn't work, they suggested I reset the SMC. Twice. I offered to try resetting NVRAM, because why not? Those may solve most issues, but they didn't help me.

Here's what did help fix my bluetooth lag:

  1. Hold shift and option on your keyboard, then click on the bluetooth system menu.
  2. The debug menu should appear (which you wouldn't see without holding shift and option).
  3. Reset the Bluetooth module
  4. Repeat steps 1 and 2 and then factory reset all connected apple devices.
  5. Connect/pair the keyboard and mouse again.
Hold shift and option when clicking the bluetooth system menu icon to access hidden debug options and info.
Hold shift and option when clicking the bluetooth system menu icon to access hidden debug options and info.

The result

With that done, suddenly both the mouse and keyboard work flawlessly with no lag.

Update 9/26/2020:

I have yet to test this under macOS Big Sur, but have coninued to use it as bluetooth interference causes issues for my keyboard and/or mouse running on macOS Catalina. As such, I wanted to mention a few more points:

  1. This isn't a permenent fix. Bluetooth uses the 2.4ghz spectrum that is also used by WiFi, microwaves, baby monitors, and other devices. Poorly constructed USB-C cables can also cause interference. The bottom line, I find myself doing this fix on a somewhat regular basis, but it usually helps for a few days.
  2. If you find yourself doing this a lot, try to reposition things like routers, power sources, other wireless devices, and cords. Consider if your WiFi router can be reconfigured with a different channel.
  3. You don't have to reset the bluetooth module and factory reset all devices every time. It's usually sufficient to access the bluetooth menu with shift and option as above, then use the additional options presented under any device that is giving you issues. I typically "factory reset" my Magic Keyboard, then plug it back in to resync with my computer. This also works well for my Magic Touchpad.