Multimedia keys of Keyboard(Play/Pause/Skip track) not working in some applications

Hi,
I recently switched to Manjaro and noticed that the hardware play/pause, rewind/skip keys don’t work in some specific apps like Spotify(flatpak) and browser too. It works fine in VLC though. It also used to work in Spotify on Kubuntu 20.04. Is there a way to mark and enable applications to accept media keys input or something like that so I can use them in Spotify again?
Would appreciate it a lot if anyone can help.

Here’s my inxi output if that’s helpful:

  Kernel: 5.10.34-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=9ed067f5-9fca-4ad0-80bc-f66bd1117794 rw quiet apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: KDE Plasma 5.21.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 
  dm: SDDM Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: Dell product: Vostro 14-3468 v: N/A serial: <filter> 
  Chassis: type: 9 serial: <filter> 
  Mobo: Dell model: 01CM9N v: A01 serial: <filter> UEFI: Dell v: 2.5.0 
  date: 04/19/2018 
Memory:
  RAM: total: 3.71 GiB used: 3.38 GiB (91.0%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: Dual Core model: Intel Core i3-7100U bits: 64 type: MT MCP 
  arch: Amber/Kaby Lake note: check family: 6 model-id: 8E (142) stepping: 9 
  microcode: DE cache: L2: 3 MiB bogomips: 19200 
  Speed: 1100 MHz min/max: 600/2100 MHz Core speeds (MHz): 1: 1100 2: 1100 
  3: 1100 4: 1100 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art 
  avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid 
  cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est 
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window 
  hwp_epp hwp_notify ibpb ibrs intel_pt invpcid invpcid_single lahf_lm lm mca 
  mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe 
  pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts rdrand 
  rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 
  ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme 
  vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel HD Graphics 620 vendor: Dell driver: i915 v: kernel 
  bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300 
  Device-2: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo 
  bus-ID: 1-5:4 chip-ID: 0c45:6a05 class-ID: 0e02 
  Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: 
  loaded: intel unloaded: modesetting alternate: fbdev,vesa display-ID: :0 
  screens: 1 
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") 
  s-diag: 414mm (16.3") 
  Monitor-1: eDP1 res: 1366x768 hz: 60 dpi: 112 size: 310x170mm (12.2x6.7") 
  diag: 354mm (13.9") 
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.0.3 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel 
  v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 chip-ID: 8086:9d71 
  class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.34-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.26 running: yes 
Network:
  Device-1: Intel Wireless 3165 driver: iwlwifi v: kernel port: f040 
  bus-ID: 01:00.0 chip-ID: 8086:3165 class-ID: 0280 
  IF: wlp1s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Dell driver: r8169 v: kernel port: e000 bus-ID: 02:00.0 
  chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp2s0 state: down mac: <filter> 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
  bus-ID: 1-8:6 chip-ID: 8087:0a2a class-ID: e001 
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends 
Logical:
  Message: No logical block device data found. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 931.51 GiB used: 24.04 GiB (2.6%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172 
  size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 5400 rpm serial: <filter> rev: SDM2 scheme: GPT 
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVD+-RW GU90N rev: A1C1 
  dev-links: cdrom 
  Features: speed: 24 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
Partition:
  ID-1: / raw-size: 931.22 GiB size: 915.53 GiB (98.32%) 
  used: 24.03 GiB (2.6%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A 
  uuid: 9ed067f5-9fca-4ad0-80bc-f66bd1117794 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 296 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: NO_LABEL 
  uuid: 3E5B-9919 
Swap:
  Alert: No swap data was found. 
Unmounted:
  Message: No unmounted partitions found. 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-1:2 info: Xenta 2.4G Wireless Optical Mouse type: Mouse 
  driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s 
  power: 100mA chip-ID: 1d57:0008 class-ID: 0301 
  Device-2: 1-4:3 info: Validity Sensors VFS Fingerprint sensor 
  type: <vendor specific> driver: N/A interfaces: 1 rev: 1.1 speed: 12 Mb/s 
  power: 100mA chip-ID: 138a:0010 class-ID: ff00 serial: <filter> 
  Device-3: 1-5:4 info: Microdia Integrated_Webcam_HD type: Video 
  driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA 
  chip-ID: 0c45:6a05 class-ID: 0e02 
  Device-4: 1-6:5 info: Realtek RTS5129 Card Reader Controller 
  type: <vendor specific> driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc 
  interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 0bda:0129 
  class-ID: ff00 serial: <filter> 
  Device-5: 1-8:6 info: Intel Bluetooth wireless interface type: Bluetooth 
  driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA 
  chip-ID: 8087:0a2a class-ID: e001 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 45.0 C mobo: 44.0 C 
  Fan Speeds (RPM): cpu: 0 
Info:
  Processes: 195 Uptime: 13h 02m wakeups: 2 Init: systemd v: 247 
  tool: systemctl Compilers: gcc: 10.2.0 Packages: 1306 pacman: 1297 lib: 375 
  flatpak: 5 snap: 4 Shell: Bash v: 5.1.4 running-in: konsole inxi: 3.3.04 ```

With playerctl package? Customize shortcuts for media keys.

Play/Pause : playerctl play-pause
Stop : playerctl stop
Next : playerctl next
Previous: playerctl previous

1 Like

What I meant to say was I already have the F3, F4, F5 keys on my keyboard as Play/Pause etc.
With playerctl i have to use the command line to play/pause.
Do you mean to say I have to map the keys to work with playerctl?
How do I do that?
I am a new user so don’t know much

In System Settings → Shortcuts, create these custom keyboard shortcuts.

2 Likes

@omano Thanks a lot for your help all the commands work flawlessly now.

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