Bluetooth does not start if system boots from USB
This bug report will be marked for expiration in 45 days if no further activity occurs. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-raspi2 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
pi-bluetooth (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Hello! I have a strange bug with Bluetooth on Raspberry Pi 4 8Gb and Ubuntu 21.04 (also had it on Ubuntu 20.10). It's internal Bluetooth adapder does not initialize, if I boot system from USB, wherein does not matter what I am using: 16 Gb USB Flash Drive, 2 Tb External USB HDD or 1 Tb External SSD. After system boot up, it shows me "no Bluetooth adapters found", hcidev also shows nothing. I'm getting hciuart.service error:
===================
taras@taras-rpi:~$ systemctl status hciuart.service
● hciuart.service - Configure Bluetooth Modems connected by UART
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Thu 2021-05-27 08:22:57 EEST; 3mi>
Process: 599 ExecStart=
тра 27 08:22:46 taras-rpi systemd[1]: Starting Configure Bluetooth Modems conne>
тра 27 08:22:57 taras-rpi btuart[631]: Initialization timed out.
тра 27 08:22:57 taras-rpi btuart[631]: bcm43xx_init
тра 27 08:22:57 taras-rpi btuart[631]: Flash firmware /lib/firmware/
тра 27 08:22:57 taras-rpi btuart[631]: Set Controller UART speed to 3000000 bit>
тра 27 08:22:57 taras-rpi systemd[1]: hciuart.service: Control process exited, >
тра 27 08:22:57 taras-rpi systemd[1]: hciuart.service: Failed with result 'exit>
тра 27 08:22:57 taras-rpi systemd[1]: Failed to start Configure Bluetooth Modem>
===================
But if I continue reboot system, it may appear in 1-2 cases from 10. It'v very strange.
If I disable this service manually via:
===================
sudo systemctl disable hciuart.service
===================
restart the system and run:
===================
sudo systemctl start hciuart.service
===================
Bluetooth adapter will appear in 100% cases. And if I boot Ubuntu from microSD card, everything works properly, Bluetooth starts all times. I thought, mb here is not enougth power for USB devices. I've bought USB hub with external power, but it does not help.
Must say, that I don't have this problem on Raspberry Pi OS, I have it on USB HDD too and it works without any problems.
Any suggestions?
description: | updated |
Changed in linux-raspi2 (Ubuntu): | |
status: | Confirmed → Invalid |
I got the same bug.
If hciuart.service was started before /dev/serial1 is created, it fails.
Fixed by adding systemd override with "Requires" directive:
# systemctl cat hciuart system/ hciuart. service Configure Bluetooth Modems connected by UART tEmpty= /proc/device- tree/soc/ gpio@7e200000/ bt_pins/ brcm,pins serial1. device
# /lib/systemd/
[Unit]
Description=
ConditionFileNo
After=dev-
[Service] /usr/bin/ btuart
Type=forking
ExecStart=
[Install] multi-user. target
WantedBy=
# /etc/systemd/ system/ hciuart. service. d/override. conf dev-serial1. device <---- fix of this problem
[Unit]
Requires=
----
Here's what documentation says:
After=: The units listed in this directive will be started before starting the current unit. This does not imply a dependency relationship and one must be established through the above directives if this is required.
Requires=: This directive lists any units upon which this unit essentially depends. If the current unit is activated, the units listed here must successfully activate as well, else this unit will fail. These units are started in parallel with the current unit by default.