How to stop Plasma from autoplaying media when connecting to bluetooth-headset?

Hi. KDE Plasma (I guess) starts autoplaying youtube-videos from last active yt-tab or last VLC-track (that were stopped beforhand), after I activated my bluetooth-headset to pick up a phonecall and hang up. When it connects the usual way, there is no issue. I really want to stop that behaviour - and no, closing the yt-tab is not an option, sorry. :wink:

Thanks a lot for your help!

System-infos from inxi:

System:
  Kernel: 4.14.219-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: \vmlinuz-4.14-x86_64 
  cryptdevice=UUID=0191ff3e-4c21-4388-8f3b-a0d93a4f6fc6:crypt_dev 
  root=/dev/mapper/LVM_SSD-root ro initrd=\initramfs-4.14-x86_64.img 
  Desktop: KDE Plasma 5.20.5 tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: LENOVO product: 20BVCT01WW v: ThinkPad T450 
  serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: LENOVO model: 20BVCT01WW v: 0B98417 WIN serial: <filter> UEFI: LENOVO 
  v: JBET64WW (1.28 ) date: 03/16/2017 
Battery:
  ID-1: BAT0 charge: 10.1 Wh condition: 10.2/23.5 Wh (43%) volts: 12.4/11.4 
  model: LGC 45N1113 type: Li-ion serial: <filter> status: Unknown 
  ID-2: BAT1 charge: 13.2 Wh condition: 13.5/23.5 Wh (57%) volts: 12.6/11.4 
  model: LGC 45N1127 type: Li-ion serial: <filter> status: Unknown 
CPU:
  Info: Dual Core model: Intel Core i5-5200U bits: 64 type: MT MCP 
  arch: Broadwell family: 6 model-id: 3D (61) stepping: 4 microcode: 24 
  L2 cache: 3 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 17566 
  Speed: 823 MHz min/max: 500/2700 MHz Core speeds (MHz): 1: 823 2: 840 3: 811 
  4: 861 
  Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
  Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
  Type: mds 
  status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass status: Vulnerable 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 
  mitigation: Full generic retpoline, STIBP: disabled, RSB filling 
  Type: srbds status: Vulnerable: No microcode 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel HD Graphics 5500 vendor: Lenovo driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:1616 class ID: 0300 
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus ID: 1-8:5 
  chip ID: 04f2:b449 class ID: 0e02 serial: <filter> 
  Display: x11 server: X.Org 1.20.10 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 hz: 60 dpi: 157 size: 310x170mm (12.2x6.7") 
  diag: 354mm (13.9") 
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.3.4 
  compat-v: 3.1 direct render: Yes 
Audio:
  Device-1: Intel Broadwell-U Audio vendor: Lenovo driver: snd_hda_intel 
  v: kernel bus ID: 00:03.0 chip ID: 8086:160c class ID: 0403 
  Device-2: Intel Wildcat Point-LP High Definition Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:9ca0 
  class ID: 0403 
  Sound Server: ALSA v: k4.14.219-1-MANJARO 
Network:
  Device-1: Intel Ethernet I218-V vendor: Lenovo driver: e1000e v: 3.2.6-k 
  port: 3080 bus ID: 00:19.0 chip ID: 8086:15a3 class ID: 0200 
  IF: enp0s25 state: down mac: <filter> 
  Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel port: efa0 
  bus ID: 03:00.0 chip ID: 8086:095b class ID: 0280 
  IF: wlp3s0 state: up mac: <filter> 
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
  bus ID: 1-7:6 chip ID: 8087:0a2a class ID: e001 
  Message: Required tool hciconfig not installed. Check --recommends 
Drives:
  Local Storage: total: 476.94 GiB used: 80.3 GiB (16.8%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: SanDisk model: SD7SB2Q512G1001 
  size: 476.94 GiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: 0001 scheme: GPT 
Partition:
  ID-1: / raw size: 40 GiB size: 39.12 GiB (97.81%) used: 31.95 GiB (81.7%) 
  fs: ext4 dev: /dev/dm-1 maj-min: 254:1 mapped: LVM_SSD-root 
  ID-2: /boot raw size: 511 MiB size: 510.7 MiB (99.95%) used: 199 MiB (39.0%) 
  fs: vfat dev: /dev/sda1 maj-min: 8:1 
  ID-3: /home raw size: 420 GiB size: 412.41 GiB (98.19%) 
  used: 48.16 GiB (11.7%) fs: ext4 dev: /dev/dm-2 maj-min: 254:2 
  mapped: LVM_SSD-home 
Swap:
  Alert: No Swap data was found. 
Sensors:
  System Temperatures: cpu: 50.0 C mobo: N/A 
  Fan Speeds (RPM): cpu: 0 
Info:
  Processes: 191 Uptime: 3h 01m wakeups: 3 Memory: 15.55 GiB 
  used: 3.56 GiB (22.9%) Init: systemd v: 247 Compilers: gcc: 10.2.0 Packages: 
  pacman: 1706 lib: 425 flatpak: 0 Shell: Zsh v: 5.8 running in: yakuake 
  inxi: 3.3.01

So if I undertand this correctly, the behaviour is:

  • Music is playing
  • Call comes in
  • Call stops
  • Music continues playing where it left off

And you want this behaviour to stop when you connect a Bluethooth headset on all applications that are playing music???

:thinking:

Not exactly.

  • music / yt ist playing, headset is turned off
  • music / yt is stopped
  • (time goes by)
  • call comes in
  • I activate headset to pick up call
  • call stops
  • music / yt starts playing in headset

otherwise the behaviour would be totally fine! :slight_smile:

(edited original post for better understanding)

1 Like

So for anyone having the same issue, I found a workaround
here,
that fixes at least autoplay from firefox:

  • enter about:config in Firefox’s address bar
  • search for hardwaremediakeys
  • disable it (=set to false)

As this does not fix the weird behaviour of the plasma media-widget in special cases of Bluetooth connection for any other media-application like VLC, I am still quite interested in any suggestions regarding the primary problem.

1 Like

I’ve marked this answer as the solution to your question as it is by far the best answer you’ll get.

However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldn’t have done this or :heart: or :+1: if you agree)

:innocent:
P.S. In the future, please don’t forget to come back and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

1 Like

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