-
For your first point you’d probably want to investigate why your system doesn’t suspend or what exactly is going on. You could check logind.conf, specifically the HandleLidSwitch* keys. Otherwise, your lid switch should have a corresponding /dev/input/ event that you could maybe listen to or something.
-
I can’t offer much input on your second point. I think unplugging the audio jack should probably trigger a udev event that you could write a rule for. No idea about wireplumber though.
Fuck character limits for names. Looking at you, ABAP.