Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Touch control Sony WH-1000X M3 - AVRCP/Dbus?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
f1tz
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2020
Posts: 88

PostPosted: Wed Nov 11, 2020 8:01 am    Post subject: [SOLVED] Touch control Sony WH-1000X M3 - AVRCP/Dbus? Reply with quote

Dear gentoo people,

has somebody got the touch control (next/previous song) on the WH-1000X M3 headphones got working?
Our wiki says "The touch interface on the right speaker works.".

In this thread from 2014 it is recommended to add
Code:
Enable=Control,Gateway,Headset,Media,Sink,Socket,Source
to
Code:
audio.conf
inside
Code:
/etc/bluetooth/


Which doesnt exist here. I only got:
Code:
input.conf, main.conf, network.conf


Has anybody added this line into his bluetooth config file? If yes, to which file was it? input main or network.conf? Or is this "Enable=..." line obsolete in the meantime?

Code:
acpi_listen


Didnt log any events, whilst swiping on the touchpad.

There seems to be some solutions with Dbus, will further research that, in case somebody has experience there, thanks for sharing.


Thanks for your advice.

Regards,

f1tz


Last edited by f1tz on Sat Nov 14, 2020 6:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Nov 11, 2020 11:43 pm    Post subject: Reply with quote

So did you try enabling these features via audio.conf or not? You can't tell it does not work if you don't try.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
f1tz
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2020
Posts: 88

PostPosted: Fri Nov 13, 2020 2:08 pm    Post subject: Reply with quote

Dear Jaglover,

thanks for your answer.

Yes, I added this line into main.conf which didnt change anything.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Nov 13, 2020 3:46 pm    Post subject: Reply with quote

The instructions said audio.conf, why main.conf?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
f1tz
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2020
Posts: 88

PostPosted: Sat Nov 14, 2020 10:06 am    Post subject: Reply with quote

audio.conf does not exist, or would you create it?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Nov 14, 2020 12:23 pm    Post subject: Reply with quote

Yes, this is what we do in a case like this.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
f1tz
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2020
Posts: 88

PostPosted: Sat Nov 14, 2020 6:47 pm    Post subject: Reply with quote

The solution was easy, the bluetooth headset uses X86 mediakeys.
Using the touchpad while having a terminal on with executed
Code:
xev

showed that it uses XF86AudioPrev and XF86AudioNext :roll:

The package media-sound/playerctl can easily redirect X86 keys via DBus to Spotify.

On reddit the developer of mpris-ctl helped me on this and said he would be happy to have mpris-ctl as an ebuild in the gentoo repos. I thought I might give this a try to get some understanding of portage.


Another, more hard-coded variant (works only for Spotify) which worked was to modify .bash_profile so that the window manager on startup (sway in my case) gets started with dbus-launch ahead.

Code:
exec dbus-launch --sh-syntax --exit-with-session sway


Without this line, I got the error ".service not found" while trying to send Dbus commands to spotify.

After that it was just adding some minor dotfile keybinding:

Code:
bindsym XF86AudioPlay exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
bindsym XF86AudioPause exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
bindsym XF86AudioNext exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
bindsym XF86AudioPrev exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous


But with playerctl or mpris-ctl it is more flexible as it allows to control other media players.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Nov 14, 2020 6:57 pm    Post subject: Reply with quote

Thank you for providing solution, good job!
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum