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?
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?
I have the same pop-up in Ubuntu 16.04, whenever I plug in my headphones:
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/
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.
Another way is to automate the process of closing it:
Make sure you have wmctrl installed:
sudo apt-get install wmctrl
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
Create /etc/acpi/events/headphones-plugged file with the following code:
event=jack/headphone HEADPHONE plug
action=/etc/acpi/headphones-plugged.sh
Activate your event-handler with the following command:
sudo systemctl restart acpid.service
Ask Ubuntu NOT to invent such ANNOYING popups which DESTROY our love for this awesome OS ;)
In System Settings, an option to disable the pop up is available. Check the section Handling unknown audio jack devices of the Ubuntu Wiki.