If you’re using Fedora Linux with a Bluetooth device, you might run into an issue where if you have left the device idle for a couple of minutes while working on your machine, Bluetooth automatically goes into autosuspend mode and can be difficult to wake up without restarting the Bluetooth service. The steps below will show you how to disable and re-enable autosuspend in the Linux kernel so that your Bluetooth device can function without having to restart the Bluetooth service.

Disable Auto Suspend

  1. First, using your favourite editor (in my case nano) find out if Fedora is running with BLS (Bootloader Spec) by opening the grub file located in /etc/default/grub and check to see if the line GRUB_ENABLE_BLSCFG is set to true.

     sudo nano /etc/default/grub 
    

    If it is not set to true, change it, save the file and reboot your machine.

  2. If you want to disable autosuspend for a single kernel, type the following in your Linux CLI:

     sudo grubby --update-kernel /boot/vmlinuz-LINUX-KERNEL-VERSION --args="btusb.enable_autosuspend=0"
    
  3. If you want to disable autosuspend for all the kernels installed on your system, type the following in your Linux CLI:

     sudo grubby --update-kernel=ALL --args="btusb.enable_autosuspend=0"
    
  4. Reboot your machine.

Re-enable Auto Suspend

If you want to re-enable auto suspend again, do the following:

  1. To re-enable auto suspend for a single kernel, type the following in your Linux CLI:

     sudo grubby --update-kernel /boot/vmlinuz-LINUX-KERNEL-VERSION --remove-args="btusb.enable_autosuspend=0"
    
  2. To re-enable auto suspend for all kernels, type the following in your Linux CLI:

     sudo grubby --update-kernel=ALL --remove-args="btusb.enable_autosuspend=0"
    
  3. Reboot your machine.

Check the Kernel Parameters

In the Linux CLI type the following to check if the settings have been applied:

cat /proc/cmdline

If you have done the steps above correctly and decided to disable auto suspend, you should see this as part of the output: btusb.enable_autosuspend=0. If you have decided to re-enable it, you should not see the line above as part of the output.