• Problems with Pulseaudio-modules-bt-git aur package


    I am trying to get the new PA modules to work with my Sony 1000xm2 headphones (mainly the LDAC codec.)

    There is a project in github:
    https://github.com/EHfive/pulseaudio-modules-bt

    I have installed the needed AUR packages and everything works for the FIRST time after pairing my headphones (it activates the a2dp sink and uses LDAC codec). If I turn my headphones of and back on PA won’t use LDAC anymore but some generic HFP codec/sink.

    There is a udev script in the project to fix this “bug” in PulseAudio but I can’t seem to get it working:
    https://gist.github.com/EHfive/c4f1218a75f95b076f0387403246de78

    I have put both of the needed codes in their right directories and with the same filenames but doesn’t seem to work.

    journalctl

    Jan 05 17:13:38 thinkpad systemd-logind[506]: New session 7 of user juha.
    Jan 05 17:13:38 thinkpad systemd[1]: Started Session 7 of user juha.
    Jan 05 17:13:38 thinkpad juha[7694]: /home/juha/bt-auto-enable-a2dp.sh
    Jan 05 17:13:39 thinkpad juha[7708]: found mac: 04:5D:4B:72:B5:6F
    Jan 05 17:13:43 thinkpad kernel: Bluetooth: hci0: SCO packet for unknown connection handle 257
    Jan 05 17:13:43 thinkpad kernel: Bluetooth: hci0: SCO packet for unknown connection handle 257
    Jan 05 17:13:43 thinkpad kernel: Bluetooth: hci0: SCO packet for unknown connection handle 257
    Jan 05 17:13:46 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
    Jan 05 17:13:46 thinkpad juha[7719]: mac 04:5D:4B:72:B5:6F enabled
    Jan 05 17:13:46 thinkpad audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='[email protected] comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Jan 05 17:13:46 thinkpad kernel: audit: type=1131 audit(1546701226.429:74): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='[email protected] comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Jan 05 17:13:46 thinkpad systemd-logind[506]: Session 6 logged out. Waiting for processes to exit.
    Jan 05 17:13:46 thinkpad systemd-logind[506]: Removed session 6.
    Jan 05 17:13:46 thinkpad plasmashell[1164]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationDelegate.qml:113: ReferenceError: appIcon is not defined
    Jan 05 17:13:49 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
    Jan 05 17:13:49 thinkpad juha[7731]: mac 04:5D:4B:72:B5:6F enabled
    Jan 05 17:13:49 thinkpad audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='[email protected] comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Jan 05 17:13:49 thinkpad kernel: audit: type=1131 audit(1546701229.726:75): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='[email protected] comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    
    

    Anyone here have BT headphones that support aptx or ldac and could test?

  • systemctl status bluetooth.sevice
    

    and

    systemctl --user status pulseaudio
    

    ?

  • @judd said in Problems with Pulseaudio-modules-bt-git aur package:

    systemctl --user status pulseaudio

    [[email protected] ~]$ systemctl status bluetooth.service
    ● bluetooth.service - Bluetooth service
       Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
       Active: active (running) since Sat 2019-01-05 16:42:52 EET; 1h 52min ago
         Docs: man:bluetoothd(8)
     Main PID: 797 (bluetoothd)
       Status: "Running"
        Tasks: 1 (limit: 4915)
       Memory: 4.1M
       CGroup: /system.slice/bluetooth.service
               └─797 /usr/lib/bluetooth/bluetoothd
    
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSource/VENDOR/APTXHD
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSource/VENDOR/APTX
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSource/AAC
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSource/SBC
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSink/VENDOR/APTXHD
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSink/VENDOR/APTX
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSink/AAC
    Jan 05 16:55:13 thinkpad bluetoothd[797]: Endpoint registered: sender=:1.251 path=/MediaEndpoint/A2DPSink/SBC
    Jan 05 16:57:24 thinkpad bluetoothd[797]: Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
    Jan 05 17:22:01 thinkpad bluetoothd[797]: Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
    
    

    and

    [[email protected] ~]$ systemctl --user status pulseaudio
    ● pulseaudio.service - Sound Service
       Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
       Active: active (running) since Sat 2019-01-05 16:55:13 EET; 1h 41min ago
     Main PID: 6467 (pulseaudio)
       CGroup: /user.slice/user-1000.slice/[email protected]/pulseaudio.service
               ├─6467 /usr/bin/pulseaudio --daemonize=no
               └─6471 /usr/lib/pulse/gsettings-helper
    
    Jan 05 16:55:13 thinkpad systemd[1068]: Started Sound Service.
    Jan 05 16:55:13 thinkpad pulseaudio[6467]: E: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
    Jan 05 16:56:55 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
    Jan 05 16:56:58 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
    Jan 05 16:57:07 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
    Jan 05 17:13:46 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
    Jan 05 17:13:49 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
    Jan 05 18:35:20 thinkpad pulseaudio[6467]: E: [pulseaudio] module-bluez5-device.c: Failed to parse module arguments
    Jan 05 18:35:20 thinkpad pulseaudio[6467]: E: [pulseaudio] module.c: Failed to load module "module-bluez5-device" (argument: "path=/org/bluez/hci0/dev_04_5D_4B_72_B5_6F autodetect_mtu=0 a2dp_config="""): initialization failed.
    Jan 05 18:35:20 thinkpad pulseaudio[6467]: W: [pulseaudio] module-bluez5-discover.c: Failed to load module for device /org/bluez/hci0/dev_04_5D_4B_72_B5_6F
    
    
  • pacman -Q | grep bluetooth
    
    pactl list modules short
    
    lsmod | grep btusb
    

    ?

  • @judd said in Problems with Pulseaudio-modules-bt-git aur package:

    pacman -Q | grep bluetooth

    [[email protected] ~]$ pacman -Q | grep bluetooth
    pulseaudio-bluetooth 12.2-2
    

    @judd said in Problems with Pulseaudio-modules-bt-git aur package:

    pactl list modules short

    [[email protected] ~]$ pactl list modules short
    0       module-device-restore
    1       module-stream-restore
    2       module-card-restore
    3       module-augment-properties
    4       module-switch-on-port-available
    5       module-udev-detect
    6       module-alsa-card        device_id="1" name="usb-046d_HD_Pro_Webcam_C920_6E59851F-02" card_name="alsa_card.usb-046d_HD_Pro_Webcam_C920_6E59851F-02" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
    7       module-alsa-card        device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
    8       module-bluetooth-policy
    9       module-bluetooth-discover
    10      module-bluez5-discover
    11      module-dbus-protocol
    12      module-esound-protocol-unix
    13      module-native-protocol-unix
    14      module-gsettings
    15      module-default-device-restore
    16      module-rescue-streams
    17      module-always-sink
    18      module-intended-roles
    19      module-suspend-on-idle
    20      module-console-kit
    21      module-systemd-login
    22      module-position-event-sounds
    23      module-role-cork
    24      module-filter-heuristics
    25      module-filter-apply
    
    

    @judd said in Problems with Pulseaudio-modules-bt-git aur package:

    lsmod | grep btusb

    [[email protected] ~]$ lsmod | grep btusb
    btusb                  57344  0
    btrtl                  20480  1 btusb
    btbcm                  16384  1 btusb
    btintel                28672  1 btusb
    bluetooth             651264  56 btrtl,btintel,btbcm,bnep,btusb,rfcomm
    
    

    Is it strange that both bluetooth-discover and bluez-discover are there? Arent these the “same” thing.

  • @inffy said in Problems with Pulseaudio-modules-bt-git aur package:

    ¿Es extraño que haya tanto bluetooth-discover como bluez-discover? No son estos lo “mismo”.

    I could not tell, you have to investigate a little.

    Otherwise, all the outputs look good.

    It would be good, too, to be able to see the outputs of:

    # bluetoothctl  →  and from that point, onwards →
    

    https://wiki.archlinux.org/index.php/Bluetooth_headset#Configuration_via_CLI
    →[bluetooth]# power on
    →[bluetooth]# agent on
    →[bluetooth]# default-agent
    →[bluetooth]# scan on

    ?

    Quick thinking, it has installed pavucontrol ?

  • @inffy said in Problems with Pulseaudio-modules-bt-git aur package:

    pacman -Q | grep bluetooth

    should be: pacman -Qs bluetooth

    I have to connect --> disconnect --> connect my headphone to get a2dp aviable most of the time.

  • @joekamprad said in Problems with Pulseaudio-modules-bt-git aur package:

    @inffy said in Problems with Pulseaudio-modules-bt-git aur package:

    pacman -Q | grep bluetooth

    should be: pacman -Qs bluetooth

    I have to connect --> disconnect --> connect my headphone to get a2dp aviable most of the time.

    Totally agree !
    Exit more open and much more descriptive.

  • @joekamprad said in Problems with Pulseaudio-modules-bt-git aur package:

    I have to connect --> disconnect --> connect my headphone to get a2dp aviable most of the time.

    Interesting, haven’t really tried that many times but usually doesn’t do anything for me.

    Are you on 4.20 or 4.19 kernel? Any differences you have seen between the kernels?

  • @inffy BT is crappy on every change sometimes it getting better and next time it is screwed in another way…

    https://gist.github.com/hxss/a3eadb0cc52e58ce7743dff71b92b297

    is the original hack…

    do you check to change path inside the udev rule?

    SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="/path/to/scriptlet/bt-auto-enable-a2dp.sh"
    /path/to/scriptlet/ must be changed to where you save the script and the script must be ececutable.

  • @joekamprad yep I changed it to my home folder where the script is.

aur55 Posts 12Views 128
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.