Disabling Bluetooth auto-suspend with module options

In my previous post I showed how to restart Bluetooth on Debian Linux. Here, I explain how to disable Bluetooth auto-suspend with a kernel module option.

Kernel modules can be passed parameters that affect how they work. The parameters that a module accepts can be discovered with modinfo. In the example below modinfo btusb displays those available for the Bluetooth module.

$ sudo modinfo btusb
...
parm:           disable_scofix:Disable fixup of wrong SCO buffer size (bool)
parm:           force_scofix:Force fixup of wrong SCO buffers size (bool)
parm:           enable_autosuspend:Enable USB autosuspend by default (bool)
parm:           reset:Send HCI reset command on initialization (bool)

The option enable_autosuspend is the one of interest to us. It is set in a configuration file in directory /etc/modprobe.d/. In this case I created file btusb_autosuspend-disable.conf with the content below.

options btusb enable_autosuspend=0

This disables Bluetooth auto-suspend when the kernel is loaded, thus preventing the problem of Bluetooth disconnection.

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.