operating-system: Bluetooth no longer working on VirtualBox after upgrade
Describe the issue you are experiencing
While running Homeassistant OS 7.6 on VirtualBox, Bluetooth works (bluetoothctl shows the controller). After upgrading to 8.1, Bluetooth stops working: “No default controller available” Downgraded again, works, upgraded: stops working.
What operating system image do you use?
ova (for Virtual Machines)
What version of Home Assistant Operating System is installed?
8.1
Did you upgrade the Operating System.
Yes
Steps to reproduce the issue
- Install the OVA image on a VirtualBox machine
- Note: version installed 7.6
- Add to yaml configuration
device_tracker:
- platform: bluetooth_tracker
- Connect to the VM, hit ‘login’ and run
bluetoothctl scan onThe cli returns the controller and relevant information - Upgrade to 8.1 and restart
- Notice the issue
- Additionally you can repeat step 4:
"No default controller availableNote: none are displayed
Anything in the Supervisor logs that might be useful for us?
A warning:
22-05-21 11:59:51 WARNING (MainThread) [supervisor.host.network] Requested to update interface enp0s3 which does not exist or is disabled.
Anything in the Host logs that might be useful for us?
[ 0.194225] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[ 0.194386] PCI host bridge to bus 0000:00
...
[ 2.606952] usb usb1-port2: Cannot enable. Maybe the USB cable is bad?
..
System Health information
Home Assistant Core 2022.5.5
Home Assistant Supervisor 2022.05.2
Home Assistant OS 8.1
Kernel version 5.15.41
Agent version 1.2.1
Path to configuration.yaml: /config
[...]
Frontend version: 20220504.1 - latest
<html>
<body>
| Version | core-2022.5.5 |
|---|---|
| Installation Type | Home Assistant OS |
| Development | false |
| Supervisor | true |
| Docker | true |
| User | root |
| Virtual Environment | false |
| Python Version | 3.9.9 |
| Operating System Family | Linux |
| Operating System Version | 5.15.41 |
| CPU Architecture | x86_64 |
| Timezone | Europe/Bucharest |
| Host Operating System | Home Assistant OS 8.1 |
|---|---|
| Update Channel | stable |
| Supervisor Version | supervisor-2022.05.2 |
| Docker Version | 20.10.14 |
| Disk Total | 30.8 GB |
| Disk Used | 3.3 GB |
| Healthy | true |
| Supported | true |
| Board | ova |
| Supervisor API | ok |
| Version API | ok |
| Installed Add-ons | File editor (5.3.3), Samba share (9.6.1), Terminal & SSH (9.4.0), Git pull (7.13.1), Google Assistant SDK (2.5.0) |
| Dashboards | 2 |
|---|---|
| Resources | 0 |
| Views | 1 |
| Mode | storage |
Card: Gigabyte Intel Wireless-AC 9260 2x2 802.11AC Dual-Band WiFi+ Bluetooth
Other logs:
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 167, in perform_bluetooth_update
friendly_name = await hass.async_add_executor_job(lookup_name, mac)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 127, in lookup_name
return bluetooth.lookup_name(mac, timeout=5) # type: ignore[no-any-return]
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 61, in lookup_name
sock = _gethcisock ()
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 291, in _gethcisock
raise BluetoothError ("error accessing bluetooth device")
bluetooth.btcommon.BluetoothError: error accessing bluetooth device
2022-05-21 12:02:29 ERROR (SyncWorker_4) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-05-21 12:02:29 ERROR (MainThread) [homeassistant.components.bluetooth_tracker.device_tracker] Error looking up Bluetooth device
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 289, in _gethcisock
sock = _bt.hci_open_dev (device_id)
_bluetooth.error: no available bluetoot devices
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 167, in perform_bluetooth_update
friendly_name = await hass.async_add_executor_job(lookup_name, mac)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 127, in lookup_name
return bluetooth.lookup_name(mac, timeout=5) # type: ignore[no-any-return]
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 61, in lookup_name
sock = _gethcisock ()
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 291, in _gethcisock
raise BluetoothError ("error accessing bluetooth device")
bluetooth.btcommon.BluetoothError: error accessing bluetooth device
2022-05-21 12:02:34 WARNING (MainThread) [homeassistant.components.sensor] Updating mitemp_bt sensor took longer than the scheduled update interval 0:00:30
2022-05-21 12:02:35 WARNING (SyncWorker_3) [homeassistant.components.mitemp_bt.sensor] Polling error Exit read_ble, no data (<Thread(SyncWorker_3, started 140258255567664)>)
2022-05-21 12:02:41 ERROR (SyncWorker_5) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-05-21 12:02:41 ERROR (MainThread) [homeassistant.components.bluetooth_tracker.device_tracker] Error looking up Bluetooth device
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 289, in _gethcisock
sock = _bt.hci_open_dev (device_id)
_bluetooth.error: no available bluetoot devices
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 167, in perform_bluetooth_update
friendly_name = await hass.async_add_executor_job(lookup_name, mac)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 127, in lookup_name
return bluetooth.lookup_name(mac, timeout=5) # type: ignore[no-any-return]
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 61, in lookup_name
sock = _gethcisock ()
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 291, in _gethcisock
raise BluetoothError ("error accessing bluetooth device")
bluetooth.btcommon.BluetoothError: error accessing bluetooth device
2022-05-21 12:02:53 ERROR (SyncWorker_2) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-05-21 12:02:53 ERROR (MainThread) [homeassistant.components.bluetooth_tracker.device_tracker] Error looking up Bluetooth device
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 289, in _gethcisock
sock = _bt.hci_open_dev (device_id)
_bluetooth.error: no available bluetoot devices
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 167, in perform_bluetooth_update
friendly_name = await hass.async_add_executor_job(lookup_name, mac)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 127, in lookup_name
return bluetooth.lookup_name(mac, timeout=5) # type: ignore[no-any-return]
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 61, in lookup_name
sock = _gethcisock ()
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 291, in _gethcisock
raise BluetoothError ("error accessing bluetooth device")
bluetooth.btcommon.BluetoothError: error accessing bluetooth device
2022-05-21 12:03:04 WARNING (SyncWorker_6) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor 58:2D:34:3A:86:79
2022-05-21 12:03:04 WARNING (SyncWorker_4) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor 58:2D:34:3A:86:79
2022-05-21 12:03:05 ERROR (SyncWorker_0) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-05-21 12:03:05 ERROR (MainThread) [homeassistant.components.bluetooth_tracker.device_tracker] Error looking up Bluetooth device
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 289, in _gethcisock
sock = _bt.hci_open_dev (device_id)
_bluetooth.error: no available bluetoot devices
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 167, in perform_bluetooth_update
friendly_name = await hass.async_add_executor_job(lookup_name, mac)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 127, in lookup_name
return bluetooth.lookup_name(mac, timeout=5) # type: ignore[no-any-return]
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 61, in lookup_name
sock = _gethcisock ()
File "/usr/local/lib/python3.9/site-packages/bluetooth/bluez.py", line 291, in _gethcisock
raise BluetoothError ("error accessing bluetooth device")
bluetooth.btcommon.BluetoothError: error accessing bluetooth device
2022-05-21 12:03:14 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.mitemp_bt_battery is taking over 10 seconds
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 27 (4 by maintainers)
I am having the same problem with KVM on a NUC. The host OS is Ubuntu 22.04, and can see the Bluetooth controller. I’ve exported the Bluetooth controller (USB ID
8087:0a2b) to the guest HAOS.bluetoothctl devicessaysNo default controller available.Here’s the output of
journalctl | grep -i bluein the guest OS:Hm, that sounds like there is an issue with forwarding the USB device. It sounds like with Linux 5.15 something broke OS forwarding. I am not aware of any driver changes which could have caused that.
What Host OS do you use? Do you use the VirtualBox Extension Pack?
Can you attach the full host logs (
dmesg) of 7.6 and 8.1?I also tried fixing this by throwing money at it and it did the trick for me. I purchased an ASUS USB-BT500, disabled the onboard Intel Wireless Bluetooth from Control Panel and restarted the PC. Windows 10 picked up the drivers right away, Home Assistant also displayed a new button “setup Bluetooth” (or something like this) on the integrations page and them Bluetooth devices started to show up. Sumup:
I still suspect the iwlwifi drivers are to blame.
Confirmed Intel Wireless 9260 Bluetooth does not work on 8.0 and 8.1
Found this? https://bugzilla.kernel.org/show_bug.cgi?id=215167