To sum up my problem, I was trying to connect my airpods as headphones to my computer but my computer does not even detect my airpods as a device to connect to. Switching ControllerMode to either "Dual", "le" or "bredr" in /etc/bluetooth/main.conf did not help solving the problem.
I started to look at forums, entered a few commands to get info and got the following outputs with errors at the last lines Bluetooth: hci0: ... :
@latitude5400:~$ uname -a; lspci -nnk | grep -iA3 net; lsusb; dmesg | grep -i bluetooth; dmesg | grep -i firmware; lsmod | grep bluetooth
Linux latitude5400 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
00:14.3 Network controller [0280]: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 30)
DeviceName: Onboard - Ethernet
Subsystem: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:4030]
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
--
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (6) I219-V [8086:15be] (rev 30)
DeviceName: Onboard - Ethernet
Subsystem: Dell Ethernet Connection (6) I219-V [1028:08b8]
Kernel driver in use: e1000e
Kernel modules: e1000e
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0bda:5539 Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 003: ID 8087:0aaa Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[87364.768825] Bluetooth: hci0: Ignoring error of Inquiry Cancel command
[88846.069775] Bluetooth: hci0: failed to restart LE scan: status 31
[88846.073726] Bluetooth: hci0: command 0x2042 tx timeout
[89326.411054] Bluetooth: hci0: Ignoring error of Inquiry Cancel command
bluetooth 548864 37 btrtl,btintel,btbcm,bnep,btusb,rfcomm
ecdh_generic 16384 2 bluetooth
@latitude5400:~$ sudo service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-09-17 10:42:11 CEST; 30min ago
Docs: man:bluetoothd(8)
Main PID: 17114 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 18923)
Memory: 2.4M
CGroup: /system.slice/bluetooth.service
└─17114 /usr/lib/bluetooth/bluetoothd
sept. 17 10:42:11 latitude5400 systemd[1]: Started Bluetooth service.
sept. 17 10:42:11 latitude5400 bluetoothd[17114]: Starting SDP server
sept. 17 10:42:11 latitude5400 bluetoothd[17114]: Bluetooth management interface 1.14 initialized
sept. 17 10:42:11 latitude5400 bluetoothd[17114]: Endpoint registered: sender=:1.69 path=/MediaEndpoint/A2DPSink/sbc
sept. 17 10:42:11 latitude5400 bluetoothd[17114]: Endpoint registered: sender=:1.69 path=/MediaEndpoint/A2DPSource/sbc
sept. 17 10:42:20 latitude5400 bluetoothd[17114]: SET_CONFIGURATION request rejected: Configuration not supported (41)
sept. 17 10:48:32 latitude5400 bluetoothd[17114]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
sept. 17 10:48:33 latitude5400 bluetoothd[17114]: connect error: Connection refused (111)
sept. 17 10:48:33 latitude5400 bluetoothd[17114]: a2dp-source profile connect failed for 4C:1D:96:E2:43:47: Device or resource busy
sept. 17 10:48:35 latitude5400 bluetoothd[17114]: connect error: Connection refused (111)
@latitude5400:~$ dpkg -l |grep blue
ii blueman 2.1.2-1ubuntu0.2 amd64 Graphical bluetooth manager
ii bluez 5.53-0ubuntu3.3 amd64 Bluetooth tools and daemons
ii bluez-btsco 1:0.50-0ubuntu7 amd64 Bluez Bluetooth SCO tool
ii bluez-cups 5.53-0ubuntu3.3 amd64 Bluetooth printer driver for CUPS
ii bluez-dbg 5.53-0ubuntu3.3 amd64 Bluetooth tools and daemons (with debugging symbols)
ii bluez-hcidump 5.53-0ubuntu3.3 amd64 Analyses Bluetooth HCI packets
ii bluez-obexd 5.53-0ubuntu3.3 amd64 bluez obex daemon
ii bluez-tests 5.53-0ubuntu3.3 amd64 BlueZ test tools and scripts
ii bluez-tools 2.0~20170911.0.7cb788c-2build1 amd64 Set of tools to manage Bluetooth devices for linux
ii gir1.2-gnomebluetooth-1.0:amd64 3.34.3-0ubuntu1 amd64 Introspection data for GnomeBluetooth
ii gnome-bluetooth 3.34.3-0ubuntu1 amd64 GNOME Bluetooth tools
ii libbluetooth3:amd64 5.53-0ubuntu3.3 amd64 Library to use the BlueZ Linux Bluetooth stack
ii libbluetooth3-dbg 5.53-0ubuntu3.3 amd64 Library to use the BlueZ Linux Bluetooth stack with debugging symbols
ii libgnome-bluetooth13:amd64 3.34.3-0ubuntu1 amd64 GNOME Bluetooth tools - support library
ii pulseaudio-module-bluetooth 1:13.99.1-1ubuntu3.11 amd64 Bluetooth module for PulseAudio sound server
and finally
@latitude5400:~$ rfkill list all
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: dell-wifi: Wireless LAN
Soft blocked: no
Hard blocked: no
2: dell-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
3: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
.
As additional information, I can connect to other devices (such as an Iphone or speakers) and use them properly. My end goal is connecting my earpods, but any information about where could the problem comes from, if there is compatibility issue between my kernel and my bluetooth device or anything would be very useful.
Additional info about my system config:
System: Ubuntu 20.04.3 LTS - 64 bits
GNOME version: 3.36.8
Kernel version: 5.4.0-81-generic
Thank you in advance for your help.