Some laptops will have muted headphones on plug-in
Some laptops have weird soundcard configurations, mine in particular does something funky whenever I plug in headphones, as headphone volume is tied to the speaker channel in alsa. Whenever headphones are plugged in this channel is muted and turned to the lowest setting, it doens't matter whether the setting is muted or not (if it's not muted the sound plays in the speakers too though, so we actually want it to be muted, we just want the channel volume setting to be at 100%) if its in but what does matter is it's volume setting, it needs to be at max for headphones to output sound correctly.
Others have had the same issue and found a solution
When on pulseaudio, to fix the issue you go to /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
And change
[Element Speaker]
switch = off
volume = off
to
[Element Speaker]
switch = off
volume = merge
And now I am in need of a pipewire equivalent.
Right now my workaround is to run an alias command for: amixer -c 0 set Speaker 100
Everytime I plug my headphones in.
It wouldn't be that bad if that was all it was but sometimes the speaker setting gets reset (for instance I opened some wine application yesterday and it somehow reset this setting, in addition, it for some reason wouldn't play sound through the easyeffects sink, and would only play through the default output device, not sure if that's a pipewire issue or an easyeffects issue or a wine issue, not bothering to make an issue for it)
Either way, I need a way to do this in pipewire, to tell pipewire not to turn down the speaker volume when headphones are detected.
As a funny side note, on Windows the issue presented itself by simply not detecting headphones properly, I'd plug 'em in and get a detection prompt without an option for headphones, and then it wouldn't play sound through 'em and just kept using the speakers, to actually use headphones on windows I had to reboot, even turning the soundcard off and on again was not sufficient to get it working