# Bluetooth malfunctioning in Ubuntu 20.04 laptop

Gold Member
My laptop is running Ubuntu 20.04, always up-to-date.

This problem has started very recently. Suppose I connect my Bluetooth earphone to the PC, and start watching some lectures on YouTube. (Internet is provided by USB tethering from Android phone.) Suddenly, the audio on the earphone stops. On opening Settings, I find that the audio output device has shifted to Inbuilt speakers. The Bluetooth earphones are still connected, but when I try to change the audio device, the Settings app freezes, and I have to force quit it.

What I have tried:

1. I opened Blueman manager. It said I am still connected to the earphones. When I disconnected and tried to reconnect, it said, Connection failed: Resource not ready.​

2. Even when Blueman was reporting that Bluetooth was ON, Settings reported that it is off.​
3. I read online that command-line tools may work. So, I opened the terminal and installed bluez-tools. Then I executed bt-device -l, to which I got:​
Code:
~$bt-device -l Added devices: Rockerz 255 Pro+ (00:11:5A:00:48:7D) Well, the earphone is still paired.​ 4. Then I executed the following commands:​ Code: ~$ bluetoothctl list
Controller 48:5F:99:BD:35:08 PC-name [default]
~$bluetoothctl connect 00:11:5A:00:48:7D Attempting to connect to 00:11:5A:00:48:7D Failed to connect: org.bluez.Error.NotReady 5. I searched Google for "Failed to connect: org.bluez.Error.NotReady ubuntu", and found this question. From then, I have tried the following:​ Code: ~$ bluetoothctl power on
Changing power on succeeded

~$bluetoothctl connect 00:11:5A:00:48:7D Attempting to connect to 00:11:5A:00:48:7D Failed to connect: org.bluez.Error.NotReady ~$ rfkill list
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
6: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

~$systemctl status bluetooth.service ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: > Active: active (running) since Tue 2021-04-27 15:50:09 IST; 33min ago Docs: man:bluetoothd(8) Main PID: 100408 (bluetoothd) Status: "Running" Tasks: 1 (limit: 18993) Memory: 2.3M CGroup: /system.slice/bluetooth.service └─100408 /usr/lib/bluetooth/bluetoothd Apr 27 15:57:02 Knowledge-PC bluetoothd[100408]: Failed to set mode: Failed (0x03) Apr 27 16:04:49 Knowledge-PC bluetoothd[100408]: Endpoint unregistered: sender=:1.75> Apr 27 16:04:49 Knowledge-PC bluetoothd[100408]: Endpoint unregistered: sender=:1.75> Apr 27 16:04:50 Knowledge-PC bluetoothd[100408]: Endpoint registered: sender=:1.385 > Apr 27 16:04:50 Knowledge-PC bluetoothd[100408]: Endpoint registered: sender=:1.385 > Apr 27 16:04:57 Knowledge-PC bluetoothd[100408]: Endpoint unregistered: sender=:1.38> Apr 27 16:04:57 Knowledge-PC bluetoothd[100408]: Endpoint unregistered: sender=:1.38> Apr 27 16:04:57 Knowledge-PC bluetoothd[100408]: Endpoint registered: sender=:1.389 > Apr 27 16:04:57 Knowledge-PC bluetoothd[100408]: Endpoint registered: sender=:1.389 > Apr 27 16:16:54 Knowledge-PC bluetoothd[100408]: Failed to set mode: Failed (0x03) ~$ pulseaudio -k
~$pulseaudio --start ~$ bluetoothctl connect 00:11:5A:00:48:7D
Attempting to connect to 00:11:5A:00:48:7D
Failed to connect: org.bluez.Error.NotReady
Nothing works. When I restart the laptop, sometimes the problem is fixed temporarily, and then it starts again after some time. On the other hand, sometimes Ubuntu fails to locate any Bluetooth hardware, and Settings says, "Plug in a Bluetooth dongle to use this feature". Rebooting continuously solves this feature.

I am not sure when this problem started exactly.

Continuously rebooting is not a solution because I work with a number of heavy applications like Android Studio and IntelliJ IDEA, and restarting means I have to close and reopen them again and again, which is problematic.

I don't think there is a problem with the earphones because they work fine with our mobile phones.

Any help is appreciated.

## Answers and Replies

Mentor
For the moment switch to wired headphones.

Gold Member
For the moment switch to wired headphones.
That's what I am doing, but it is turning out to be difficult because the wire is not long, and while taking notes, the laptop is farther away from me.

Mentor
There are extension cords for audio cables. I use one in my office for the same reason.

My Bluetooth on my mac mini has been acting up too. In one case, I lost access to my BT keyboard and had to get a wired one to get back in which I now use regularly. So much for a cordless future.

Wrichik Basu
Gold Member
Rebooted the laptop, and now Bluetooth is gone.

Staff Emeritus
No wonder it didn't work. Is your Bluetooth on the mother board? and expansion board? a dongle?

Gold Member
No wonder it didn't work. Is your Bluetooth on the mother board? and expansion board? a dongle?
On the motherboard. As I said in the OP, when I reboot, sometimes Ubuntu fails to find the Bluetooth. Rebooting again and again till the problem fixes is the only solution I have found.

Mentor
Could this be related to the tingling sensation due to grounding issues? maybe the bluetooth circuit got fried by a static charge or something.

Wrichik Basu
Gold Member
Found now that Bluetooth is back (without rebooting). Could connect to the earphones too.
Code:
~$bluetoothctl list Controller 48:5F:99:BD:35:08 PC-name [default] ~$ bluetoothctl connect 00:11:5A:00:48:7D
Attempting to connect to 00:11:5A:00:48:7D
[CHG] Device 00:11:5A:00:48:7D Connected: yes
Connection successful
But this is most probably temporary, and the problem will recur.

Mentor
Another thought is it heat telated where it works at startup but fails when the board gets too hot

bumbledore
I've had connectivity issues on both Elementary OS 6 (Odin) - based off Ubuntu 20.04, and on Ubuntu 21.10. The past few days - I've been unsuccessfully trying to ignore this and move on. This post was one of many I ran into while trying to figure out what I could do.

I do think I have resolved my issue with a bit of brute force(fingers crossed, this is just day 1) ... wanted to share what worked for me in case it is helpful for anyone else.

I wrote a small script that basically:

• disables bluetooth using rfkill
• unloads various bluetooth modules
• sleeps a bit
• starts bluetooth using rfkill

I posted more details in the Github Repository in case anyone is interested.

Hope this helps!

Tom.G
I have had the same issue on one of my laptops: Suddenly Bluetooth stopped working (and the device list had no Bluetooth device in it). I plugged in a dongle and the device list found a Bluetooth interface - but somehow the software for the defective internal Bluetooth and the working dongle got all mixed up. The result was a connection that worked for a couple of seconds and then died again - repeatedly.

I have found no easy fix for that problem.

bumbledore
Try running the script I posted above, without plugging in the dongle

I think you might have a newer dongle, which I believe only has support in kernel 5.16+.

Since you mentioned inbuilt used to work, try using that with blueman, and run my script with a sleep time of 60 (instructions/examples/installer in repo)

Gold Member
Wanted to update that it's been quite some time since I have last faced this problem. I don't restart my laptop often, but even if I do, the Bluetooth module is properly loaded by Ubuntu. I don't know how this was fixed, but most probably it existed for some time, and then got fixed after some system update.

Mentor
Yeah, I’ve had a similar situation once where ubuntu broke a video driver in an update and I had to resort to an earlier boot on my Asus.

After 3 more updates and about 6 months later, it got fixed miraculously. I tried to file a report with them but it never made it to their to be fixed list.

Its great that your issue got fixed. I still have one with my wireless mouse not working. It used a dongle but the system has refused to work with it. I gave up and can’t wait to upgrade my hardware to resolve it.

Staff Emeritus
It is common to trash Microsoft in online conversations, but Linux has it's own problems. Most of us here on PF are tech savvy, but most of us are also Aunt Millies in some situations. Here is Linus Torvald discussing the problem.