Skip to Content

Vérifications de base

# Bluetooth service status systemctl status bluetooth # Bluetooth adapter information (hciconfig is deprecated; use bluetoothctl/btmgmt) bluetoothctl show bluetoothctl list # List all adapters # RF switch status rfkill list bluetooth

Si Bluetooth est désactivé :

sudo rfkill unblock bluetooth sudo systemctl restart bluetooth

Utiliser Bluetoothctl

sudo bluetoothctl

Commandes courantes :

power on # Turn on Bluetooth agent on # Enable agent default-agent # Set as default agent scan on # Scan for devices devices # List discovered devices pair XX:XX:XX:XX:XX # Pair trust XX:XX:XX:XX:XX # Trust device connect XX:XX:XX:XX:XX # Connect info XX:XX:XX:XX:XX # View device info remove XX:XX:XX:XX:XX # Remove device quit # Exit

Problèmes courants

Impossible de découvrir les appareils

# Confirm the Bluetooth adapter is powered on bluetoothctl power on # Rescan sudo bluetoothctl scan on

Si les périphériques ne sont toujours pas trouvés, vérifiez le journal du noyau :

sudo dmesg | grep -i bluetooth sudo dmesg | grep -i "hci\|btusb"

Échec du couplage

  1. Supprimez l’enregistrement d’appairage précédent et effectuez l’appairage à nouveau :
sudo bluetoothctl remove XX:XX:XX:XX:XX:XX scan on pair XX:XX:XX:XX:XX:XX
  1. Certains appareils nécessitent la saisie d’un code PIN, généralement 0000 ou 1234.

  2. Videz le cache Bluetooth :

sudo rm -rf /var/lib/bluetooth/* sudo systemctl restart bluetooth

Couplé mais impossible de se connecter

# Trust the device first sudo bluetoothctl trust XX:XX:XX:XX:XX:XX connect XX:XX:XX:XX:XX:XX

Si vous obtenez « Échec de la connexion : org.bluez.Error.Failed » :

# Restart the Bluetooth stack sudo systemctl restart bluetooth sudo modprobe -r btusb && sudo modprobe btusb

Déconnexions fréquentes après connexion

# View Bluetooth logs journalctl -u bluetooth -f # Disable Bluetooth power management sudo nano /etc/bluetooth/main.conf

Ajoutez ou modifiez dans la section [Policy] :

[Policy] AutoEnable=true [General] FastConnectable=true

Redémarrez le service :

sudo systemctl restart bluetooth

Mauvaise qualité audio du casque Bluetooth

Les casques Bluetooth peuvent utiliser le protocole SCO/HSP (mode appel) au lieu d’A2DP (audio de haute qualité).

# Check the current audio protocol wpctl status # Switch to A2DP in PipeWire # In GNOME Sound settings, select the output profile as "High Fidelity Playback (A2DP Sink)"

Latence clavier/souris Bluetooth

hcitool est obsolète ; les paramètres de connexion sont désormais négociés automatiquement par le noyau et BlueZ. Pour résoudre les problèmes de latence, confirmez d’abord la connexion avec bluetoothctl info XX:XX:XX:XX:XX:XX, puis inspectez/gérez l’adaptateur avec btmgmt :

# View adapter info and current connections btmgmt info btmgmt con # List current connections

Mise à niveau de BlueZ

Ubuntu 26.04 est livré avec la pile Bluetooth BlueZ. Vérifiez la version :

bluetoothd --version

Si vous rencontrez des problèmes de compatibilité, installez une version plus récente (si disponible) :

sudo apt update sudo apt install --only-upgrade bluez

Adaptateurs USB Bluetooth

Si le Bluetooth intégré pose problème, vous pouvez utiliser un adaptateur Bluetooth USB :

# Confirm detection lsusb | grep -i bluetooth # Load driver sudo modprobe btusb # If there are multiple adapters, list and choose which one to use bluetoothctl list # List all adapters and their MACs bluetoothctl select XX:XX:XX:XX:XX:XX # Select a specific adapter bluetoothctl power on # Power on that adapter

Débogage du journal Bluetooth

# Enable verbose logging sudo nano /etc/systemd/system/bluetooth.service.d/override.conf
[Service] ExecStart= ExecStart=/usr/libexec/bluetooth/bluetoothd -d
sudo systemctl daemon-reload sudo systemctl restart bluetooth journalctl -u bluetooth -f