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

Ubuntu app armor update causes Bluetooth sensors to stop working #117768

Open
hajo62 opened this issue May 20, 2024 · 11 comments
Open

Ubuntu app armor update causes Bluetooth sensors to stop working #117768

hajo62 opened this issue May 20, 2024 · 11 comments

Comments

@hajo62
Copy link

hajo62 commented May 20, 2024

The problem

My bluetooth sensors stopped working after the update to 2024.5.4.
At the same time, I have installed some ubuntu 22.04 system updates and did a reboot.
Have not changed something in the AppArmor area.

image

What version of Home Assistant Core has the issue?

2024.5.4

What was the last working version of Home Assistant Core?

2024.5.2

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Bluetooth

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bluetooth/

Diagnostics information

home-assistant_bluetooth_2024-05-20T06-47-45.111Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Posted as comment in release notes and was asked to open a issue.
Hope I added all information necessary.

on ubuntu:

lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 𝜋  ~ hciconfig
hci0:	Type: Primary  Bus: UART
	BD Address: DC:A6:32:CF:13:96  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING 
	RX bytes:2281 acl:0 sco:0 events:122 errors:0
	TX bytes:2597 acl:0 sco:0 commands:99 errors:0

I have exposed the dbus stuff in my docker-compose.yaml:

    volumes:
      # DIRECTORY HOLDING HOME ASSISTANT CONFIG files
      - /home/hajo/docker-volumes/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
      # Making the DBus socket available in the Docker container 
      # See: https://www.home-assistant.io/integrations/bluetooth
      - /run/dbus:/run/dbus:ro
@home-assistant
Copy link

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of bluetooth can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign bluetooth Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


bluetooth documentation
bluetooth source
(message by IssueLinks)

@bdraco
Copy link
Member

bdraco commented May 20, 2024

I fixed the exception not retrieved in Bluetooth-Devices/dbus-fast#281

The app armor settings aren't controlled by Home Assistant so that's something you'll have to fix on your local system.

@hajo62
Copy link
Author

hajo62 commented May 20, 2024

app armor settings ... so that's something you'll have to fix on your local system.

Of cause, but...
I have never actively installed or activated AppArmor nor have I consciously made changes.

@bdraco
Copy link
Member

bdraco commented May 20, 2024

#76392 (comment)

bdraco added a commit that referenced this issue May 20, 2024
related issue #117768 (note that this change will not fix it as its due to an app armor rule change on the system in question, but it will suppres the extra exception)

changelog: Bluetooth-Devices/dbus-fast@v2.21.2...v2.21.3
@bdraco bdraco mentioned this issue May 20, 2024
20 tasks
@erlapso
Copy link

erlapso commented May 21, 2024

Having the same issue, unclear how to address/fix it

EDIT: Actually I'm experiencing something different. Since the upgrade, my Home Assistant Yellow with Bluetooth does not seem to see the Bluetooth adapter anymore.
Screenshot 2024-05-21 at 12 24 58 PM

@erkr
Copy link

erkr commented May 21, 2024

I have the same issue on my pi3b rev 1.2. Disabled the Bluetooth integration for now

@jariloiskis
Copy link

I have same issue too just like another ones

@bdraco bdraco changed the title Bluetooth sensors stopped working after update to 2024.5.4 Ubuntu app armor update causes Bluetooth sensors to stop working May 22, 2024
@bdraco
Copy link
Member

bdraco commented May 23, 2024

might be related to home-assistant/supervisor#4839 but not sure

@erkr
Copy link

erkr commented May 24, 2024

Maybe it's related to haos 12.3

#117225

@hajo62
Copy link
Author

hajo62 commented May 24, 2024

Maybe it's related to haos 12.3

Hhm. At least I go with docker in ubuntu 22.04...

@hajo62
Copy link
Author

hajo62 commented Jun 1, 2024

Some more info: hcitool lescan called from inside the HA container as well as outside shows lots of devices including my MJ_HT_V1 device.

docker exec -it homeassistant /bin/sh


/config # hcitool -i hci0 leinfo  4C:65:A8:DD:FF:D3
Requesting information ...
	Handle: 64 (0x0040)
	LMP Version: 4.1 (0x7) LMP Subversion: 0x64
	Manufacturer: Nordic Semiconductor ASA (89)
	Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00

But the integration shows the same error status.

I have copied this docker-default to /etc/apparmor.d/docker-default and fired this command: aa-disable /etc/apparmor.d/docker-default

After this the integration shows no error anymore; but still no sensors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants