Ubuntu 18.04 doesn't detect bluetooth devices anymore after waking from suspend

UPDATE 2019-10-31:

I am no longer experiencing this issue, might be the result of a kernel update or something else in 19.10. If anyone knows more, please comment and I'll include it here!

UPDATE 2018-09-20:

My original solution no longer works reliably for me. I now see one of three cases on resume from suspend:

  1. Bluetooth and WiFi both disabled (no adapters available)
  2. Bluetooth only disabled (no adapters available)
  3. No issues

The only workaround that addresses the problem 100% of the time is restarting to BIOS and manually toggling both Bluetooth and WiFi off then on.

The workaround that I use is unplugging the power source and closing then opening the laptop lid to force a hardware power cycle. This works about half of the time, so I often have to do this two or three times.

Original Answer:

I have been encountering the same problem using Kubuntu on Dell, Asus, and MSI laptops with integrated WiFi/Bluetooth since at least 16.04. It happens intermittently; I cannot reproduce it reliably whatsoever, but it does only happen after resuming from suspend.

Here is my chipset:

$ lspci | grep Network
3a:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

When the issue occurs on default configuration, the bluetooth service is incapable of being fully restarted. I borrowed heavily from Ossama Nasser's answer, but have had more luck forcing the bluetooth service off on suspend and then up on resume.

My solution below, also written to /lib/systemd/system-sleep/bluetooth:

#!/bin/bash

if [ "${1}" == "pre" ]; then
  service bluetooth stop
elif [ "${1}" == "post" ]; then
  sleep 5
  service bluetooth start
fi

I will continue to update this answer if I can confirm that it works. Again, this issue seems somewhat difficult to reproduce.


I have the same problem, borrowing a fix for similar problem I encountered with Ubuntu 14.04, After further investigation I found that restarting the bluetooth fixes the problem. this is a solution that is currently working for me:

1- In folder /lib/systemd/system-sleep/ create a script called bluetooth with the following content:

#!/bin/bash  

if [ "${1}" == "post" ]; then
    sleep 5
    service bluetooth restart
fi

this will restart the bluetooth service after 5 seconds from system resume (This way is the only one worked for me for now it might change it's mind in the future)

2- Mark the script as executable:

chmod +x /lib/systemd/system-sleep/bluetooth

I would like to point out that I use Kubuntu 18.04