ubuntu-asahi icon indicating copy to clipboard operation
ubuntu-asahi copied to clipboard

Apple's keyboard and mouse do not work on iMac m1

Open felipereisdev opened this issue 1 year ago • 17 comments

Hello. I installed Ubuntu Asahi on my Imac M1 and the Apple mouse and keyboard do not appear to connect through Bluetooth. At Fedora Remix Asahi appears in Bluetooth and works perfectly.

felipereisdev avatar May 13 '24 11:05 felipereisdev

Hi @felipereisdev, is this a fresh installation? can you show us the output of apt list --installed | grep apple-arm?

tobhe avatar May 13 '24 12:05 tobhe

Hi @felipereisdev, is this a fresh installation? can you show us the output of apt list --installed | grep apple-arm?

Yes.

ubuntu@localhost:~$ apt list --installed | grep apple-arm

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-apple-arm-headers-6.6.0-1004/mantic,mantic,now 6.6.0-1004.4 all [installed,automatic] linux-apple-arm/mantic,mantic,now 6.6.0.1004.4 arm64 [installed,automatic] linux-headers-6.6.0-1004-apple-arm/mantic,mantic,now 6.6.0-1004.4 arm64 [installed,automatic] linux-headers-apple-arm/mantic,mantic,now 6.6.0.1004.4 arm64 [installed,automatic] linux-image-6.6.0-1004-apple-arm/mantic,mantic,now 6.6.0-1004.4 arm64 [installed,automatic] linux-image-apple-arm/mantic,mantic,now 6.6.0.1004.4 arm64 [installed,automatic] linux-modules-6.6.0-1004-apple-arm/mantic,mantic,now 6.6.0-1004.4 arm64 [installed,automatic] linux-modules-extra-6.6.0-1004-apple-arm/mantic,mantic,now 6.6.0-1004.4 arm64 [installed,automatic]

felipereisdev avatar May 13 '24 12:05 felipereisdev

You could try updating to 24.04 using do-release-upgrade -d. I think this might be a kernel bug that has been fixed in newer versions. 24.04 ships a 6.8 based kernel which might work better.

tobhe avatar May 14 '24 06:05 tobhe

You could try updating to 24.04 using do-release-upgrade -d. I think this might be a kernel bug that has been fixed in newer versions. 24.04 ships a 6.8 based kernel which might work better.

Thanks for your help. Unfortunately, the devices still do not appear in Bluetooth even after the update. Is there anything else I can do?

felipereisdev avatar May 14 '24 10:05 felipereisdev

Which Fedora Asahi Remix version was working? It sounds like F40, kernel 6.8.9-402 is having bluetooth issues with connecting to some bluetooth devices, but discovery is working. If you're using a previous version, there's possibly a regression in upstream.

john-cabaj avatar May 14 '24 11:05 john-cabaj

Can you try running lspci -vvv | grep -i bcm and share the output?

john-cabaj avatar May 14 '24 12:05 john-cabaj

Which Fedora Asahi Remix version was working? It sounds like F40, kernel 6.8.9-402 is having bluetooth issues with connecting to some bluetooth devices, but discovery is working. If you're using a previous version, there's possibly a regression in upstream.

I installed the latest version yesterday.

felipereisdev avatar May 14 '24 12:05 felipereisdev

Can you try running lspci -vvv | grep -i bcm and share the output?

ubuntu in ~ ➜ lspci -vvv | grep -i bcm 01:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4378 802.11ax Dual Band Wireless Network Adapter (rev 03) Subsystem: Apple Inc. BCM4378 802.11ax Dual Band Wireless Network Adapter Kernel driver in use: hci_bcm4377 Kernel modules: hci_bcm4377 02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57762 Gigabit Ethernet PCIe Subsystem: Broadcom Inc. and subsidiaries NetXtreme BCM57762 Gigabit Ethernet PCIe

felipereisdev avatar May 14 '24 12:05 felipereisdev

@felipereisdev - would you be able to give an updated kernel a try? If so, here's the steps:

  1. Download deb packages at https://drive.google.com/file/d/1sl56_i2qLbWUiU3qi3bj39WlT9GesibN/view?usp=sharing
  2. Extract deb packages tar -zxvf packages.tar.gz
  3. Navigate to directory containing deb packages cd packages/
  4. Install deb packages apt install ./linux*.deb
  5. Reboot

Let me know how that goes

john-cabaj avatar May 15 '24 12:05 john-cabaj

@felipereisdev - would you be able to give an updated kernel a try? If so, here's the steps:

1. Download deb packages at https://drive.google.com/file/d/1sl56_i2qLbWUiU3qi3bj39WlT9GesibN/view?usp=sharing

2. Extract deb packages `tar -zxvf packages.tar.gz`

3. Navigate to directory containing deb packages `cd packages/`

4. Install deb packages `apt install ./linux*.deb`

5. Reboot

Let me know how that goes

Hi. I did the process above and the problem persists.

Screenshot from 2024-05-16 14-49-33

Screenshot from 2024-05-16 14-52-39

The print below is from Fedora Asahi. In it appears the devices.

image

felipereisdev avatar May 16 '24 14:05 felipereisdev

@felipereisdev, I have some more debs to test here - https://drive.google.com/file/d/1xMj08xUBMm1NERe7ijJRPGP5bK0wBX6f/view?usp=sharing

It's also possible that the bluez version we're shipping was updated in Noble and there's a regression. The team is continuing to look into this.

john-cabaj avatar May 17 '24 13:05 john-cabaj

@felipereisdev, I have some more debs to test here - https://drive.google.com/file/d/1xMj08xUBMm1NERe7ijJRPGP5bK0wBX6f/view?usp=sharing

It's also possible that the bluez version we're shipping was updated in Noble and there's a regression. The team is continuing to look into this.

Thank you for your help. I tried that too and it didn't work. I am sending the installation log below:

Screenshot from 2024-05-17 13-37-57

felipereisdev avatar May 17 '24 13:05 felipereisdev

This might be related to CVE-2023-45866.

Please see comment 6 from https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/2045931 to test re-enabling classic bonding.

eslerm avatar May 19 '24 16:05 eslerm

Isso pode estar relacionado ao CVE-2023-45866.

Por favor, veja o comentário 6 de https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/2045931 para testar a ligação clássica re-ativante.

Hello. I updated ClassicBondedOnly for false and restarted Bluetooth and continues without the mouse and keyboard.

felipereisdev avatar May 20 '24 09:05 felipereisdev

An important observation that I forgot to mention. Maybe it's a gnome problem. Asahi Linux Fedora only displays the mouse and keyboard in KDE. In the Fedora gnome version it also does not work. @tobhe @john-cabaj @eslerm

felipereisdev avatar May 20 '24 13:05 felipereisdev

Thank you for testing Classic Bonding!

Good observation that Gnome might be affected. fwiw, I can see other bluetooth keyboards with the Ubuntu Asahi 24.04 gnome panel.

Could you try the bluetoothctl cli tool?

$ bluetoothctl 
Waiting to connect to bluetoothd...[bluetooth]# hci0 new_settings: powered bondable ssp br/edr le secure-conn 
[bluetooth]# Agent registered
[bluetooth]# [CHG] Controller C4:00:11:22:33:44 Pairable: yes
[bluetooth]# scan on
[...]
[bluetooth]# SetDiscoveryFilter success
[bluetooth]# Discovery started
[bluetooth]# [CHG] Controller C4:00:11:22:33:44 Discovering: yes
[bluetooth]# [NEW] Device  4F:FF:EE:DD:CC:BB Apple Keyboard
[...]
[bluetooth]# scan off
[bluetooth]# pair 4F:FF:EE:DD:CC:BB
[bluetooth]# connect 4F:FF:EE:DD:CC:BB

eslerm avatar May 21 '24 03:05 eslerm

Thank you for testing Classic Bonding!

Good observation that Gnome might be affected. fwiw, I can see other bluetooth keyboards with the Ubuntu Asahi 24.04 gnome panel.

Could you try the bluetoothctl cli tool?

$ bluetoothctl 
Waiting to connect to bluetoothd...[bluetooth]# hci0 new_settings: powered bondable ssp br/edr le secure-conn 
[bluetooth]# Agent registered
[bluetooth]# [CHG] Controller C4:00:11:22:33:44 Pairable: yes
[bluetooth]# scan on
[...]
[bluetooth]# SetDiscoveryFilter success
[bluetooth]# Discovery started
[bluetooth]# [CHG] Controller C4:00:11:22:33:44 Discovering: yes
[bluetooth]# [NEW] Device  4F:FF:EE:DD:CC:BB Apple Keyboard
[...]
[bluetooth]# scan off
[bluetooth]# pair 4F:FF:EE:DD:CC:BB
[bluetooth]# connect 4F:FF:EE:DD:CC:BB

It worked using bluetoothctl and with the help of another machine to identify the address of the mouse and keyboard.

Thanks.

felipereisdev avatar May 21 '24 14:05 felipereisdev