Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Bluetooth service unable to start without "systemctl restart bluetooth"

Writer Emily Wong

I've just received a new HP unit.

By default, after a fresh boot, the Bluetooth service is unable to start correctly and does not find any device to pair with nor the NetworkManager's Bluetooth indicator changes from "off" to "on" state.

Device:Bus 002 Device 002: ID 8087:0029 Intel Corp. AX200 Bluetooth

Logs indicate a problem with rfkill :

22:22:46 bluetoothd: Failed to set mode: Blocked through rfkill (0x12)
22:22:46 bluetoothd: Failed to set mode: Blocked through rfkill (0x12)
22:19:44 bluetoothd: Failed to set mode: Blocked through rfkill (0x12)
22:13:44 bluetoothd: Failed to set mode: Blocked through rfkill (0x12)
22:13:43 bluetoothd: Failed to set mode: Blocked through rfkill (0x12)

Indeed, it is "soft blocked" :

# rfkill list
0: hci0: Bluetooth Soft blocked: yes Hard blocked: no
1: phy0: Wireless LAN Soft blocked: no Hard blocked: no

If I unblock it :

# sudo rfkill unblock Bluetooth

and restart it

# sudo systemctl restart bluetooth

It immediately works and connects to devices correctly.

However, if I switched it back off and on using NetworkManager applet, it is again not working and Bluetooth stays in "off" state.

screenshot

So it seems the NetworkManager is unable to activate it back. Only then a subsequent systemctl restart bluetooth command seems to make it work again and change to "on" state as well as start listing nearby devices.

So, in short, NetworkManager is unable to activate the Bluetooth interface.

Note that concerning WiFi, it works as expected.

The issue is persistent across all kernels (as far as I have tested) on this device except 5.4.x. Independent of Ubuntu version, same issue on 20.04, 20.10 & 21.04. Same issue on boot from USB. Works with no issues on Windows.

The issue is occasionally not present after I restart the computer, but most of the time it is.

Is anyone able to assist with solving this issue, please?

2 Answers

On my HP elitebook G2 840, Intel® Core™ i5-5200U CPU @ 2.20GHz × 4 Ubuntu 20.04.2 LTS Linux 5.8.0-53-generic x86_64 this worked a bit:

Editing config file: sudo nano /etc/bluetooth/main.conf

Changing AutoEnable to True, taking out the #

Taking out # at Reconnect=7

Taking out # at Fastconnectable

Save and exit.

As per this post:

1

I just fixed this with some help. First open terminal make yourself sudo with command:

sudo -i
cd /etc/init.d

Use a text editor put this inside:

sleep 10
systemctl restart bluetooth.service

Save this script as BLUETOOTHFIX.sh. Then enable to execute by terminal:

chmod 755 /etc/init.d/BLUETOOTHFIX.sh
chmod +x /etc/init.d/BLUETOOTHFIX.sh
ln -s /etc/init.d/BLUETOOTHFIX.sh /etc/rc3.d/S99BLUETOOTHFIX.sh
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy