ich möchte Folgendes gerne haben:
Wenn ich meinen Bose Soundlink Mini via Bluetooth verbinde, dann soll Pulsaudio den Lautsprecher als Standard übernehmen. Leider funktioniert das nicht out of the box. Der nötige Befehl dafür lautet
Code: Alles auswählen
pacmd set-default-sink bluez_sink.00_00_00_00_00_00
Code: Alles auswählen
/usr/bin/pacmd list-sinks
Code: Alles auswählen
set-default-sink bluez_sink.00_00_00_00_00_00
Überwacht man die udev events mit
Code: Alles auswählen
udevadm monitor --environment
Code: Alles auswählen
KERNEL[2306.360207] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.4/1-8.4:1.0/bluetooth/hci0/hci0:71 (bluetooth)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.4/1-8.4:1.0/bluetooth/hci0/hci0:71
DEVTYPE=link
SEQNUM=2249
SUBSYSTEM=bluetooth
UDEV [2306.363546] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.4/1-8.4:1.0/bluetooth/hci0/hci0:71 (bluetooth)
.MM_USBIFNUM=00
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.4/1-8.4:1.0/bluetooth/hci0/hci0:71
DEVTYPE=link
SEQNUM=2249
SUBSYSTEM=bluetooth
SYSTEMD_ALIAS=/sys/subsystem/bluetooth/devices/hci0:71
SYSTEMD_WANTS=bluetooth.target
TAGS=:systemd:
USEC_INITIALIZED=2306361886
KERNEL[2308.740762] add /devices/virtual/input/input26 (input)
ACTION=add
DEVPATH=/devices/virtual/input/input26
EV=100007
KEY=...
MODALIAS=...
NAME="00:00:00:00:00:00"
PRODUCT=5/0/0/0
PROP=0
REL=0
SEQNUM=2250
SUBSYSTEM=input
KERNEL[2308.740893] add /devices/virtual/input/input26/event15 (input)
ACTION=add
DEVNAME=/dev/input/event15
DEVPATH=/devices/virtual/input/input26/event15
MAJOR=13
MINOR=79
SEQNUM=2251
SUBSYSTEM=input
UDEV [2308.742969] add /devices/virtual/input/input26 (input)
ACTION=add
DEVPATH=/devices/virtual/input/input26
EV=100007
ID_INPUT=1
ID_INPUT_KEY=1
KEY=...
MODALIAS=...
NAME="00:00:00:00:00:00"
PRODUCT=5/0/0/0
PROP=0
REL=0
SEQNUM=2250
SUBSYSTEM=input
TAGS=:seat:
USEC_INITIALIZED=2308742468
UDEV [2308.788651] add /devices/virtual/input/input26/event15 (input)
ACTION=add
BACKSPACE=guess
DEVNAME=/dev/input/event15
DEVPATH=/devices/virtual/input/input26/event15
ID_INPUT=1
ID_INPUT_KEY=1
MAJOR=13
MINOR=79
SEQNUM=2251
SUBSYSTEM=input
USEC_INITIALIZED=2308788513
XKBLAYOUT=us
XKBMODEL=pc105
XKBOPTIONS=
XKBVARIANT=
Code: Alles auswählen
SUBSYSTEM=="input", ACTION=="add", NAME=="00:00:00:00:00:00", RUN+="/usr/bin/pacmd set-default-sink bluez_sink.00_00_00_00_00_00"
Code: Alles auswählen
udevadm test /devices/virtual/input/input26
Die alternative Benutzung von DEVNAME hat auch nichts gebracht, weil dass wohl kein gültiges Key-Word für udev rules ist. Ansonsten wäre der aber mit "/dev/input/event15" eindeutig. Bei mir ist der für den Lautsprecher immer 15.
Hat einer eine Idee, was man da machen kann?
Viele Grüße
Andreas