Bluetooth malfunctioning in Ubuntu 20.04 laptop

In summary, the problem is that the audio on the Bluetooth earphones stopped working suddenly. On trying to change the audio device, the Settings app froze. The steps that were tried to fix the problem included turning on and off the Bluetooth, connecting and failing to connect to the earphones, and searching for solutions online.
  • #1
Wrichik Basu
Science Advisor
Insights Author
Gold Member
2,116
2,691
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.​

1619530621018.png

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.
 
Computer science news on Phys.org
  • #3
jedishrfu said:
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.
 
  • #4
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.
 
  • Like
Likes Wrichik Basu
  • #6
No wonder it didn't work. Is your Bluetooth on the mother board? and expansion board? a dongle?
 
  • #7
anorlunda said:
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.
 
  • #8
Could this be related to the tingling sensation due to grounding issues? maybe the bluetooth circuit got fried by a static charge or something.
 
  • Sad
Likes Wrichik Basu
  • #9
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.
 
  • #10
Another thought is it heat telated where it works at startup but fails when the board gets too hot
 
  • #11
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
  • loads the modules it unloaded
  • starts bluetooth using rfkill

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

Hope this helps!
 
  • Informative
Likes Tom.G
  • #12
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.
 
  • #13
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)
 
  • #14
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.
 
  • #15
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.
 
  • #16
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.

 

1. What is causing my Bluetooth to malfunction on my Ubuntu 20.04 laptop?

There could be several reasons for Bluetooth malfunctioning on your Ubuntu 20.04 laptop. Some common causes include outdated drivers, interference from other devices, or a hardware issue.

2. How can I check if my Bluetooth drivers are up to date on Ubuntu 20.04?

To check if your Bluetooth drivers are up to date, you can open the Terminal and use the command "sudo apt update" to update all packages, including Bluetooth drivers. You can also check for updates in the Software & Updates application.

3. How can I troubleshoot Bluetooth connectivity issues on Ubuntu 20.04?

First, try restarting your laptop and the devices you are trying to connect to. You can also try resetting the Bluetooth service by using the command "sudo service bluetooth restart" in the Terminal. If the issue persists, you may need to reinstall the Bluetooth drivers or seek further assistance.

4. Can I use a USB Bluetooth adapter on my Ubuntu 20.04 laptop?

Yes, you can use a USB Bluetooth adapter on your Ubuntu 20.04 laptop. However, make sure to check if the adapter is compatible with Linux and if it requires any additional drivers to function properly.

5. How can I prevent Bluetooth interference on my Ubuntu 20.04 laptop?

To prevent Bluetooth interference, try moving your laptop and other devices away from any potential sources of interference, such as wireless routers or microwave ovens. You can also try changing the Wi-Fi channel or disabling Wi-Fi altogether while using Bluetooth. Additionally, make sure to keep your Bluetooth drivers up to date to minimize any potential conflicts.

Similar threads

  • Computing and Technology
Replies
1
Views
7K
Back
Top