Pulseaudio

Aus TippvomTibb
Zur Navigation springen Zur Suche springen

Allgemeines

Wie so oft bietet Wikipedia einen guten Einstieg. Das brauch schon mal nicht alles selber schreiben. Darüber hinaus wird man auf der Homepage von Pulseaudio fündig.

Ich habe schon seit Jahren vor alle Audio-Quellen und Lautsprecher zu meshen. Pulseaudio scheint dafür gut geeignet. Hier schildere ich mein Vorgehen. Es fängt in soweit schon mal gut an, da ich von der Console meines Arbeitsplatzrechners die Bluetooth-Lautsprecher nicht ansprechen kann. Von der grafischen Benutzeroberfläche (KDE/Plasma) geht es.


Operation not permitted

E: [null-sink] rtp.c: sendmsg() failed: Operation not permitted


Kein pulseaudio.service/pulseaudio.socket

TODO

Kein Server nach Boot

pulseaudio --help

worker:~ # pulseaudio --help pulseaudio [options]

COMMANDS:

 -h, --help                            Show this help
     --version                         Show version
     --dump-conf                       Dump default configuration
     --dump-modules                    Dump list of available modules
     --dump-resample-methods           Dump available resample methods
     --cleanup-shm                     Cleanup stale shared memory segments
     --start                           Start the daemon if it is not running
 -k  --kill                            Kill a running daemon
     --check                           Check for a running daemon (only returns exit code)

OPTIONS:

     --system[=BOOL]                   Run as system-wide instance
 -D, --daemonize[=BOOL]                Daemonize after startup
     --fail[=BOOL]                     Quit when startup fails
     --high-priority[=BOOL]            Try to set high nice level
                                       (only available as root, when SUID or
                                       with elevated RLIMIT_NICE)
     --realtime[=BOOL]                 Try to enable realtime scheduling
                                       (only available as root, when SUID or
                                       with elevated RLIMIT_RTPRIO)
     --disallow-module-loading[=BOOL]  Disallow user requested module
                                       loading/unloading after startup
     --disallow-exit[=BOOL]            Disallow user requested exit
     --exit-idle-time=SECS             Terminate the daemon when idle and this
                                       time passed
     --scache-idle-time=SECS           Unload autoloaded samples when idle and
                                       this time passed
     --log-level[=LEVEL]               Increase or set verbosity level
 -v  --verbose                         Increase the verbosity level
     --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}
                                       Specify the log target
     --log-meta[=BOOL]                 Include code location in log messages
     --log-time[=BOOL]                 Include timestamps in log messages
     --log-backtrace=FRAMES            Include a backtrace in log messages
 -p, --dl-search-path=PATH             Set the search path for dynamic shared
                                       objects (plugins)
     --resample-method=METHOD          Use the specified resampling method
                                       (See --dump-resample-methods for
                                       possible values)
     --use-pid-file[=BOOL]             Create a PID file
     --no-cpu-limit[=BOOL]             Do not install CPU load limiter on
                                       platforms that support it.
     --disable-shm[=BOOL]              Disable shared memory support.
     --enable-memfd[=BOOL]             Enable memfd shared memory support.

STARTUP SCRIPT:

 -L, --load="MODULE ARGUMENTS"         Load the specified plugin module with
                                       the specified argument
 -F, --file=FILENAME                   Run the specified script
 -C                                    Open a command line on the running TTY
                                       after startup
 -n                                    Don't load default script file
Unter user in der der Console:
Als root bzw. sudo:
journalctl -n100 -x

Feb 17 09:06:42 worker pulseaudio[5222]: Unknown command: module-bluetooth-policy Feb 17 09:06:42 worker pulseaudio[5222]: Failed to initialize daemon due to errors while executing startup commands. Source of commands: /etc/pulse/default.pa

Kein Audio auf der Console

Aktuelle Vermutung: Da kommen zwei Probleme zusammen. Zum einen startet jeder Client scheinbar seinen eigenen Pulseaudio-Server (client.conf autospwan auf true) und mein Bluetooth-Dongle ist als Sink in der Console nicht erreichbar. Wenn ich pavucontrol oder pacmd lst-sinks ausführe sehe ich nur meine internen Sound-Devices. Das Programm pasink von Github verspricht Abhilfe.

git clone https://github.com/Heckie75/pasink

Im Ordner befindet sich ein Bash-Script. Ausgeführt. Eingefroren. Toll.

Im Script den bash-Pfad angepasst und die 2 folgenden Zeilen ergänzt. Danach im Debug durchgestept.

#!/usr/bin/bash
set -x
trap read debug

Aha. Das Script bleibt in der Funktion 'lookup_bluez_audio_candidates()' in dieser Zeile hängen.

for controller in $(bluetoothctl list | egrep -o [0-9A-F:]{17})

Das rührt daher, dass bluetoothctl durch die list Option in den interaktiven Modus wechselt und auf eine Eingabe wartet. Also muss man irgendwie erreichen, dass das list-Kommando ausgeführt wird und der Befehl zurückkehrt. Dies habe ich kurzerhand durch folgende Änderung erreicht.

for controller in $(bluetoothctl <<< "list" | egrep -o [0-9A-F:]{17}) 

Und siehe da, es läuft. Jetzt wird auch mein Problem immer deutlicher.

worker:/opt/pasink # ./pasink.sh -l

Default sink:
No PulseAudio daemon running, or not running as session daemon.
Connection failure: Access denied

Plugged Alsa card devices:
Connection failure: Access denied

Sinked Bluetooth A2DP device:
Connection failure: Access denied

Paired Bluetooth A2DP devices:
Connection failure: Access denied

Volume:
Connection failure: Access denied

to be continued ...

Request for Comments


Kommentar hinzufügen
TippvomTibb freut sich über alle Kommentare. Sofern du nicht anonym bleiben möchtest, registriere dich bitte oder melde dich an.

Quellen

https://wiki.archlinux.org/index.php/bluetooth_headset