Can't connect Bluetooth devices after reboot - Ubuntu 20.10 on Raspberry Pi 4

Bug #1901272 reported by Daniel
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Won't Fix
Undecided
Unassigned
Groovy
Won't Fix
Undecided
Unassigned
linux-raspi (Ubuntu)
Won't Fix
Undecided
Unassigned
Groovy
Won't Fix
Undecided
Unassigned
pi-bluetooth (Ubuntu)
Won't Fix
Undecided
Dave Jones
Groovy
Won't Fix
Undecided
Dave Jones

Bug Description

Raspberry pi 4 4Gb ram
Ubuntu desktop 20.10 64 bit
After reboot no Bluetooth devices connect, scanning Bluetooth devices works, results with same device name (duplicated and with not set up status).
Sometimes after several reboots it works.
If I use power off and cycle power then it works fine each time.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1901272/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Daniel (tulpina)
affects: ubuntu → bluez (Ubuntu)
Daniel (tulpina)
summary: - Inconsistent Bluetooth behavior on reboot 20.10 on rpi4
+ Can't connect Bluetooth devices after reboot - Ubuntu 20.10 on Raspberry
+ Pi 4
Daniel (tulpina)
affects: bluez (Ubuntu) → pi-bluetooth (Ubuntu)
tags: added: groovy
tags: added: raspi
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bluez (Ubuntu):
status: New → Confirmed
Changed in linux-raspi2 (Ubuntu):
status: New → Confirmed
Changed in pi-bluetooth (Ubuntu):
status: New → Confirmed
tags: added: rls-gg-incoming
Juerg Haefliger (juergh)
affects: linux-raspi2 (Ubuntu) → linux-raspi (Ubuntu)
Changed in pi-bluetooth (Ubuntu):
assignee: nobody → Dave Jones (waveform)
Changed in pi-bluetooth (Ubuntu Groovy):
assignee: nobody → Dave Jones (waveform)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Is there any work needed on bluez or linux there?

tags: removed: rls-gg-incoming
Changed in bluez (Ubuntu):
status: Confirmed → Incomplete
Changed in bluez (Ubuntu Groovy):
status: New → Incomplete
Changed in linux-raspi (Ubuntu):
status: Confirmed → Incomplete
Changed in linux-raspi (Ubuntu Groovy):
status: New → Incomplete
Revision history for this message
Dave Jones (waveform) wrote :

@Daniel could you try out the bluez package from the following PPA: https://launchpad.net/~waveform/+archive/ubuntu/pi-bluetooth/+packages ?

Should be as simple as doing:

  sudo add-apt-repository ppa:waveform/pi-bluetooth
  sudo apt update
  sudo apt upgrade

The version in that PPA contains the pi foundation's patches to bluez which were necessary to enable bluetooth on the pi400 (LP: #1903048), but they also alter some of the general initialization of the bluetooth module on all pis (amongst other things). A (slightly tidied up) variant of this is currently intended for hirsute, to be SRU'd to groovy and focal, so I'd be interested to hear if it also fixes this issue.

Revision history for this message
Daniel (tulpina) wrote :

First of all, this bug is so unpredictable, it's hard to replicate "on demand". It was happening when I power off device and back on and after restart it works, so it's not only what I said in description.
@Dave yes I installed your ppa and after that no device associated before were present in gnome Bluetooth setting. Pairing again first was failing but after some retries and a restart it's ok. Now I wait to see if bug is coming back but another annoying thing happened.
Two devices I use, one is Mi Silent Mouse and another is Microsoft Bluetooth Keyboard. Now after ppa the keyboard disconnect after only few seconds and it has very hard time connecting back when I press any key. With old blues it disconnect after many minutes, so it was tolerable.
After all both devices are by 4.0 LE and should not disconnect or should connect instantly with buffered keys pressed.

Revision history for this message
Arpad Jordan (jordana) wrote :

I face a similar issue that I posted on ubuntu forum:

https://ubuntuforums.org/showthread.php?t=2452881

PPA solves my issue and interestingly changes the Bluetooth controller address

Revision history for this message
Wayne Schroeder (razathorn) wrote :

I also just installed on a pi 4 and had the same issue -- devices worked but would not persist across reboots, and then successive re-adds were... strange, unreliable, etc. Lots of "it appears to work but doesn't." Tried the PPA packages and it worked at first, but was seriously inconsistent at adding and removing devices. I downgraded the PPA packages back to originals and still couldn't reliably add devices. I re-upgraded to PPA packages and the bluetooth was essentially working less than ever. Since it felt like a software issue, like configurations and "sessions" were being munged, I killed BT, searched around and wiped out /var/lib/bluetooth/* (which appeared to have multiple base addresses???) and then I was able to clean out gnome's ui and re-add and things now persist across reboots.

To me, this seems like the PPA fixes the issue, but the original packages created a state where there were multiple stale / conflicting states in /var/lib/bluetooth that you must disabled bt, clean, then re-enable / reboot and things work. It almost feels like the original packages had the BT adapter changing addresses each boot or similar.

Revision history for this message
Wayne Schroeder (razathorn) wrote :

Additionally, I've noted that I really need to disable/re-enable bluetooth to re-associate with the same device that I've unpaired, even with PPA. My BT mouse is usable, but significantly more laggy than the same mouse used via it's 2.4ghz usb, and I use this same model mouse in BT with win10 and linux on other machines with great results. Not sure this isn't a more general issue though, but figured I'd mention it, even if it is somewhat off-topic for this bug report.

Revision history for this message
Wayne Schroeder (razathorn) wrote :

Further potentially useful information about the behavior after PPA install: If you remove a device via the ui, it leaves a ghosted version that may or may not be able to reconnect if the device tries to. You must remove this ghosted device (two removes in total) and then it appears to allow a fresh pair that works perfectly. No actual need to restart bluetooth. I tried raspberry pi os (debian port) and this mouse works perfectly and is very snappy / perfect in bluetooth mode, just like with the USB receiver. No amount of hcitool and other tricks (kernel min interval changes) for mouse speed really resolve the issue (nor did it tend to accept the changes I tried). To me, it feels that the poll speed is too high as it does the thing that a usb mouse will do if the poll speed is too high: rubber banding and cursor dances when it finally catches up. It's usable, but sub-optimal. For now, I'm sticking with USB for usability but am around to try things on the BT side.

Revision history for this message
Brian Murray (brian-murray) wrote :

The Groovy Gorilla has reached end of life, so this bug will not be fixed for that release

Changed in bluez (Ubuntu Groovy):
status: Incomplete → Won't Fix
Changed in linux-raspi (Ubuntu Groovy):
status: Incomplete → Won't Fix
Changed in pi-bluetooth (Ubuntu Groovy):
status: New → Won't Fix
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 20.10 (groovy) reached end-of-life on July 22, 2021.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in.

Changed in bluez (Ubuntu):
status: Incomplete → Won't Fix
Changed in linux-raspi (Ubuntu):
status: Incomplete → Won't Fix
Changed in pi-bluetooth (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.