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
  • 54,385
  • 1
    Please, can you provide a screenshot of what you have? Thanks. – ThunderBird Feb 07 '18 at 21:23
  • This behaviour seems to have changed in recent (17.10+) Ubuntu versions, quote " The dialog changed in Ubuntu 17.10. The behaviour is much friendlier now. " – Robert Riedl Feb 20 '18 at 12:20
  • Try reinstalling the audio drivers on your computer. You also can try before this to Open realtek, click the little folder on the top right hand side next to "Analog" and check the box that says "Enable Pop-UP. – Andrew Rodgers Apr 12 '18 at 15:17
  • 1
    This is really annoying. HUGE STEP BACK. Not only Ubuntu team added this stupid popup, but they won't even provide a checkbox to get rid of it! This "user genocide" is not new to ubuntu, we still remember the times when they replaced Gnome with Unity. – Kostyantyn Aug 26 '20 at 07:07

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.

  • 1
    It worked to my also. Ubuntu 20.04 Dell G3 3579. My processor is Intel – Guilherme Parreira Jul 29 '20 at 16:47
  • Looks nice, but isn't there a more dynamic way to do this ? e.g. restarting a service rather than rebooting ? – Balmipour Sep 22 '20 at 09:02
  • On my Ubuntu 20.04 with Unity, Dell Precision 5560 with my HyperX headset plugged in by 3.5mm jack, this does not work perfectly. It works for the output part in that the output switches over to headphone output (without the popup), but the input is still the "Built-in Audio" (that remains the only option). – Garrett Aug 16 '21 at 05:27
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 ;)

Kostyantyn
  • 576
  • 5
  • 11
-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,431
  • 9
  • 52
  • 78
BDRSuite
  • 3,156
  • 1
  • 12
  • 11
  • 3
    There's no "When an unknown audio device is plugged in" dropdown menu. Also, my popup looks almost identical to the one in the wiki drawing, but there's no checkbox saying "Use this choice from now on". – Robi Rahman Dec 31 '14 at 12:22
  • 1
    That drawing was a proposal. The checkbox was never implemented as there is no way to unset in currently: https://bugs.launchpad.net/ubuntu/+source/unity-settings-daemon/+bug/1239605/comments/9 – tallus Jun 02 '16 at 21:31
  • 4
    There's plenty of discussion surrounding this here https://bugs.launchpad.net/ubuntu/+source/unity-settings-daemon/+bug/1297790 but no solution yet – hellocatfood Sep 06 '16 at 11:41