mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-04-25 16:15:52 +03:00
[GH-ISSUE #107] [Linux] 'a2dp-sink' is called 'a2dp_sink' on Arch Linux #42
Labels
No labels
android
bug
documentation
enhancement
good first issue
help wanted
linux
pull-request
reverse-engineering
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librepods#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jdholtz on GitHub (Apr 23, 2025).
Original GitHub issue: https://github.com/kavishdevar/librepods/issues/107
Hello, I recently discovered this project and really like it! I've built the new Linux app but I've been getting the following error when activating the A2DP profile:
I noticed that this was because the pactl command to activate this profile uses
a2dp-sink, whereas on Arch Linux, it isa2dp_sink. I'm not sure where exactly this discrepancy comes from.I think a potential solution could be to try
a2dp-sink, and then fallback toa2dp_sinkif the first command fails. I can definitely submit a PR with whatever decision is decided as well.@kavishdevar commented on GitHub (Apr 23, 2025):
Thanks for pointing it out! I remember in the early days when I was playing around with this on Arch and then switched my daily driver to Neon, I did encounter this. And, I just forgot about it.
I think finding the BlueZ device's name might be possible with D-Bus. I'll have a look if I get time. @tim-gromeyer if you have some idea on how to get the entity name, let me know!
@tim-gromeyer commented on GitHub (Apr 23, 2025):
Yes, I already got an idea and a concept implementation, but it will add dependencies for the pactl and pw-cli commands. Will test when I'm at home.
@jdholtz Just out of curiosity, does everything else work? Which airpods are you using?
@jdholtz commented on GitHub (Apr 23, 2025):
Yes, everything else is working (ear detection, battery, connect/disconnect notifications). I'm using the AirPods 1st gen.
One small thing I noticed is that the MPRIS controls don't work when I'm pressing a modifier button (using i3wm). For example, double tapping while holding control, alt, win key. When I used mpris-proxy, this wasn't a problem. A very small problem though.
@kavishdevar commented on GitHub (Apr 23, 2025):
I have had this problem as well. And I too just start mpris-proxy when I connect my airpods. My controls don't work at all otherwise, not only when pressing a modifier. iirc someone on reddit had suggested this.
maybe we can find the binary in PATH and start it when airpods are connected. I guess these are just normal Linux problems ¯\_(ツ)_/¯ I couldn't pair my airpods without setting the Bluetooth mode to dual or bredr.
@jdholtz commented on GitHub (Apr 23, 2025):
Now I'm getting this issue as well where it doesn't work at all.
There might be something deeper going on for me though because even when I run mpris-proxy, a double tap pauses the music but then it takes 3-5 more double taps to replay the music.With mpris-proxy, it does work reliably for me too.dbus-monitorshows that 'Pause' is still being sent for those taps until the last one, which is 'Play'.Yeah, I think that would be a good solution. There is also a systemd service, maybe that would be helpful too.
@tim-gromeyer commented on GitHub (Apr 23, 2025):
Well for me
mpris-proxydoesn't work at all.BTW, can you test #108? It should fix this issue
@jdholtz commented on GitHub (Apr 23, 2025):
I've tested #108, but it seems to not find the device sink name at all
Here's my
pactl list sinksoutput for the a2dp_sink:@tim-gromeyer commented on GitHub (Apr 23, 2025):
The app looks for the
device.nameattribute. Can you find it? Or find any other attribute which we can use to remove airpods as device (pactl set-card-profile <card name> off) (usea2dp-sinkinstead of off to turn on again)@jdholtz commented on GitHub (Apr 23, 2025):
No, unfortunately I don't see that attribute or any other attribute that has
a2dp-sink. The only place I can find a2dp* appear is when attached to my bluez_card/bluez_sink. Here's the output ofpactl list cards. Maybe the profiles attribute for the bluez card can be parsed? To parse more easily,pactl --format=jsoncan be used too.@kavishdevar commented on GitHub (Apr 24, 2025):
@jdholtz does
pactl list short sinks | awk '$2 ~ /^bluez/ {print $2}'print the correct name?@tim-gromeyer commented on GitHub (Apr 24, 2025):
You guys are definitely onto something. Will test when I'm home (~9hrs)
@jdholtz commented on GitHub (Apr 24, 2025):
Yes, it outputs:
bluez_sink.XX_XX_XX_XX_XX_XX.a2dp_sink. The only problem may be if I set this:pactl set-card-profile bluez_card.XX_XX_XX_XX_XX_XX handsfree_head_unit, the list command displays withhandsfree_head_unitat the end. It's unclear to me how much of a problem this would be though, but potentially it could if the card doesn't default toa2dp_sink.@kavishdevar commented on GitHub (Apr 25, 2025):
Oh, I just remembered - we need the card name (we set card's profile), not the sink name. And, the card name is just
bluez_card.XX_XX_XX_XX_XX_XX. So, defaulting to HS/FP should not be a problem.@jdholtz commented on GitHub (Apr 26, 2025):
On
main, I am still getting the following error:It correctly sets the device output, but it is still looking for
a2dp-sinkinstead ofa2dp_sink.And it does work when changing the following
.editorconfigfile #246