Media keys not working with Audacious

Recently I just noticed my Media Keys no longer work. I tested it with audacious and VLC players with more than a single audio/video file in their playlists. Surprisingly, I could use Media Keys with VLC player, but not with audacious. I use Logitech K800 Wirelless Illuminated Keyboard. It worked just fine a few months ago. Could it be another bug in KDE Plasma within the most recent update?

Temporarily I use the following workaround, but I would love to have a native support for my Media Keys: How to fix media keys not working on Linux.

System Information:

Keyboard model: Logitech | Logitech
KDE Plasma Version: 5.17.1
Kernel Version: 4.19.80-1-MANJARO

xev Output whilst pressing Media Next button on my keyboard:

[joe@manjaro ~]$ xev -event keyboard
Outer window is 0x6800001, inner window is 0x6800002

KeymapNotify event, serial 24, synthetic NO, window 0x0,
    keys:  4294967234 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 25, synthetic NO, window 0x6800001,
    root 0x24d, subw 0x0, time 10111430, (867,459), root:(872,464),
    state 0x2010, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x6800001,
    root 0x24d, subw 0x0, time 10117810, (867,459), root:(872,464),
    state 0x2010, keycode 171 (keysym 0x1008ff17, XF86AudioNext), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x6800001,
    root 0x24d, subw 0x0, time 10117948, (867,459), root:(872,464),
    state 0x2010, keycode 171 (keysym 0x1008ff17, XF86AudioNext), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

did you check Audacious settings for 'Global Hotkeys' plug-in

I already use that plug-in, but still face this issue. As you can see, the settings match my output from xev, so I'm not sure what's happening and why it doesn't trigger for Audacious natively.

click on the 'Key Binding' box showing '(none)'

(if you get a warning about binding to mouse button click 'no')

press one of the multimedia keys that isn't working right (play, stop etc)
and see if the key detected matches Key Binding already listed

1 Like

what is model number of Logitech Keyboard?

could it be one that needs an AUR package for function/multimedia keys?
pamac search -a logitech keyboard

Wow! A great idea... I did as you described. After I pressed Media Next button on my keyboard, the box showing "none" didn't change its value, but instead - focus on a certain song inside my playlist has changed to the song right below it. It means it works now.

I assume this may be related to some sort of an "environment issue". In case I watch YouTube in my Chromium, it might be that it also "steals" the keystrokes events and Audacious never even get the signal from it. If I just run Audacious right after a clean reboot, it works well. I should play around with this thought to figure it out and will report here.

Thanks for your help!

Logitech K800 Wirelless Illuminated Keyboard

I use Solaar v1.0.1-2 community package and mm keys do work for other apps and for Audacious, but - sometimes. As I said, I need to figure out the logic behind - when exactly does it work, when it doesn't.

Ok, in my previous report I still called Playerctl upon pressing media keys (within my Custom Shortcuts), that's why it worked as it should. :face_with_hand_over_mouth: Now I disabled it and tried with the default behavior (re-assigned the defaults to my Global Shortcuts):

When I tried the same procedure from above (for Global Hotkeys Settings), "none" didn't change any value whilst pressing Media Next, Media Previous or Media Play. Focus in my Audacious didn't change, so pressing media keys doesn't seem to work. :face_with_raised_eyebrow:

However, when I checked the output of xev, pressing media keys return the appropriate values. :thinking:

Logitech and wireless is outside my experience

but websearch found this
wiki.archlinux.org/Logitech_Unifying_Receiver
which mentions solaar having command line functions
but the link on to solaar is showing 404 ?

there is documentation for command-line tool ltunify
lekensteyn.nl/logitech-unifying#ltunify
with commands 'list' and 'info idx' may be able to find out more

Audacious documentation has this about Global Hotkeys

saschahlusiak.de/audacioushotkey
You can use any key combination (that is not already grabbed by another application) that is recognized by X.Org, including multimedia keys.

some other package still taking priority for media keys ?

Ltunify didn't help much.

$ ltunify -D info 1           

wr: 10 ff 81 00 00 00 00
rd: 10 ff 81 00 00 09 00                                                                                                                      
Reporting Flags (Receiver) = 09                                                                                                               
Wireless notifications     = yes
Software Present           = no
wr: 10 ff 83 b5 20 00 00
rd: 11 ff 83 b5 20 08 14 20 10 04 00 01 07 00 00 00 00 00 00 00                                                                               
wr: 10 01 00 14 00 00 00                                                                                                                      
rd: 10 01 8f 00 14 01 00                                                                                                                      
wr: 10 ff 83 b5 30 00 00                                                                                                                      
rd: 11 ff 83 b5 30 84 6f 26 08 1a 40 00 00 07 00 00 00 00 00 00                                                                               
wr: 10 ff 83 b5 40 00 00                                                                                                                      
rd: 11 ff 83 b5 40 04 4b 38 30 30 00 00 00 00 00 00 00 00 00 00                                                                               
wr: 10 01 81 f1 01 00 00                                                                                                                      
rd: 20 01 01 00 00 00 00                                                                                                                      
Skipping unexpected report ID 0x20 (want 0x10)                                                                                                
rd: 10 01 81 f1 01 22 01
wr: 10 01 81 f1 02 00 00                                                                                                                      
rd: 10 01 81 f1 02 00 19                                                                                                                      
wr: 10 01 81 f1 04 00 00                                                                                                                      
rd: 10 01 81 f1 04 02 01                                                                                                                      
HID++ version: 1.0                                                                                                                            
Device index 1
Keyboard
Name: K800
Wireless Product ID: 2010
Serial number: 846E3608
Firmware version: 022.001.00019
Bootloader version: BL.002.001

wr: 10 ff 81 00 00 00 00
rd: 10 ff 81 00 00 09 00                                                                                                                      
Reporting Flags (Receiver) = 09                                                                                                               
Wireless notifications     = yes
Software Present           = no

However, I think the driver and media keys work ok. It could be some other package taking priority for media keys. Not sure how to take a stab at this in order to debug it properly. Any ideas?

i think that is debug information for the receiver
from documentation, perhaps something like
ltunify info idx=1 or ltunify info keyboard
to get information about keyboard
might not be relevant if key codes are intercepted before audacious

maybe playerctl configuration in home folder ~/.config/playerctl/ that was not removed when package uninstalled ?

task manager to see what is running on system that might intercept key codes

I used xdotool for this. You can emulate any keystroke with it, i.e. for XF86AudioNext:

$ KEY=XF86AudioNext; xdotool keydown ${KEY}; xdotool key XF86AudioNext; xdotool keyup ${KEY}

When playerctl is used, the output from "journalctl -f" is:
kdeinit5[747]

... which is correct, since it has been triggered as a Custom Shortcut. But right after I remove the playerctl Custom Shortcut, then re-assign the default Global Shortcuts for media keys and emulate the same keystroke from xdotool, the output within "journalctl -f" is empty (no new entries). :roll_eyes: Really annoying issue...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by