I was experiencing a similar issue with 16.04 on latest Dell XPS 13 (9350). To resolve it, I ran alsamixer from cli, selected the "Headphone" channel using arrow keys, then pressing "M" to unmute (indicated by a status of "MM"). I had to also increase volume on this same channel. There was an additional channel that was causing distortion/interference once my headphones were unmuted, so I lowered that. Everything is fine after this, though I'm no longer prompted to identify the input device like I used to be on 14.04, which isn't a bad thing if it knows it's a headset.
My take on this would be the following taking advantage of PulseAudio. Assuming that when you log in Ubuntu, you always have your headphones connected, then the following will make sure that when you boot to Ubuntu it will automatically set it as the default Input and Output (Assuming you want both).
On Ubuntu go to the terminal and type the following from which you will only gather the Index Number:
For your OUTPUT DEVICES:
pacmd list-sinks - There will be a lot of information but look for the Index Numbers and the corresponding device that will be your new default Output Device.
For your INPUT DEVICES:
pacmd list-sink-inputs OR
pacmd list-samples - There will be a lot of information but look for the Index Numbers and the corresponding device that will be your new default Input Device. Use the list-samples in case in the list-sink-inputs it does not show.
Right up to this point, on Ubuntu, with your headphones connected, you should have 2 index numbers. One for your input and output. Now we will go and edit your pulseaudio default configuration:
sudo nano /etc/pulse/default.pa
Go to the last line and simply add the following:
set-default-sink 1 - This corresponds to the Output Source after looking at the index of
pacmd list-sinks. The 1 is the index, so change it to the one you got.
set-default-source 5 - This corresponds to the Input Sources after looking at the index of
pacmd list-sink-inputs or
pacmd list-samples. The number 5 is the index, so change it to the one you got.
Save the file an reboot the computer to test. The testing involves checking if you got the correct index value, since some devices have similar names (Like NVIDIA OR INTEL Audio sources).
If everything is correctly setup, every time you boot your computer, you should see Ubuntu sets the default Input/Output to your headphone. Since you are talking about Headphones, for Noise reduction you can use my other answer to help you with that: Realtime noise-removal with PulseAudio?
NOTE: You can also use
pacmd list-sources to see all devices and also instead of using the index number, you can use the name of the assigned device, that look something like this:
alsa_input.usb-Logitech_Logitech_USB_Headset-00.analog-mono.echo-cancel to give you an idea of what names to look for (Super long I know). Names are more accurate to use but harder to remember so you have an option here to use one or the other. The end result using a name, would be like this:
set-default-source alsa_input.usb-Logitech_Logitech_USB_Headset-00.analog-mono.echo-cancel in the default.pa file, just to give you an idea.
For a GUI option, I recommend
pavucontrol or PulseAudio Volume Control. It offers an option to set a device as default/fallback for Input and Output devices. Using both techniques might give you what you want.
I just faced a similar problem.
I also have an HDMI monitor plugged in, so PulseAudio chose it instead of the headphones. After unplugging and plugging the headphone in the audio jack, I can only guess it gave priority back to the headphone and set it as the default.
So the issue for me is that PulseAudio is setting up the wrong profile by default due to my HDMI monitor being present. The headphones are still being detected, just not being used due to the wrong profile.
Solution: Remove any configuration files auto-generated at
Then restart pulseaudio
If you open
pavucontrol, it should be correctly set to a profile matching the headphones.
Then go to the Devices tab and check if Headphones (plugged in) is selected as the default device.