Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth failing after upgrade to HAOS 10 on Intel Bluetooth hardware #2535

Closed
agners opened this issue May 4, 2023 · 61 comments
Closed

Bluetooth failing after upgrade to HAOS 10 on Intel Bluetooth hardware #2535

agners opened this issue May 4, 2023 · 61 comments
Labels
bluetooth board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) bug stable-kernel-regression Issue which appears to be an upstream stable kernel regression

Comments

@agners
Copy link
Member

agners commented May 4, 2023

Can you check the kernel log, to see if the problem starts similarly, e.g. using:

ha host logs -t kernel -n 1000000 -b 0 | grep Bluetooth | head -n 100

@agners This is the result of the command
Captura de pantalla 2023-05-03 220333

I don't know if this is related but In Home Assistant System>Logs> Host is full of messages like this:

May 03 20:09:04 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-799946efbb48db91e285d1e93f36945c7175e095d2a5a9fe838fde71f8e6ffdf-runc.jJmMvJ.mount: Deactivated successfully.
May 03 20:09:20 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-7aee883888a9e7d1b71b97ddbc2b231c2763cc47b14b2c728d6d0de7ab1c2e00-runc.RpO30d.mount: Deactivated successfully.
May 03 20:09:34 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-799946efbb48db91e285d1e93f36945c7175e095d2a5a9fe838fde71f8e6ffdf-runc.sMXYc7.mount: Deactivated successfully.
May 03 20:09:50 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-7aee883888a9e7d1b71b97ddbc2b231c2763cc47b14b2c728d6d0de7ab1c2e00-runc.QivMYX.mount: Deactivated successfully.
May 03 20:10:04 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-799946efbb48db91e285d1e93f36945c7175e095d2a5a9fe838fde71f8e6ffdf-runc.ypP5rP.mount: Deactivated successfully.
May 03 20:10:20 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-7aee883888a9e7d1b71b97ddbc2b231c2763cc47b14b2c728d6d0de7ab1c2e00-runc.r9dWM5.mount: Deactivated successfully.

Originally posted by @SrBurner in #2485 (comment)

@samcrang
Copy link

samcrang commented May 4, 2023

Before:

[core-ssh ~]$ ha os info
board: ova
boot: B
data_disk: QEMU-HARDDISK-QM00001
update_available: true
version: "9.5"
version_latest: "10.1"
[core-ssh ~]$ ha host logs -t kernel -n 1000000 -b 0 | grep Bluetooth
May 02 17:31:08 homeassistant kernel: Bluetooth: Core ver 2.22
May 02 17:31:08 homeassistant kernel: Bluetooth: HCI device and connection manager initialized
May 02 17:31:08 homeassistant kernel: Bluetooth: HCI socket layer initialized
May 02 17:31:08 homeassistant kernel: Bluetooth: L2CAP socket layer initialized
May 02 17:31:08 homeassistant kernel: Bluetooth: SCO socket layer initialized
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Bootloader revision 0.4 build 0 week 30 2018
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Device revision is 2
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Secure boot is enabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: OTP lock is enabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: API lock is enabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Debug lock is disabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Minimum firmware build 1 week 10 2014
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Found device firmware: intel/ibt-19-0-4.sfi
May 02 17:31:10 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 02 17:31:10 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast
May 02 17:31:10 homeassistant kernel: Bluetooth: BNEP socket layer initialized
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Waiting for firmware download to complete
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Firmware loaded in 6840573 usecs
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Waiting for device to boot
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Device booted in 18008 usecs
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-19-0-4.ddc
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Applying Intel DDC parameters completed
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Firmware revision 0.4 build 20 week 28 2022
May 02 17:31:23 homeassistant kernel: Bluetooth: RFCOMM TTY layer initialized
May 02 17:31:23 homeassistant kernel: Bluetooth: RFCOMM socket layer initialized
May 02 17:31:23 homeassistant kernel: Bluetooth: RFCOMM ver 1.11

Immediately after updating (same as before I guess because the host hasn't restarted?):

[core-ssh ~]$ ha os info
board: ova
boot: A
data_disk: QEMU-HARDDISK-QM00001
update_available: false
version: "10.1"
version_latest: "10.1"
[core-ssh ~]$ ha host logs -t kernel -n 1000000 -b 0 | grep -i luetooth
May 02 17:31:08 homeassistant kernel: Bluetooth: Core ver 2.22
May 02 17:31:08 homeassistant kernel: NET: Registered PF_BLUETOOTH protocol family
May 02 17:31:08 homeassistant kernel: Bluetooth: HCI device and connection manager initialized
May 02 17:31:08 homeassistant kernel: Bluetooth: HCI socket layer initialized
May 02 17:31:08 homeassistant kernel: Bluetooth: L2CAP socket layer initialized
May 02 17:31:08 homeassistant kernel: Bluetooth: SCO socket layer initialized
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Bootloader revision 0.4 build 0 week 30 2018
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Device revision is 2
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Secure boot is enabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: OTP lock is enabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: API lock is enabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Debug lock is disabled
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Minimum firmware build 1 week 10 2014
May 02 17:31:09 homeassistant kernel: Bluetooth: hci0: Found device firmware: intel/ibt-19-0-4.sfi
May 02 17:31:10 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 02 17:31:10 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast
May 02 17:31:10 homeassistant kernel: Bluetooth: BNEP socket layer initialized
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Waiting for firmware download to complete
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Firmware loaded in 6840573 usecs
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Waiting for device to boot
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Device booted in 18008 usecs
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-19-0-4.ddc
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Applying Intel DDC parameters completed
May 02 17:31:16 homeassistant kernel: Bluetooth: hci0: Firmware revision 0.4 build 20 week 28 2022
May 02 17:31:23 homeassistant kernel: Bluetooth: RFCOMM TTY layer initialized
May 02 17:31:23 homeassistant kernel: Bluetooth: RFCOMM socket layer initialized
May 02 17:31:23 homeassistant kernel: Bluetooth: RFCOMM ver 1.11

After poweroff, unplugging, leaving for a bit and powering on again:

[core-ssh ~]$ ha os info
board: ova
boot: A
data_disk: QEMU-HARDDISK-QM00001
update_available: false
version: "10.1"
version_latest: "10.1"
[core-ssh ~]$ ha host logs -t kernel -n 1000000 -b 0 | grep -i luetooth
May 04 13:49:13 homeassistant kernel: Bluetooth: Core ver 2.22
May 04 13:49:13 homeassistant kernel: NET: Registered PF_BLUETOOTH protocol family
May 04 13:49:13 homeassistant kernel: Bluetooth: HCI device and connection manager initialized
May 04 13:49:13 homeassistant kernel: Bluetooth: HCI socket layer initialized
May 04 13:49:13 homeassistant kernel: Bluetooth: L2CAP socket layer initialized
May 04 13:49:13 homeassistant kernel: Bluetooth: SCO socket layer initialized
May 04 13:49:13 homeassistant kernel: Bluetooth: hci0: Found device firmware: intel/ibt-19-0-4.sfi
May 04 13:49:13 homeassistant kernel: Bluetooth: hci0: Boot Address: 0x24800
May 04 13:49:13 homeassistant kernel: Bluetooth: hci0: Firmware Version: 106-39.22
May 04 13:49:13 homeassistant kernel: Bluetooth: hci0: FW download error recovery failed (-19)
May 04 13:49:14 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 04 13:49:14 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast
May 04 13:49:14 homeassistant kernel: Bluetooth: BNEP socket layer initialized

@piechade
Copy link

piechade commented May 4, 2023

After boot is everything working for me and i have a clean log like on 9.5. But after some time, it will stop working.
I need to wait when it's stopping to work, for now it's running for 16 minutes. About 20 minutes and it's stopped working and there is nothing different in the log.

➜  ~ ha os info
board: generic-x86-64
boot: A
data_disk: Samsung-SSD-970-EVO-Plus-250GB-S4EUNM0T220383E
update_available: false
version: "10.1"
version_latest: "10.1"
➜  ~ ha host logs -t kernel -n 1000000 -b 0 | grep -i Bluetooth
May 04 13:46:57 homeassistant kernel: Bluetooth: Core ver 2.22
May 04 13:46:57 homeassistant kernel: NET: Registered PF_BLUETOOTH protocol family
May 04 13:46:57 homeassistant kernel: Bluetooth: HCI device and connection manager initialized
May 04 13:46:57 homeassistant kernel: Bluetooth: HCI socket layer initialized
May 04 13:46:57 homeassistant kernel: Bluetooth: L2CAP socket layer initialized
May 04 13:46:57 homeassistant kernel: Bluetooth: SCO socket layer initialized
May 04 13:46:58 homeassistant kernel: Bluetooth: hci0: CSR: Setting up dongle with HCI ver=6 rev=22bb; LMP ver=6 subver=22bb; manufacturer=10
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Bootloader revision 0.0 build 0 week 30 2018
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Device revision is 2
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Secure boot is enabled
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: OTP lock is enabled
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: API lock is enabled
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Debug lock is disabled
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Minimum firmware build 1 week 10 2014
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Found device firmware: intel/ibt-19-0-0.sfi
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Boot Address: 0x24800
May 04 13:46:58 homeassistant kernel: Bluetooth: hci1: Firmware Version: 106-39.22
May 04 13:47:00 homeassistant kernel: Bluetooth: hci1: Waiting for firmware download to complete
May 04 13:47:00 homeassistant kernel: Bluetooth: hci1: Firmware loaded in 1593254 usecs
May 04 13:47:00 homeassistant kernel: Bluetooth: hci1: Waiting for device to boot
May 04 13:47:00 homeassistant kernel: Bluetooth: hci1: Device booted in 14619 usecs
May 04 13:47:00 homeassistant kernel: Bluetooth: hci1: Found Intel DDC parameters: intel/ibt-19-0-0.ddc
May 04 13:47:00 homeassistant kernel: Bluetooth: hci1: Applying Intel DDC parameters completed
May 04 13:47:00 homeassistant kernel: Bluetooth: hci1: Firmware revision 0.0 build 106 week 39 2022
May 04 13:47:00 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 04 13:47:00 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast
May 04 13:47:00 homeassistant kernel: Bluetooth: BNEP socket layer initialized
May 04 13:47:00 homeassistant kernel: Bluetooth: MGMT ver 1.22
May 04 13:47:00 homeassistant kernel: Bluetooth: MGMT ver 1.22
May 04 13:47:15 homeassistant kernel: Bluetooth: RFCOMM TTY layer initialized
May 04 13:47:15 homeassistant kernel: Bluetooth: RFCOMM socket layer initialized
May 04 13:47:15 homeassistant kernel: Bluetooth: RFCOMM ver 1.11

@samcrang
Copy link

samcrang commented May 4, 2023

FWIW, it doesn't appear to consistently break on boot. Sometimes it's fine, Bluetooth works for a bit, then stops working entirely:

[core-ssh ~]$ ha os info
board: ova
boot: A
data_disk: QEMU-HARDDISK-QM00001
update_available: false
version: "10.1"
version_latest: "10.1"
[core-ssh ~]$ ha host logs -t kernel -n 1000000 -b 0 | grep -i luetooth
May 04 14:23:04 homeassistant kernel: Bluetooth: Core ver 2.22
May 04 14:23:04 homeassistant kernel: NET: Registered PF_BLUETOOTH protocol family
May 04 14:23:04 homeassistant kernel: Bluetooth: HCI device and connection manager initialized
May 04 14:23:04 homeassistant kernel: Bluetooth: HCI socket layer initialized
May 04 14:23:04 homeassistant kernel: Bluetooth: L2CAP socket layer initialized
May 04 14:23:04 homeassistant kernel: Bluetooth: SCO socket layer initialized
May 04 14:23:04 homeassistant kernel: Bluetooth: hci0: Found device firmware: intel/ibt-19-0-4.sfi
May 04 14:23:04 homeassistant kernel: Bluetooth: hci0: Boot Address: 0x24800
May 04 14:23:04 homeassistant kernel: Bluetooth: hci0: Firmware Version: 106-39.22
May 04 14:23:04 homeassistant kernel: Bluetooth: hci0: Firmware already loaded
May 04 14:23:06 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 04 14:23:06 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast
May 04 14:23:06 homeassistant kernel: Bluetooth: BNEP socket layer initialized
May 04 14:23:06 homeassistant kernel: Bluetooth: MGMT ver 1.22
May 04 14:23:16 homeassistant kernel: Bluetooth: RFCOMM TTY layer initialized
May 04 14:23:16 homeassistant kernel: Bluetooth: RFCOMM socket layer initialized
May 04 14:23:16 homeassistant kernel: Bluetooth: RFCOMM ver 1.11

(I edited the above logs because I think I c&p'd the wrong thing)

@SrBurner
Copy link

SrBurner commented May 4, 2023

As suggested in the other thread I’m downgrading to OS 9.5 via command Terminal (ha os update --version 9.5)
I Will report If all is working as intended again!
Thanks for the work @agners

@samcrang
Copy link

samcrang commented May 4, 2023

Just seen this appear in my logs, I've not seen it before, don't know if it's a red-herring:

...
May 04 14:14:17 homeassistant kernel: Bluetooth: hci0: Opcode 0x200e failed: -16
May 04 14:14:21 homeassistant kernel: Bluetooth: hci0: ACL packet for unknown connection handle 3587

and

...
May 04 14:23:53 homeassistant kernel: Bluetooth: hci0: Opcode 0x200e failed: -16
May 04 14:24:32 homeassistant kernel: Bluetooth: hci0: Opcode 0x200e failed: -16

@SrBurner
Copy link

SrBurner commented May 4, 2023

As suggested in the other thread I’m downgrading to OS 9.5 via command Terminal (ha os update --version 9.5)
I Will report If all is working as intended again!
Thanks for the work @agners

Downgrade done with success and all devices are detected and working as intended. At the moment no issues detected on OS 9.5

@piechade
Copy link

piechade commented May 4, 2023

As suggested in the other thread I’m downgrading to OS 9.5 via command Terminal (ha os update --version 9.5)
I Will report If all is working as intended again!
Thanks for the work @agners

Downgrade done with success and all devices are detected and working as intended. At the moment no issues detected on OS 9.5

Same on my side.

@d-d
Copy link

d-d commented May 7, 2023

Fails for me on HAOS 10 as well. H/W Intel NUC.

~ ha host logs -t kernel -n 1000000 -b 0 | grep Bluetooth | head -n 100
May 07 19:58:14 homeassistant kernel: Bluetooth: Core ver 2.22
May 07 19:58:14 homeassistant kernel: Bluetooth: HCI device and connection manager initialized
May 07 19:58:14 homeassistant kernel: Bluetooth: HCI socket layer initialized
May 07 19:58:14 homeassistant kernel: Bluetooth: L2CAP socket layer initialized
May 07 19:58:14 homeassistant kernel: Bluetooth: SCO socket layer initialized
May 07 19:58:16 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 07 19:58:16 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast
May 07 19:58:16 homeassistant kernel: Bluetooth: BNEP socket layer initialized
May 07 19:58:16 homeassistant kernel: Bluetooth: hci0: command 0xfc05 tx timeout
May 07 19:58:16 homeassistant kernel: Bluetooth: hci0: Reading Intel version command failed (-110)

The tx timeout is also mentioned in kernel bug https://bugzilla.kernel.org/show_bug.cgi?id=215167

@mariusnauj
Copy link

mariusnauj commented May 10, 2023

I have INTEL NUC, and I have problem with bluetooth too with HAOS 10.

image

@agners
Copy link
Member Author

agners commented May 10, 2023

Fails for me on HAOS 10 as well. H/W Intel NUC.
[..]
The tx timeout is also mentioned in kernel bug https://bugzilla.kernel.org/show_bug.cgi?id=215167

@d-d your case seems to be a bit different as there are errors. The one I see (and others too I think) doesn't show anything in the logs.

The error you linked mentions the problem appears on Linux 5.15 as well.

Did your hardware work reliably with HAOS 9.5?

@yildiraymeric
Copy link

I also have same problem with HAOS v10.1 on Intel(R) Atom(TM) x5-Z8500 system. I've downgraded to 9.5 and everything is working fine in BT side.

@agners
Copy link
Member Author

agners commented May 10, 2023

@yildiraymeric can you check the logs using

ha host logs -t kernel -n 1000000 -b 0 | grep Bluetooth | head -n 100

@loedeman
Copy link

I also experience Bluetooth issues on two Intel NUC installations with internal Bluetooth. Both NUC 10.

As a workaround I created an automation which reloads the Bluetooth integration when a couple of sensors (to prevent empty batteries reloading Bluetooth constantly) report unavailable. I also have made an automation for my SwitchBot bot which reloads the Bluetooth integration before toggling the actual bot.

@basjes1977
Copy link

basjes1977 commented May 11, 2023

same issue here.
Hardware intel nuc with onboard bluetooth: Intel Corp. AX200 Bluetooth.
For now reverted to 9.6

@garytube
Copy link

Intel NUC Kit NUC6i7KYK Intel i7-6770HQ
Home Assistant 2023.5.2
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest

No config changes
Bluetooth onboard which is working

@joyfie
Copy link

joyfie commented May 16, 2023

Just instal HAOS bare metal on a mini pc using Intel Wireless-AC 3165 - Can't even get the OS to recognise there is a bluetooth device connected

May 16 22:41:40 homeassistant kernel: Bluetooth: Core ver 2.22                                                                                                                                                                                                                                                                       
May 16 22:41:40 homeassistant kernel: Bluetooth: HCI device and connection manager initialized                                                                                                                                                                                                                                       
May 16 22:41:40 homeassistant kernel: Bluetooth: HCI socket layer initialized                                                                                                                                                                                                                                                        
May 16 22:41:40 homeassistant kernel: Bluetooth: L2CAP socket layer initialized                                                                                                                                                                                                                                                      
May 16 22:41:40 homeassistant kernel: Bluetooth: SCO socket layer initialized                                                                                                                                                                                                                                                        
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: Bootloader revision 0.3 build 0 week 30 2018                                                                                                                                                                                                                                  
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: Device revision is 2                                                                                                                                                                                                                                                          
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: Secure boot is enabled                                                                                                                                                                                                                                                        
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: OTP lock is enabled                                                                                                                                                                                                                                                           
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: API lock is enabled                                                                                                                                                                                                                                                           
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: Debug lock is disabled                                                                                                                                                                                                                                                        
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: Minimum firmware build 1 week 10 2014                                                                                                                                                                                                                                         
May 16 22:41:40 homeassistant kernel: Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-19-0-3.sfi (-2)                                                                                                                                                                                                                  
May 16 22:41:54 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3                                                                                                                                                                                                                                                   
May 16 22:41:54 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast                                                                                                                                                                                                                                                    
May 16 22:41:54 homeassistant kernel: Bluetooth: BNEP socket layer initialized

@mariusnauj
Copy link

mariusnauj commented May 25, 2023

The problem still not solved, bluetooth device restoring connection after couple of hours. But it working not good with HAOS 10.

image
image

@DorjeDorf
Copy link

I recently bought one of the certified bluetooth dongles (the Sabrent BT-UB40).
It worked for a couple hours on 10.1, then stopped working. Only a full power cycle brings it back for a while, then it stops working again.

Weird thing is that a roll back to 9.5 does not fix the problem - both for the onboard and the Sabrent.

Minisforum GK41 with onboard bluetooth and Sabrent BT-UB40
Home Assistant 2023.5.4
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3

@osaether
Copy link

I tried 10.2 today and it still does not work. Specifically my Inkbird IBS-TH2 sensors are unavailable. Rolling back to 9.5 and everything is working again.

@jaegerschnitzel
Copy link

I tried 10.2 today and it still does not work. Specifically my Inkbird IBS-TH2 sensors are unavailable. Rolling back to 9.5 and everything is working again.

Same for me on my NUC11 (RNUC11PAHi50000).

@Sorien
Copy link

Sorien commented Jun 24, 2023

@agners I'd to ask if you are trying to make that change upstream to the kernel, I know that it's not a problem for HAOS anymore but there are many HA running on different distributions affected by this bug.

@contactcr
Copy link

So far, yes. The locks are very responsive and seem to work all the time with no drop outs. I guess I'll break it one more time for the cause!

@contactcr
Copy link

I opened a new bug in OS

I didn't see much in Host logs though. Do I need to enable some more advanced logging?

@j-pas
Copy link

j-pas commented Jun 25, 2023

I can confirm some issues remain on (at least) NUC it seems. I have a NUC 10, have 2 different bluetooth devices both with simultaneous connection issues at random moments and random duration.. See below screenshot for example.

HAOS 9.5 -> 10.1 (issues began)
HOAS 10.1 -> 9.5 (issues gone, all works fine)
HAOS 9.5 -> 10.3 (issues are back)

Has another ticket been opened somewhere for this? (Edit: Sorry, misread your previous comment. There has, i`ll join you there) Happy to provide more input if needed.

image

@agners
Copy link
Member Author

agners commented Jun 26, 2023

@agners I'd to ask if you are trying to make that change upstream to the kernel, I know that it's not a problem for HAOS anymore but there are many HA running on different distributions affected by this bug.

I've brought it up on the Bluetooth Linux kernel mailing list, see:
https://lore.kernel.org/linux-bluetooth/0de3f0d0d5eb6d83cfc8d90cbb2b1ba1@agner.ch/T/#mb0d04fdaf6fb2484e69b4aba93f052a3e7ecb206

However, no progress so far.

On what OS do you observe the issue?

@j-pas
Copy link

j-pas commented Jun 26, 2023

I run Proxmox 7.4-3 on my Intel Nuc. Proxmox is shipped on top of Debian (version 11).
Within Proxmox I run Homeassistant in a VM based on the HAOS iso, currently upgraded to version 10.3.
As I pass the Bleutooth hardware (which is the onboard hardware but essentially a USB Device) from the host NUC to the VM running HAOS, I'm not sure how much of a role the underlaying Debian distro plays... but I'm not an expert on this.

Executed on the NUC (debian):
root@nuc:~ uname -a
Linux nuc 5.15.107-2-pve #1 SMP PVE 5.15.107-2 (2023-05-10T09:10Z) x86_64 GNU/Linux
root@nuc:~ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian

@SrBurner
Copy link

Several days without any issue, so fixed for me!, thanks a lot @agners

@Sorien
Copy link

Sorien commented Jul 3, 2023

@agners I'd to ask if you are trying to make that change upstream to the kernel, I know that it's not a problem for HAOS anymore but there are many HA running on different distributions affected by this bug.

I've brought it up on the Bluetooth Linux kernel mailing list, see: https://lore.kernel.org/linux-bluetooth/0de3f0d0d5eb6d83cfc8d90cbb2b1ba1@agner.ch/T/#mb0d04fdaf6fb2484e69b4aba93f052a3e7ecb206

However, no progress so far.

On what OS do you observe the issue?

my home assistant server is also HTPC it's a small Asus pn52 box running Ubuntu 22.04 after upgrading to 23.04 I see the same problem with BLE connection dropouts

@yannpub
Copy link

yannpub commented Jul 3, 2023

I upgraded my Supervised installation from Debian 11 to Debian 12, and now facing the same issue with my Intel bluetooth adapter. Definitely something to do with kernel 6.1 I would say.

@Sorien
Copy link

Sorien commented Sep 6, 2023

@yannpub as I see proper fix was merged to linux-next so when I get it right Linux kernel 6.6 should be working again for us ...

@bjornarfjelldal
Copy link

Hi, @Sorien! Does this mean it will be fixed in the next (or any upcoming) HASS OS release? I see 10.5 currently uses 6.1.45..?

@Sorien
Copy link

Sorien commented Oct 2, 2023

@bjornarfjelldal HAOS is patching kernel so it should be fixed with any version newer than Aug 30.

@agners
Copy link
Member Author

agners commented Oct 13, 2023

@yannpub @Sorien I've noticed that the Bluetooth fix Bluetooth: hci_sync: Fix handling of HCI_QUIRK_STRICT_DUPLICATE_FILTER is listed in the Linux 6.1.57 changelog. So the fix should trickle into distribution Linux kernel updates soon.

@agners
Copy link
Member Author

agners commented Oct 13, 2023

Note that with HAOS 11.0 the Bluetooth: hci_sync: Fix handling of HCI_QUIRK_STRICT_DUPLICATE_FILTER is part of HAOS as well (instead of the work around via revert).

@bjornarfjelldal
Copy link

Hi! I really appreciate your efforts in trying to resolve bluetooth in HAOS 11.0, since it has been especially buggy and variable over the past year. However, after updating from 10.5 to 11.0 (on an Intel NUC using Proxmox) bluetooth seemingly has become even worse than before. I have tried to delete the BT integration, toggle passive scanning on and off and physically reboot host. Running "bluetoothctl" in terminal addon produced a lof devices logs, but doesn't help much on stability.

The console reports "Bluetooth: hci0 opcode 0x200e failed -16".

Anything I should try to do - or logs I should provide?
Skjermbilde 2023-10-15 kl  12 17 50

@j-pas
Copy link

j-pas commented Oct 15, 2023

Hi all,

I am also running HAOS 11.0 on Intel NUC (NUC10i3FNH2) using Proxmox and so far (16 hour) so good !

I must admit that it was running ok-ish on 10.x with only 2 or 3 short bluetooth gaps per day.
It was far worse some weeks ago (see my earlier post) but I found a procedure somewhere online that I tried. Not sure anymore if that was the solution but @bjornarfjelldal you can give this a try:
Shut down the physical machine (NUC) and unplug power for 10 min. After that restore power and boot.
Although I dont like solutions in this direction I tried it anyway and I think this is what made it run more stable for some weeks now...

Let us know how that worked!

Edit: some days later it turns out I still experience a +- daily disconnect for some hours so for me HAOS 11.0 (and later 11.1) did not fix the issue...

@Sorien
Copy link

Sorien commented Oct 29, 2023

I updated my HTPC to Ubuntu 23.10 and kernel 6.5.7 and I can confirm Bluetooth devices are working again

@Stooovie
Copy link

This STARTED happening after upgrading HA OS to 11.2. I haven't had a single BT failure since installing the machine a year ago.

@dkebler
Copy link

dkebler commented Dec 24, 2023

seems Same issue for me.
See here

#3020

can we get a kernel upgrade instead of downgrading the os?

I have other new hardware and only kernel 6.6 fixes issues.

note kernel 6.1 is way behind current LTS of 6.6
https://www.kernel.org/releases.html

# hostnamectl
 Static hostname: homeassistant-temp
       Icon name: computer-embedded
         Chassis: embedded
      Deployment: production
      Machine ID: 0cbc5da55f7e4ed896892f015eaa1f4a
         Boot ID: c7ebe79e35f044e2a71a09c9ff8d8e55
Operating System: Home Assistant OS 11.2
     CPE OS Name: cpe:2.3:o:home-assistant:haos:11.2:*:production:*:*:*:generic-x86-64:*
          Kernel: Linux 6.1.63-haos
    Architecture: x86-64
 Hardware Vendor: ATOPNUC
  Hardware Model: ATOPNUC AG40
Firmware Version: GB3B 0.04

@dkebler
Copy link

dkebler commented Dec 24, 2023

home-assistant/core#92379 (comment)

Kernel 6.6 is now LTS. I have lots of hardware bought in the last few months that have issue with various subsystems with anything less that 6.6. Now that 6.6 is LTS hassos should be upgraded (maybe a major upgrade).

#3020 (comment)

# ha host logs -t kernel -n 1000000 -b 0 | grep Bluetooth | head -n 100
Dec 24 01:39:20 homeassistant kernel: Bluetooth: Core ver 2.22
Dec 24 01:39:20 homeassistant kernel: Bluetooth: HCI device and connection manager initialized
Dec 24 01:39:20 homeassistant kernel: Bluetooth: HCI socket layer initialized
Dec 24 01:39:20 homeassistant kernel: Bluetooth: L2CAP socket layer initialized
Dec 24 01:39:20 homeassistant kernel: Bluetooth: SCO socket layer initialized
Dec 24 01:39:35 homeassistant kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Dec 24 01:39:35 homeassistant kernel: Bluetooth: BNEP filters: protocol multicast
Dec 24 01:39:35 homeassistant kernel: Bluetooth: BNEP socket layer initialized
Dec 24 01:39:35 homeassistant kernel: Bluetooth: MGMT ver 1.22
Dec 24 01:39:14 homeassistant kernel: Bluetooth: RFCOMM TTY layer initialized
Dec 24 01:39:14 homeassistant kernel: Bluetooth: RFCOMM socket layer initialized
Dec 24 01:39:14 homeassistant kernel: Bluetooth: RFCOMM ver 1.11
Dec 24 01:43:30 homeassistant kernel: Bluetooth: hci0: unexpected event for opcode 0x2005
Dec 24 01:43:41 homeassistant kernel: Bluetooth: hci0: unexpected event for opcode 0x2005

@agners
Copy link
Member Author

agners commented Dec 26, 2023

@dkebler

note kernel 6.1 is way behind current LTS of 6.6

6.1 was the last LTS, and 6.6 was announced a couple weeks ago, not sure if I would label that as "way behind".

But, yes, upgrading to 6.6 LTS is on our todo list. A PR with patches rebased and validated on all supported platforms is of course very welcome 😉

@angainor
Copy link

FYI, I have just installed HA OS version 12.0rc1. The RPi controller has connected without the passive mode, and my device has been reporting without issues for a few hours now. 🤞

@danijel-bjelancevic
Copy link

danijel-bjelancevic commented Nov 8, 2024

I still have this issue. Just installed Uniraid on my Asus NUC and running HA through a VM on Uniraid. When I try to pass the Intel Chip through as an USB I get this in the HA logs:

image

Any other known solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bluetooth board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) bug stable-kernel-regression Issue which appears to be an upstream stable kernel regression
Projects
None yet
Development

No branches or pull requests