I've tried reinstalling alsa and pulseaudio and that didn't fix it.
Output also doesn't work after I reboot (no speaker in tray) but I can fix that with a pulseaudio -k
- Edit: this doesn't happen anymore after reinstalling kubuntu 
Edit 2: I was wrong. This still happens.
I am on Kubuntu 20.10 running on a nvidia optimus laptop (acer predator 300 to be exact).
Things I've tried:
- Removing pulseaudio config files
- tried adjusting sliders in alsa-mixer
- reinstalled pulseaudio and alsa after removing them
- Reinstalled kubuntu. Livecd doesn't pick up the headphone audio, Laptop only does this after installing which makes me think this is a driver/kernel issue (that I don't know how to fix)
How I know that it's a software problem and not a mic/headphone problem:
- tried using different headphones/earphones
- connected earphones through a splitter so that the mic input from the earphones get ignored. Laptop somehow still picked up the system output which is only possible if it was looping it back.
- The audio which is looping back is very clear. If it was picked up on the earphone mic it would be of noticeably low quality
Thanks.
contents of:
/etc/pulse/default.pa
pactl list short sources
arecord -l
 
     
    