[bluetooth] connecté mais pas de son avec GDM [Résolu]

Applications, problèmes de configuration réseau
Cazuza
archer de cavalerie
Messages : 160
Inscription : jeu. 05 sept. 2013, 17:43

[bluetooth] connecté mais pas de son avec GDM [Résolu]

Message par Cazuza »

Bonjour,

Je n'ai jamais eu de problème à envoyer du son sur mon enceinte bluetooth mais depuis une semaine j'ai un petit souci. Je suis bien connecté au bluetooth mais mon enceinte n'apparaît pas dans les "périphériques d'entrée" de pulseaudio ni dans les cartes sons de alsa ("alsamixer"). L'enceinte marche bien quand elle est connectée à mon téléphone.

Je suis sous gnome 3.36 mais l'appli bluetooth de gnome n’étant pas top (souvent buguée) je trouve donc plus fiable de passer plutôt par blueman, une interface graphique pour bluez. J'ai bien sûr essayé de me connecter en suivant le wiki et en utilisant la commande bluetoothctl et ça se connecte sous problème là aussi.

Code : Tout sélectionner

$ yay -Qs bluetooth
local/blueman 2.1.2-1
    GTK+ Bluetooth Manager
local/bluez 5.54-1
    Daemons for the bluetooth protocol stack
local/bluez-libs 5.54-1
    Deprecated libraries for the bluetooth protocol stack
local/bluez-utils 5.54-1
    Development and debugging utilities for the bluetooth protocol stack
local/gnome-bluetooth 3.34.1-1
    The GNOME Bluetooth Subsystem
local/pulseaudio-bluetooth 13.0-3
    Bluetooth support for PulseAudio
local/qt5-connectivity 5.14.2-1 (qt qt5)
    Provides access to Bluetooth hardware
local/sbc 1.4-1
    Bluetooth Subband Codec (SBC) library

Code : Tout sélectionner

$ journalctl -b | grep bluetooth
Apr 17 20:47:28 kuluse bluetoothd[541]: Bluetooth daemon 5.54
Apr 17 20:47:28 kuluse audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=bluetooth comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 17 20:47:28 kuluse bluetoothd[541]: Starting SDP server
Apr 17 20:47:28 kuluse bluetoothd[541]: Bluetooth management interface 1.15 initialized
Apr 17 20:47:28 kuluse NetworkManager[543]: <info>  [1587170848.9390] Loaded device plugin: NMBluezManager (/usr/lib/NetworkManager/1.22.10-1/libnm-device-plugin-bluetooth.so)
Apr 17 20:47:31 kuluse bluetoothd[541]: Endpoint registered: sender=:1.40 path=/MediaEndpoint/A2DPSink/sbc
Apr 17 20:47:31 kuluse bluetoothd[541]: Endpoint registered: sender=:1.40 path=/MediaEndpoint/A2DPSource/sbc
Apr 17 20:47:32 kuluse bluetoothd[541]: Failed to set mode: Blocked through rfkill (0x12)
Apr 17 20:47:38 kuluse bluetoothd[541]: Endpoint registered: sender=:1.67 path=/MediaEndpoint/A2DPSink/sbc
Apr 17 20:47:38 kuluse bluetoothd[541]: Endpoint registered: sender=:1.67 path=/MediaEndpoint/A2DPSource/sbc
Apr 17 20:47:38 kuluse bluetoothd[541]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
Apr 17 20:47:38 kuluse bluetoothd[541]: RFCOMM server failed for :1.67/Profile/HSPHSProfile/00001108-0000-1000-8000-00805f9b34fb: rfcomm_bind: Address already in use (98)
Apr 17 20:47:39 kuluse albert.desktop[1389]: 20:47:39 [DEBG:applications] Indexing desktop file: bluetooth-sendto.desktop
Apr 17 20:47:41 kuluse albert.desktop[1389]: 20:47:41 [DEBG:applications] Indexing desktop file: gnome-bluetooth-panel.desktop
Apr 17 20:47:49 kuluse blueman-manager.desktop[1678]: Failed to enable bluetooth
Apr 17 20:47:58 kuluse bluetoothd[541]: /org/bluez/hci0/dev_EC_81_93_48_55_9F/sep1/fd0: fd(61) ready
Apr 17 20:48:16 kuluse dbus-daemon[542]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.128' (uid=1000 pid=1804 comm="gnome-control-center bluetooth ")

Code : Tout sélectionner

$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2020-04-17 20:47:28 EDT; 17min ago
       Docs: man:bluetoothd(8)
   Main PID: 541 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 9391)
     Memory: 4.2M
     CGroup: /system.slice/bluetooth.service
             └─541 /usr/lib/bluetooth/bluetoothd

Apr 17 20:47:28 kuluse bluetoothd[541]: Starting SDP server
Apr 17 20:47:28 kuluse bluetoothd[541]: Bluetooth management interface 1.15 initialized
Apr 17 20:47:31 kuluse bluetoothd[541]: Endpoint registered: sender=:1.40 path=/MediaEndpoint/A2DPSink/sbc
Apr 17 20:47:31 kuluse bluetoothd[541]: Endpoint registered: sender=:1.40 path=/MediaEndpoint/A2DPSource/sbc
Apr 17 20:47:32 kuluse bluetoothd[541]: Failed to set mode: Blocked through rfkill (0x12)
Apr 17 20:47:38 kuluse bluetoothd[541]: Endpoint registered: sender=:1.67 path=/MediaEndpoint/A2DPSink/sbc
Apr 17 20:47:38 kuluse bluetoothd[541]: Endpoint registered: sender=:1.67 path=/MediaEndpoint/A2DPSource/sbc
Apr 17 20:47:38 kuluse bluetoothd[541]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
Apr 17 20:47:38 kuluse bluetoothd[541]: RFCOMM server failed for :1.67/Profile/HSPHSProfile/00001108-0000-1000-8000-00805f9b34fb: rfcomm_bind: Address already in use (98)
Apr 17 20:47:58 kuluse bluetoothd[541]: /org/bluez/hci0/dev_EC_81_93_48_55_9F/sep1/fd0: fd(61) ready
Ce qui a pu changer depuis le moment où ça marcheait c'est que je suis passé de zsh à bash par défault et j'ai désinstallé zsh. Aucun rapport normalement mais j'ai retrouvé des fichiers de configuration dont le suivant concertnant le bluetooth (ainsi que deux autres concernant pulseaudio) :

Code : Tout sélectionner

cat /usr/share/zsh/site-functions/_bluetoothctl
#compdef bluetoothctl

__bluetoothctl() {
	bluetoothctl "$@" 2>/dev/null
}

_bluezcomp_controller() {
	local -a controllers
	bluetoothctl list |
	while read _ MAC NAME; do
		controllers+="${MAC//:/\\:}:${NAME//:/\\:}"
	done
	_describe -t controllers 'controller' controllers
}

_bluezcomp_device() {
	local -a devices
	bluetoothctl devices |
	while read _ MAC NAME; do
		devices+="${MAC//:/\\:}:${NAME//:/\\:}"
	done
	_describe -t devices 'device' devices
}

_bluezcomp_agentcap() {
	local -a agent_options=(${(f)"$(__bluetoothctl agent help)"})
	agent_options=( "${(@)agent_options:#(on|off)}" )
	compadd -a agent_options
}

_bluetoothctl_agent() {
	local -a agent_options=(${(f)"$(__bluetoothctl agent help)"})
	agent_options+=help
	compadd -a agent_options
}

_bluetoothctl_advertise() {
	local -a ad_options=(${(f)"$(__bluetoothctl advertise help)"})
	ad_options+=help
	compadd -a ad_options
}

_bluetoothctl() {
	local -a toggle_commands=(
		"discoverable" "pairable" "power" "scan"
	)

	local -a controller_commands=(
		"select" "show"
	)

	local -a device_commands=(
		"block" "connect" "disconnect" "info"
		"pair" "remove" "trust" "unblock" "untrust"
	)

	# Other commands may be handled by _bluetoothctl_$command
	local -a all_commands=( "${(@f)$(__bluetoothctl --zsh-complete help)}" )

	local curcontext=$curcontext state line ret=1
	_arguments -C \
		+ '(info)' \
		{-h,--help}'[Show help message and exit]' \
		{-v,--version}'--version[Show version info and exit]' \
		+ 'mod' \
		'(info)'{-a+,--agent=}'[Register agent handler]:agent:_bluezcomp_agentcap' \
		'(info)'{-t,--timeout}'[Timeout in seconds for non-interactive mode]' \
		'(info)'{-m,--monitor}'[Enable monitor output]' \
		+ 'command' \
		'(info):command:->command' \
		'(info):: :->argument' \
		': :_message "no more arguments"'

	if [[ $state == "command" ]]; then
		_describe -t commands 'command' all_commands
	elif [[ $state == "argument" ]]; then
		if (( ! ${"${(@)all_commands%%:*}"[(I)${line[1]}]} )); then
			_message "Unknown bluetoothctl command: $line[1]"
			return 1;
		fi

		curcontext="${curcontext%:*:*}:bluetoothctl-$line[1]:"
		if ! _call_function ret _bluetoothctl_$line[1]; then
			case $line[1] in
				(${(~j.|.)toggle_commands})
					compadd on off
					;;
				(${(~j.|.)device_commands})
					_bluezcomp_device
					;;
				(${(~j.|.)controller_commands})
					_bluezcomp_controller
					;;
			esac
		fi
		return ret
	fi
} && _bluetoothctl

Un idée ?
Merci !
Dernière modification par Cazuza le ven. 03 juil. 2020, 19:02, modifié 1 fois.
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17230
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [bluetooth] connecté mais pas de son

Message par benjarobin »

Bonjour,
Le dernier fichier que tu donnes est le fichier d'autocompletion pour le shell. Ce n'est pas un fichier de configuration
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Cazuza
archer de cavalerie
Messages : 160
Inscription : jeu. 05 sept. 2013, 17:43

Re: [bluetooth] connecté mais pas de son

Message par Cazuza »

benjarobin a écrit : sam. 18 avr. 2020, 08:59 Bonjour,
Le dernier fichier que tu donnes est le fichier d'autocompletion pour le shell. Ce n'est pas un fichier de configuration
Ok merci de l’éclaircissement j'ai effacé tout le dossier /usr/share/zsh puisque j'ai désinstallé zsh. Rien à voir avec le problème donc.
Cazuza
archer de cavalerie
Messages : 160
Inscription : jeu. 05 sept. 2013, 17:43

Re: [bluetooth] connecté mais pas de son

Message par Cazuza »

Bonjour, j'ai finalement pris le temps de chercher d'autres solutions.
La plus simple est d'installer le paquet AUR pulseaudio-bluetooth-a2dp-gdm-fix, mais j'imagine que la solution du wiki devrait marcher aussi
Répondre