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
# /lib/systemd/system/hciuart.service
[Unit]
Description=Configure Bluetooth Modems connected by UART
ConditionFileNotEmpty=/proc/device-tree/soc/gpio@7e200000/bt_pins/brcm,pins
After=dev-serial1.device

[Service]
Type=forking
ExecStart=/usr/bin/btuart

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/hciuart.service.d/override.conf
[Unit]
Requires=dev-serial1.device      <---- fix of this problem


----
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.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-raspi2 in Ubuntu.
https://bugs.launchpad.net/bugs/1929791

Title:
  Bluetooth does not start if system boots from USB

Status in linux-raspi2 package in Ubuntu:
  Confirmed

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/system/hciuart.service; enabled; vendor 
prese>
       Active: failed (Result: exit-code) since Thu 2021-05-27 08:22:57 EEST; 
3mi>
      Process: 599 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE)

  тра 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/brcm/BCM434>
  тра 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?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1929791/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to