Media autoplays when earphone connected

I've recently noticed that whenever my earphones are connected to my laptop...
Whatever media(audio/video) is paused in the background, resumes playing automatically...
If I try to pause it...It automatically resumes to play again...
The only way to stop it from autoplaying again is disconnecting the earphones...

I had not noticed such behaviour when I had installed the OS...

For now, I have observed this to happen on Spotify, MPV player for audio and YouTube, KhanAcademy for video...

My System Specs(from Garuda Assistant)

System:    Kernel: 5.10.61-1-lts x86_64 bits: 64 compiler: gcc v: 11.1.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts 
           root=UUID=59a5503e-fcee-4e1c-8787-e3f6172b5eaa rw [email protected] quiet splash 
           rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 
           loglevel=3 
           Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM 
           Distro: Garuda Linux base: Arch Linux 
Machine:   Type: Laptop System: LENOVO product: 80XH v: Lenovo ideapad 320-15ISK serial: <filter> 
           Chassis: type: 10 v: Lenovo ideapad 320-15ISK serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <filter> UEFI-[Legacy]: LENOVO 
           v: 4WCN37WW date: 12/04/2017 
Battery:   ID-1: BAT0 charge: 15.4 Wh (75.5%) condition: 20.4/30.0 Wh (68.0%) volts: 7.6 min: 7.4 
           model: LGC L16L2PB2 type: Li-poly serial: <filter> status: Discharging 
CPU:       Info: Dual Core model: Intel Core i3-6006U bits: 64 type: MT MCP arch: Skylake 
           family: 6 model-id: 4E (78) stepping: 3 microcode: EA cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 15999 
           Speed: 2000 MHz min/max: 400/2000 MHz Core speeds (MHz): 1: 2000 2: 2000 3: 2000 
           4: 2000 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
           Type: l1tf mitigation: PTE Inversion 
           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 520 vendor: Lenovo driver: i915 v: kernel bus-ID: 00:02.0 
           chip-ID: 8086:1921 class-ID: 0300 
           Device-2: Syntek EasyCamera type: USB driver: uvcvideo bus-ID: 1-8:3 chip-ID: 174f:241a 
           class-ID: 0e02 
           Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: intel 
           unloaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: eDP1 res: 1920x1080 dpi: 143 size: 340x190mm (13.4x7.5") diag: 389mm (15.3") 
           OpenGL: renderer: Mesa Intel HD Graphics 520 (SKL GT2) v: 4.6 Mesa 21.2.1 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel 
           v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 chip-ID: 8086:9d70 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.61-1-lts running: yes 
           Sound Server-2: sndio v: N/A running: no 
           Sound Server-3: JACK v: 1.9.19 running: no 
           Sound Server-4: PulseAudio v: 15.0 running: no 
           Sound Server-5: PipeWire v: 0.3.34 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo 
           driver: r8169 v: kernel port: 3000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp1s0 state: down mac: <filter> 
           Device-2: Intel Dual Band Wireless-AC 3165 Plus Bluetooth driver: iwlwifi v: kernel 
           port: 3000 bus-ID: 02:00.0 chip-ID: 8086:3166 class-ID: 0280 
           IF: wlp2s0 state: up mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
           bus-ID: 1-7:2 chip-ID: 8087:0a2a class-ID: e001 
           Report: bt-adapter ID: hci0 rfk-id: 3 state: down bt-service: enabled,running 
           rfk-block: hardware: no software: no address: <filter> 
Drives:    Local Storage: total: 931.51 GiB used: 41.75 GiB (4.5%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10SPZX-24Z10T0 
           size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD 
           rpm: 5400 serial: <filter> rev: 1A01 scheme: MBR 
Partition: ID-1: / raw-size: 589.23 GiB size: 589.23 GiB (100.00%) used: 41.75 GiB (7.1%) 
           fs: btrfs dev: /dev/sda4 maj-min: 8:4 
           ID-2: /home raw-size: 589.23 GiB size: 589.23 GiB (100.00%) used: 41.75 GiB (7.1%) 
           fs: btrfs dev: /dev/sda4 maj-min: 8:4 
           ID-3: /var/log raw-size: 589.23 GiB size: 589.23 GiB (100.00%) used: 41.75 GiB (7.1%) 
           fs: btrfs dev: /dev/sda4 maj-min: 8:4 
           ID-4: /var/tmp raw-size: 589.23 GiB size: 589.23 GiB (100.00%) used: 41.75 GiB (7.1%) 
           fs: btrfs dev: /dev/sda4 maj-min: 8:4 
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: zram size: 7.56 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0 
Sensors:   System Temperatures: cpu: 36.5 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 221 Uptime: 31m wakeups: 31354 Memory: 7.56 GiB used: 3.22 GiB (42.6%) 
           Init: systemd v: 249 tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: 
           pacman: 1502 lib: 345 Client: Unknown Client: garuda-assistant inxi: 3.3.06 

What sort of earphones are you referring to?

Does it have built-in media control buttons? (play/pause etc.)

1 Like

Yes it does have those...
But I have ensured that nobody is touching them...
I use them with my phone as well...haven't observed the absurd behaviour...
Moreover, this problem didn't exist when i had just installed Garuda...

If this is something new, it must have been introduced by a recent update of eg pipewire or ALSA (this could be checked in var/log/pacman.log). For sure not in all the players.
If it is a new feature, maybe it has a setting to be disabled in the audio settings?
If it is a bug, I don't know, maybe you could switch to pulseaudio and try with it?

3 Likes