home-assistant / operating-system

:beginner: Home Assistant Operating System
Apache License 2.0
5.02k stars 982 forks source link

Bluetooth still unreliable after 10.3 upgrade #2612

Closed contactcr closed 8 months ago

contactcr commented 1 year ago

Describe the issue you are experiencing

On 9.5 my BLE Yale locks are speedy and seem to be reliable for long periods of time. 10.x had its own problems and I didnt stick with it long but 10.3 was supposed to fix bluetooth on intel NUC. Well, the locks are mostly staying connected by seem to still drop out or take 10-20 seconds to do things randomly. They will sometimes become unavailable still also.

What operating system image do you use?

generic-x86-64 (Generic UEFI capable x86-64 systems)

What version of Home Assistant Operating System is installed?

10.3

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

core logs have the errors core logs.txt

Anything in the Supervisor logs that might be useful for us?

nothing of relevance in supervisor

Anything in the Host logs that might be useful for us?

dont see much in host logs [host_2023-06-24T20-44-32.104Z.log](https://github.com/home-assistant/operating-system/files/11858260/host_2023-06-24T20-44-32.104Z.log)

System information

core-2023.6.2 on NUC12 i5

Additional information

No response

j-pas commented 1 year ago

I also have a NUC (I have Nuc 10), have 2 different bluetooth devices (air sensor and plant sensor) both with simultaneous connection issues at random moments and random duration.. See below screenshot for example.

I changed back and forth the HAOS version with below results: 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)

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. uname -a on the host machine (debian): Linux nuc 5.15.107-2-pve #1 SMP PVE 5.15.107-2 (2023-05-10T09:10Z) x86_64 GNU/Linux

Happy to provide any input if needed! image

jan-kuechler commented 1 year ago

I have similar problems, using a quite old RaspberryPI 2 and a FSC-BP119 bluetooth adapter. I'm connecting to bluetooth thermostats, and starting with 10.1 I experienced connection issues. After a while, the bluetooth adapter becomes fully unresponsive (connection doesn't back, even after days) and the only thing helping is either rebooting the Pi, or re-plugging the bluetooth stick. Upgrading to 10.2 and 10.3 didn't help, but since a week I've downgraded the system to 9.5 and do not have any bluetooth issues since.

megaz555 commented 1 year ago

Same issue for me. 10.3 was a lot better than 10.2 and 10.1, but it is still unreliable. I have Airthings BLE devices and they keep on getting disconnected. Forcing a reboot on the Intel NUC brings devices back online, then they go back to offline again in less than 24 hours.

Can't someone get this fixed? 3 major releases in, and we are still dealing with Bluetooth issues.

yannpub commented 1 year ago

I am not on HaOS, but suffering the same symptoms since I upgraded to the latest kernel in the new Debian. I used to restart HA several times a day, but I'm now running the following automation every 5 minutes as a workaround, as it only restarts the Bluetooth integration : https://github.com/home-assistant/core/issues/93036#issuecomment-1585774135

moroz-slavomir commented 1 year ago

Same issue here. I have multiple Switchbot devices. I upgraded to 10.3 after another issue confirmed that BLE is working for raspberry 4 with 10.3 version, but it's not a case for other boards? Bluetooth is unreliable and I wasn't able to really control my devices. After downgrade back to HAOS 9.5, everything works fine.

I have ODROID-C4 board with Belkin BLE adapter.

contactcr commented 1 year ago

Anyone want to try 10.4? I've reverted 3 times now so i'm going to let someone else do it.

DorjeDorf commented 1 year ago

I've had all my USB devices fail on 10.4. rolled back to 10.3 brought them back, so it's a hell no for me ;)

Lafunamor commented 1 year ago

For me on my Raspberry PI 3 bluetooth is still not reliable on 10.4. I have a bunch of Xiaomi temperature and humidity sensors and in passive scanning mode it will sometimes take many hours until it receives a BLE message from a sensor. With OS 9.5 it was rather reliably every 5-10 mins. I'm wondering if I should upgrade to a PI4 now that they are available again, as it seems that the devs are testing with those. Edit: I did revert mine back to 9.5 and almost immediately got updates from my BLE devices.

gradius-v commented 1 year ago

I'm wondering if I should upgrade to a PI4 now that they are available again

On my Pi4 Bluetooth is unusable since 10.x After a full reboot all seems fine. But after a few hours it becomes unresponsive. Sometimes it will successfully reset after a few minutes and work some more hours before it's completely dead.

megaz555 commented 1 year ago

Same issues as everyone else is having. Intel NUC, Bluetooth constantly fails since 10.0 release. Tried 10.4, still random disconnects. Going back to 9.5 fixes all the issues!

agners commented 1 year ago

When the problem is happening on HAOS 10.4, can you run the following command to get the kernel logs and share the kernel log file generated kerne log file?

dmesg > /config/kernel.log
agners commented 1 year ago

Also, can you share the exact Intel NUC models you are using?

ZTHawk commented 1 year ago

Maybe related to this #2142 I had to revert from 10.4 and 10.5 back to 10.3. I have an ASUS PN41 (chip: Intel Wireless AC 9560)

Lafunamor commented 1 year ago

@agners I'm running now on 10.5 and still see a signifikant drop in updates of my BLE devices. Here are my dmsessages: kernel.log I see a lot of [ 3699.380055] Bluetooth: hci0: Frame reassembly failed (-84) but those I see with 9.5 as well. One thing that might be new since 10.x are those messages (unfortunately, I son't have old logs to compare):

[ 7112.169823] Bluetooth: hci0: unexpected event 0x03 length: 3 < 11
[ 7868.105749] Bluetooth: hci0: Received unexpected HCI Event 0x00

Please let me know if there is anything else I can provide to help narrowing this down.

Lafunamor commented 1 year ago

To provide a bit more insights, here are two screenshots of the same sensor. First with OS version 9.5: HASOS-9 5

And this one with OS version 10.5: HASOS-10 5

While also OS version 9.5 has intermittent failures, it's clearly visible that the version 10.5 data is less granular. Basically the graphs should have a similar pattern with a spike that goes up immediately followed by a low spike.

bjornarfjelldal commented 1 year ago

Can confirm same bluetooth issues on Intel NUC 12th Gen with Proxmox 8 running latest Home Assistant (10.5 + 2022.8)

gcarrarom commented 1 year ago

Same running on RPI4B with onboard and dongle bluetooth adapter.

mcc05 commented 1 year ago

Similar issue here NUC running HASIO in VM with AC9560 Bluetooth chipset, works for a while, then starts throwing the errors below and eventually bluetooth becomes inoperable and VM needs restarting.

image

sairon commented 1 year ago

I think there are multiple issues getting mixed here, but anyway - if the Bluetooth adapter keeps being disconnected, please make sure the host OS isn't interfering anyhow with the USB device. In every case please share dmesg and lsusb output from HAOS, and if the host system is Linux as well, please do share the same from the host too.

If you're using devices that broadcast data over BLE advertisement beacons (no active connection is used for communication), it's also worth checking if toggling "Passive scans" option in the Bluetooth integration config makes some difference. I explicitly say toggling, because we already have some anecdotal evidence that disabling this option improved the situation for passive BT device too.

ZTHawk commented 1 year ago

anyone tested with OS 11 or 11.1?

j-pas commented 1 year ago

Yup, tested both HAOS 11 and 11.1 on top of Proxmox on an Intel Nuc 10 and unfortunately all bluetooth connections fail once or twice a day for some hours when using the onboard bluetooth chip. I switched to an external Bluetooth dongle which works flawless. (the onboard chip alwo worked flawless when using HAOS 9.x)

gcarrarom commented 1 year ago

I'd like to note that HAOS 11 made my dongle start failing as well. No onboard bluetooth on RPI4 or dongle working anymore.

contactcr commented 12 months ago

A user reported kernel 6.5.7 fixes this but i've seen that claim before I guess there is a lot of variation in people's configuration. How far behind in OS versions can I get before I start to see other problems I wonder.

gcarrarom commented 12 months ago

I guess my question is: is there a dongle that actually solves this issue and I don't have to think about it? Has anyone come across such a thing? I've tried 2 from the recommended list, but they fail as much as the onboard card from the PI4

bjornarfjelldal commented 12 months ago

I guess my question is: is there a dongle that actually solves this issue and I don't have to think about it? Has anyone come across such a thing? I've tried 2 from the recommended list, but they fail as much as the onboard card from the PI4

My solution was to disable all internal bluetooth as well as removing any dongles, and solely depend on ESPhome proxies

agners commented 11 months ago

A user reported https://github.com/home-assistant/operating-system/issues/2535#issuecomment-1784219788 but i've seen that claim before I guess there is a lot of variation in people's configuration.

We typically move to the next LTS Linux kernel in Q1.

How far behind in OS versions can I get before I start to see other problems I wonder.

From a ADR0015 perspective we guarantee support for 3 months, but in practice we hadn't have the case where we break a old OS version. Some features of newer Supervisor/Core might not work as expected (such as network storage) but generally very old versions work still fine. Even if you would get into unsupported state, you should be able to upgrade still. In worst case, you can make a full backup and restore that on a new installation.

github-actions[bot] commented 8 months ago

There hasn't been any activity on this issue recently. To keep our backlog manageable we have to clean old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant OS version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.