Buetooth mouse sluggish when bluetooth headset on

Since I upgraded to Ubuntu 21.10 I have noticed that my bluetooth mouse is sluggish (has reaction delay) when and only when my bluetooth headset is in use.

If the headset is on, but is not receiving any sound, the mouse works just fine.

Also, the bluetooth headset can no longer be set on A2DP, but only HFP and HSP which I describe in another question: Bluetooth audio A2DP mode stopped working after 21.10 update


Solved by changing the bluetooth coexistence parameter with

echo "options iwlwifi bt_coex_active=0" | sudo tee /etc/modprobe.d/iwlopt.conf

Reboot

Thanks: https://ubuntuforums.org/showthread.php?t=2372916