Device: HP EliteBook 2760p
Distro: elementary OS Loki (based on Ubuntu 16.04)
Linux kernel: 4.4.0-112-generic
tl;dr No matter what I've tried, I can't make sound come out of my headphones and only my headphones. However, I can make sound come out of my headphones and speakers at the same time.
When no headphones are plugged in, sound plays out of the speakers fine. Below are screenshots of my system when no headphones are plugged in and sound is playing out of the speakers. Everything is bueno.
When I plug in headphones, all sound cuts off. No audio comes out of the headphones or speakers.
Below are screenshots of the same areas, except all I do is plug in headphones. I change no other configuration, and the screens automatically look this way.
System Settings > Sound: When headphones are plugged in, the output device changes from "Speakers" to "Headphones" under Settings > Sound. No sound plays through the headphones.
pavucontrol: The port switched to "Headphones (plugged in)".
If I open pavucontrol and go under Output Devices,
Headphones (plugged-in) is selected. If I change that dropdown to
Speakers (unavailable) sounds starts playing out of the headphones, but the same audio simultaneously plays out of the computer's internal speakers. I cannot figure out how to make sound play out of the headphones and not the internal speakers.
In the screen above, sound comes out of both my headphones and the internal speaker at the same time.
I don't recall having this issue on this device in the past. I left the device in a closet without a hard drive for a year. Then I cloned a hard drive from another laptop and put it in (ie the OS was installed on a different device). I'm wondering if reinstalling the OS will fix it, but I'd rather not do that if I can fix it another way.