34

Every time I plug in my headphones, Ubuntu shows a popup box asking whether I've plugged in headphones, a headset, or a microphone.

How do I get it to stop doing this?

Eric Carvalho
  • 55,453

4 Answers4

6

I have the same pop-up in Ubuntu 16.04, whenever I plug in my headphones:

Audio Device Pop-Up box

Apparently, there was an option to disable it in the previous versions, mainly because of the changing hardware for headsets. Previously, there used to be different jacks for speakers and microphones, but today's machines have merged them into one. Different standards too cause problems in autodetection.

Have a read here: http://voices.canonical.com/david.henningsson/2014/03/07/headset-jacks-on-newer-laptops/

3

You can lie to Alsa by appending

options snd-hda-intel model=headset-mic

onto the end of /etc/modprobe.d/alsa-base.conf, followed by a reboot.

This works for XPS15 under Ubuntu 19.04 and 19.10 but it should also work for any Intel-based audio card.

Josip Medved
  • 141
  • 3
0

Another way is to automate the process of closing it:

  1. Make sure you have wmctrl installed:

    sudo apt-get install wmctrl

  2. create /etc/acpi/headphones-plugged.sh script with the following code, and DO make sure your replace put-your-username-here placeholder with the user you are running your Gnome Shell with:

    #!/bin/bash

    #logger Headphones Plugged - Closing Unknown Audio Device window

    su - put-your-username-here -c "env DISPLAY=:0 /usr/bin/wmctrl -F -c 'Unknown Audio Device'"

    #logger Closed Unknown Audio Device Window

  3. Create /etc/acpi/events/headphones-plugged file with the following code:

    event=jack/headphone HEADPHONE plug

    action=/etc/acpi/headphones-plugged.sh

  4. Activate your event-handler with the following command:

    sudo systemctl restart acpid.service

  5. Ask Ubuntu NOT to invent such ANNOYING popups which DESTROY our love for this awesome OS ;)

-1

In System Settings, an option to disable the pop up is available. Check the section Handling unknown audio jack devices of the Ubuntu Wiki.

Melebius
  • 11,750
BDRSuite
  • 3,196
  • 1
  • 13
  • 11