Bluetooth sometimes doesn't work after I started the computer

I have the problem, that sometimes the bluetooth isn't working correctly. When I look in the corner where the bluetooth is, it is shown as off and stays off, no matter whether I click on turn on or off. Restarting bluetooth in the terminal doesn't help. So far only rebooting the computer helps, but I wonder whether there's any option to have bluetooth working more smoothly.
Also wondering whether it is possible that it recognizes the bluetooth devices instantly, because I use a bluetooth mouse and keyboard.
My computer is an iMac (21.5-inch, Late 2015), iMac 16,1. Mouse and keyboard I use is from apple.
At the moment I also use my Wacom tablet instead of a mouse, when the bluetooth isn't turned on. And for keyboard I use a mac keyboard which can be connected through a cable too. (It's bluetooth too. But when using the charging cable on the computer it is recognized.)
One issue is maybe also that the same keyboard and mouse is connected to the MacOS, and I feel like them switching around isn't so good for recognizing when to connect to what device. (But sure this is just a secondary issue on why maybe those devices won't be recognized immediately when I start the computer and bluetooth is working.)

Anyone any idea what I can do, to have bluetooth working when the computer is started?
And also how I can get devices recognized instantly, so that I don't have to plug in any cabled devices?

Can you please post the terminal output of

sudo lshw -c network

Do you have these packages installed:

sudo apt install bluez-utils blueman

You can restart the service without logging out or rebooting:

sudo /etc/init.d/bluetooth restart


  *-network                 
       description: Wireless interface
       product: BCM43602 802.11ac Wireless LAN SoC
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 01
       serial: 28:f0:76:68:bb:20
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.35.177.61 firmware=01-ea662a8c ip=192.168.178.65 latency=0 multicast=yes wireless=IEEE 802.11
       resources: irq:74 memory:b1400000-b1407fff memory:b1000000-b13fffff
  *-network
       description: Ethernet interface
       product: NetXtreme BCM57766 Gigabit Ethernet PCIe
       vendor: Broadcom Inc. and subsidiaries
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0f0
       version: 01
       serial: a8:60:b6:15:0f:8d
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi msix pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=5.13.0-41-generic firmware=57766a-v1.15 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:19 memory:b1500000-b150ffff memory:b1510000-b151ffff
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: surfshark_ipv6
       serial: ea:a4:66:9a:9a:2d
       capabilities: ethernet physical
       configuration: broadcast=yes driver=dummy driverversion=5.13.0-41-generic

Yes, I have blueman installed. Restarting doesn't change do anything when the computer started with no proper Bluetooth on. Only when I reboot it, it might start so that Bluetooth works.

Broadcom... why is it always Broadcom...
Let's start simply first and see if module prober can detect it:

sudo rmmod btusb

sudo modprobe btusb

Hmm I wrote the commands, but nothing really happened. No message or anything.
(Bluetooth is also right now not functionable. So can't turn it on or off. I could try again when the bluetooth works, when I restarted the computer.)

1 Like

Yes, let's try it that way. I am heading out to an appointment and will be late with any replies.

Ok tried that again. Nothing happened here either.
Bluetooth was working now though, although mouse had trouble to connect and got the error "Connection Failed: Input/output error" (I did removed it and paired newly, it was then shortly connected, but then disconnected and when trying again the same error came again.)

Can you please test if this will start the service when it is not working:

sudo /etc/init.d/bluetooth start

If that does...
then run

sudo systemctl enable bluetooth

reboot and test...

Tried that. When the bluetooth doesn't working, the comment
sudo /etc/init.d/bluetooth start didn't change anything.

Do you have bluez-hid2hci package installed?
http://manpages.ubuntu.com/manpages/trusty/man8/hid2hci.8.html
EDIT: Nevermind... This looks like last package was for Trusty...

Can you try the suggestion here:

by Nam Nguyen?

Ok I try that's written there. (Right now the bluetooth doesn't turn on.)

Let's start with systemctl | grep -i blue

  sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d6-1\x2d6:1.2-bluetooth-hci0.device                 loaded active plugged   /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.2/bluetooth/hci0                   
  sys-subsystem-bluetooth-devices-hci0.device                                                      loaded active plugged   /sys/subsystem/bluetooth/devices/hci0                                                  
  bluetooth.service                                                                                loaded active running   Bluetooth service                                                                      
  bluetooth.target                                                                                 loaded active active    Bluetooth
dmesg | grep -i blue
[    2.343772] usb 1-6: Product: Bluetooth USB Host Controller
[    2.351174] input: Broadcom Corp. Bluetooth USB Host Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:05AC:8294.0006/input/input13
[    2.408689] hid-generic 0003:05AC:8294.0006: input,hidraw4: USB HID v1.11 Keyboard [Broadcom Corp. Bluetooth USB Host Controller] on usb-0000:00:14.0-6/input0
[    2.412740] input: Broadcom Corp. Bluetooth USB Host Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:05AC:8294.0007/input/input14
[    2.412943] hid-generic 0003:05AC:8294.0007: input,hidraw5: USB HID v1.11 Mouse [Broadcom Corp. Bluetooth USB Host Controller] on usb-0000:00:14.0-6/input1
[   29.600805] Bluetooth: Core ver 2.22
[   29.600836] Bluetooth: HCI device and connection manager initialized
[   29.600839] Bluetooth: HCI socket layer initialized
[   29.600841] Bluetooth: L2CAP socket layer initialized
[   29.600846] Bluetooth: SCO socket layer initialized
[   32.692502] Bluetooth: hci0: command 0x0c03 tx timeout
[   40.788377] Bluetooth: hci0: BCM: Reset failed (-110)
[   42.612700] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   42.612703] Bluetooth: BNEP filters: protocol multicast
[   42.612707] Bluetooth: BNEP socket layer initialized

Oh I read Rested failed in one line. Is that worrisome?


lspci
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 6000 (rev 09)
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3)
00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3)
00:1c.4 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 (rev e3)
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03)
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03)
02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43602 802.11ac Wireless LAN SoC (rev 01)
03:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57766 Gigabit Ethernet PCIe (rev 01)
03:00.1 SD Host controller: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader (rev 01)
04:00.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013]
05:00.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013]
05:03.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013]
05:04.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013]
05:05.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013]
05:06.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt 2 Bridge [Falcon Ridge 4C 2013]
06:00.0 System peripheral: Intel Corporation DSL5520 Thunderbolt 2 NHI [Falcon Ridge 4C 2013]
 bluetoothctl
Agent registered

(Eh no idea what I should do here. I tried list, but it didn't do anything.)


rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no

Oh soft blocked? Is that maybe the problem? O.O

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 05ac:8294 Apple, Inc. Bluetooth USB Host Controller
Bus 001 Device 004: ID 05ac:8511 Apple, Inc. FaceTime HD Camera (Built-in)
Bus 001 Device 003: ID 05ac:0267 Apple, Inc. Magic Keyboard A1644
Bus 001 Device 002: ID 056a:00d4 Wacom Co., Ltd CTL-460 [Bamboo Pen (S)]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I will try other stuff there. (Just wanting post this for now.) But maybe here's already some information to work with. O.O Like where it says soft blocked, that's maybe an issue?

Ok tried this again, when the bluetooth now was working.

rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no

So ok, I think soft blocked was the problem. Now I would need to figure out how it can happen to be soft blocked.

(Ah I see there's the comment
sudo rfkill unblock bluetooth . I will try this next time, when I have the problem. So will report again, when it happens.)

1 Like

It may be a hint:
https://bbs.archlinux.org/viewtopic.php?id=247566

Try:

sudo -i

rfkill unblock bluetooth

systemctl enable bluetooth.service

systemctl start bluetooth.service

Or... do it in the next post that I hadn't seen yet while I was responding to the one above it... :stuck_out_tongue:

Ok, so computer started again with bluetooth not working and I tried the comments for unblock. But it didn't help. So had to restart.

Not to sure what to do. Whether it just has trouble with the inbuilt bluetooth in the Mac or what the issue is.

How should it be in general? I mean like when the computer starts would it connect automatically to the bluetooth devices? Because for now it doesn't do that for me, even when the bluetooth is working. This is problematic since I have a bluetooth mouse and keyboard. (But maybe it has trouble connecting right away, because it is also connected to the Mac OS. (But yeah since that isn't on when Linux is on, it should at least not have a conflict in that both OS want to connect to the bluetooth. But could be that once paired with one thing, the devices don't really like to connect to different devices all the time, no idea.)

Would be nice if that works. I mean alternatively I could think of getting a bluetooth connection thingie to connect in the USB port. Maybe it would be more comaptible with Linux. I would prefer using Bluetooth devices. Alternatively I need to get a wired keyboard and mouse. But I would prefer a less cabled environment, but sure would prefer cable over having trouble with bluetooth all the time.
(For now I used my other Mac keyboard which could be connected with cable. But I need that keyboard for my working computer. The other keyboard is with battery and thus has no USB connection. Instead of the mouse I used a Wacom tablet, so that I could at least navigate some.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.