I have ubuntu 16.04 on my laptop and my build in speakers and microphone work great. If I plug in my headphones (headphones A) which don't have a mic, the sound is great.
If I plug in my headphones (headphones B and different ones headphones C) which have a microphone then the sound is glitchy, 30% of the normal volume, and microphone is not working.
I have tested headphones B and C on my phone, and both volume and mic is fine there which means headphones are not damaged. I have tested headphones B and C on another ubuntu machine (18.04) and the situation is identical as in my laptop. Problem occurred roughly at the same time.
Some details: alsamixer (increasing mic boost doesn't help):
Any ideas how to solve this? I think I had this problem years ago, but don't remember the solution