In Debian 13 Trixie I can use the headphone audio jack just fine until I put the machine to sleep and wake it again. After that the output port (in pavucontrol) is set to Speakers, which results in silence since there's always an external amp plugged into the headphones port, which disconnects the built-in speakers.
If I unplug and plug the cable back in the change is detected and the port switches back to Headphones.
I want it to either remember this setting between sleeps, or detect it properly upon wake. How is that accomplished?