Bluetooth sometimes doesn't correctly display status

My headphones (Soundcode Life Q20) are currently connected to my laptop via bluetooth but it isn’t displayed correctly since it shows the connect button so there’s no direct way to disconnect it. It displays the battery information but doesn’t indicate its connected which is odd. This issue goes away upon restarting and only occurs occasionally.

When I actually click the connect button, it just loads for a minute or so without doing anything before failing. This same thing happens when I try to click the connect button of any other listed devices whenever this happens.

My temporary solution is I just restart the bluetooth service manually which fixes it so it’s not a huge issue for me as of now.

Does it occur after some period of inactivity of the bluetooth device? Also (if this a laptop) are you using any power optimizer application like TLP?

This does typically occur after some period of inactivity. This sometimes happens when I close my laptop throughout the day which puts it in sleep mode for a 1-2 hrs at a time. I don’t use any applications like tlp.

Yeah! As expected! You need to disable the bluetooth controller from autosuspending. You would probably do this by creating a udev rule file in /etc/udev/rules.d. You can name the file something like 99-bt_autosuspend.rules and have the following contents in it

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="XXXX", ATTR{idProduct}=="YYYY", ATTR{power/control}="on"

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="XXXX", ATTR{idProduct}=="YYYY", ATTR{power/autosuspend}="0"

Where XXXX and YYYY are your bluetooth’s controller ids. You can get these by running lsusb (if you can’t figure these out, just post the output of lsusb here).

Then either reboot your laptop or run the following to load the new udev rule

sudo udevadm control --reload-rules && sudo udevadm trigger

PS: I got these from the internet and although I believe these are correct, Just let me know if there are any errors/issues.

1 Like

Even when I do leave my laptop on idle or shut the lid, the issue doesn’t happen often enough for me to add it. What I will do for now is just manually restart the bluetooth service since that works for now. I’ll definitely save your reply and refer to it in the future if the issue happens more often! I really appreciate all your help since I was completely oblivious to the auto-suspending behavior.

1 Like