[Solved] Audio control buttons are linked to the wrong application

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Domojestic
Level 2
Level 2
Posts: 91
Joined: Tue Jan 03, 2023 5:32 pm

[Solved] Audio control buttons are linked to the wrong application

Post by Domojestic »

Solution:
Some browsers "hog" the media keys, so to speak, even if you've selected them to affect a certain application through Mint's settings. The specifics behind how to disable this depend on your browser, but here's the current list of how to do this (if you use a different browser and manage to locate the equivalent setting, post it so I can add it to this list!). Keep in mind, this will completely disable your media keys from being able to affect the browser, so if you are looking for a solution specifically to get the actual settings in Mint to 100% work, unfortunately, this may not be the solution you're looking for. In any case:
Google Chrome:
  1. Enter chrome://flags/#hardware-media-key-handling into the Chrome search bar.
  2. To the very right of the highlighted option should be a dropdown currently set to "Default."
  3. Set this to "Disabled," and restart Chrome when prompted.
Firefox:
  1. Go to about:config.
  2. Find media.hardwaremediakeys.enabled.
  3. Set this to False and restart Firefox.
Thank you to jmholla for finding a solution!
-----------------------------------------------------------------------
Original post

I can't seem to get my audio control buttons (play/pause, skip, rewind) to link to Spotify; it always defaults to Chrome. I had an instance where suddenly it was working properly, but have not been able to replicate it. It only lasted maybe a day.

I'm making sure that I have Spotify selected under "Choose player controls," but I'm relatively new to Mint and don't know what else to look at.

I should also mention that when using Bluetooth headphones, the audio controls work in exactly the same way; they're able to communicate with my laptop, but once it's there, it still gets the wrong application.

Here is my system information:

Code: Select all

System:
  Kernel: 5.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.6.7
    tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: LENOVO product: 81YK v: IdeaPad 5 15IIL05 serial: <superuser required>
    Chassis: type: 10 v: IdeaPad 5 15IIL05 serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <superuser required> UEFI: LENOVO
    v: DPCN45WW date: 07/06/2020
Battery:
  ID-1: BAT0 charge: 40.0 Wh (97.1%) condition: 41.2/45.0 Wh (91.5%) volts: 12.3 min: 11.1
    model: Celxpert L19C3PF4 serial: <filter> status: N/A
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard serial: <filter>
    charge: 55% (should be ignored) status: Discharging
CPU:
  Info: quad core model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake rev: 5 cache:
    L1: 320 KiB L2: 2 MiB L3: 8 MiB
  Speed (MHz): avg: 3291 high: 3638 min/max: 400/3900 cores: 1: 3590 2: 3229 3: 3155 4: 3045
    5: 3638 6: 3164 7: 3044 8: 3465 bogomips: 23961
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Iris Plus Graphics G7 vendor: Lenovo driver: i915 v: kernel ports:
    active: HDMI-A-1,eDP-1 empty: DP-1,DP-2 bus-ID: 00:02.0 chip-ID: 8086:8a52
  Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo bus-ID: 3-5:3
    chip-ID: 13d3:56ff
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting unloaded: fbdev,vesa
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3520x1428 s-dpi: 96
  Monitor-1: HDMI-1 mapped: HDMI-A-1 pos: primary,top-left model: Samsung C24F390 res: 1920x1080
    dpi: 94 diag: 598mm (23.5")
  Monitor-2: eDP-1 pos: primary,bottom-r res: 1600x900 dpi: 118 diag: 395mm (15.5")
  OpenGL: renderer: Mesa Intel Iris Plus Graphics (ICL GT2) v: 4.6 Mesa 22.0.5
    direct render: Yes
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Lenovo driver: sof-audio-pci-intel-icl
    bus-ID: 00:1f.3 chip-ID: 8086:34c8
  Sound Server-1: ALSA v: k5.15.0-58-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3
    chip-ID: 8086:34f0
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-10:5 chip-ID: 8087:0026
  Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 3.0 lmp-v: 5.2
    sub-v: 237e
Drives:
  Local Storage: total: 476.94 GiB used: 94.16 GiB (19.7%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN530 SDBPMPZ-512G-1101 size: 476.94 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 33.9 C
Partition:
  ID-1: / size: 467.89 GiB used: 94.15 GiB (20.1%) fs: ext4 dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 32.8 MiB (1.6%) priority: -2 file: /swapfile
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 1 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002
  Device-1: 3-1:2 info: Logitech Unifying Receiver type: Keyboard,Mouse
    driver: logitech-djreceiver,usbhid rev: 2.0 speed: 12 Mb/s chip-ID: 046d:c534
  Device-2: 3-5:3 info: IMC Networks Integrated Camera type: Video driver: uvcvideo rev: 2.0
    speed: 480 Mb/s chip-ID: 13d3:56ff
  Device-3: 3-7:4 info: Elan Micro ELAN:Fingerprint type: <vendor specific> driver: N/A rev: 2.0
    speed: 12 Mb/s chip-ID: 04f3:0c58
  Device-4: 3-10:5 info: Intel AX201 Bluetooth type: Bluetooth driver: btusb rev: 2.0
    speed: 12 Mb/s chip-ID: 8087:0026
  Hub-4: 4-0:1 info: Super-speed hub ports: 6 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
Sensors:
  System Temperatures: cpu: 52.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2460 apt: 2456 snap: 4
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https: //dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/nordvpn.list
    1: deb https: //repo.nordvpn.com//deb/nordvpn/debian stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http: //mirror.scd31.com/mint vera main upstream import backport
    2: deb http: //archive.ubuntu.mirror.rafal.ca/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.mirror.rafal.ca/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.mirror.rafal.ca/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/slgobinath-gcalendar-jammy.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/slgobinath-gcalendar-jammy.gpg] https: //ppa.launchpadcontent.net/slgobinath/gcalendar/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/spotify.list
    1: deb http: //repository.spotify.com stable non-free
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http: //packages.microsoft.com/repos/code stable main
Info:
  Processes: 352 Uptime: 2d 18h 43m Memory: 11.38 GiB used: 7.99 GiB (70.2%) Init: systemd v: 249
  runlevel: 5 Compilers: gcc: 11.3.0 alt: 11 Client: Unknown python3.10 client inxi: 3.3.13
Last edited by LockBot on Fri Aug 04, 2023 10:00 pm, edited 6 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Pastebin of my system info: https://pastebin.com/Vb59DJRW
jmholla
Level 1
Level 1
Posts: 3
Joined: Sun Feb 05, 2023 2:20 am

Re: Audio control buttons are linked to the wrong application

Post by jmholla »

I am also seeing this with Firefox and Spotify.

I, too, have ensured that Spotify is selected, going so far as to leave it open and seeing that Spotify is selected, the keyboard shortcuts control Youtube in Firefox.

I think the player and keyboard shortcuts may not be linked. The player in the pop-up is what is selected, and the buttons there control it, just the keyboard shortcuts do not.

I've ruled out last opened application as what gets control as well as last manually controlled music source. At one point during my debugging I managed to get it to control Spotify again but I'm not exactly sure what sequence caused it.

I'll post here if I find out anything else. Mostly wanted to let you know that you are not alone.
jmholla
Level 1
Level 1
Posts: 3
Joined: Sun Feb 05, 2023 2:20 am

Re: Audio control buttons are linked to the wrong application

Post by jmholla »

I just posted a response, that's awaiting moderator approval, but I think I've found a workaround: https://unix.stackexchange.com/question ... linux-mint

Firefox has a similar key in about:config media.hardwaremediakeys.enabled. If you set that to false you'll be back to controlling Spotify. You won't be able to control Firefox/Chrome media anymore with your keys, but if you're like me, you never wanted to in the first place.
Domojestic
Level 2
Level 2
Posts: 91
Joined: Tue Jan 03, 2023 5:32 pm

Re: Audio control buttons are linked to the wrong application

Post by Domojestic »

jmholla wrote: Sun Feb 05, 2023 2:32 am I just posted a response, that's awaiting moderator approval, but I think I've found a workaround: https://unix.stackexchange.com/question ... linux-mint

Firefox has a similar key in about:config media.hardwaremediakeys.enabled. If you set that to false you'll be back to controlling Spotify. You won't be able to control Firefox/Chrome media anymore with your keys, but if you're like me, you never wanted to in the first place.
This worked! Do reply to this thread with whatever response you've mentioned so I can add it, but for now I'll label this as "solved" and include your current workaround solution.
Pastebin of my system info: https://pastebin.com/Vb59DJRW
jmholla
Level 1
Level 1
Posts: 3
Joined: Sun Feb 05, 2023 2:20 am

Re: [Solved] Audio control buttons are linked to the wrong application

Post by jmholla »

> Do reply to this thread with whatever response you've mentioned so I can add it

It was the message before the one with the solution. I was a bit impatient in the solution response.
Domojestic
Level 2
Level 2
Posts: 91
Joined: Tue Jan 03, 2023 5:32 pm

Re: [Solved] Audio control buttons are linked to the wrong application

Post by Domojestic »

jmholla wrote: Mon Feb 06, 2023 5:24 pm > Do reply to this thread with whatever response you've mentioned so I can add it

It was the message before the one with the solution. I was a bit impatient in the solution response.
Ohh! Sorry, I misunderstoof, I thought you'd posted a response, but in the meantime, that workaround would suffice; not that the workaround was the solution. In any case, the workaround was excellent, so thank you!
Pastebin of my system info: https://pastebin.com/Vb59DJRW
Locked

Return to “Software & Applications”