Display locks up when attempting to connect a bluetooth device

I had my display / window manager lock up several times when attempting to connect to a bluetooth device. For example, using a script that invokes: bluetoothctl connect […]. I can move the mouse, but cannot type anything and cannot click anything. I’m confused how bluetooth could have anything to do with the display.

I got the system working by switching to a virtual terminal and killing the bluetoothctl process. I had the same thing happen on a Debian machine. Any hints?