1

Context: Debian/testing on a ASRock B450 with Ryzen 2200G, HDMI monitor.

In order to reset Pulseaudio default sink I need to know when the monitor comes back from standby so that I can run a script to change the default PA sink and, possibly, move existing streams.

So far, these are my options, sorted by increasing difficulty and efficiency:

  1. polling /sys/class/drm/card0-HDMI-A-1/dpms
  2. parsing the output of "xset"
  3. parsing the output of "pactl subscribe" (as suggested in the linked question)
  4. writing a Pulseaudio application (idem)

I have tried using "udevadm monitor" but apparently only plug / unplug events are tracked, not standby / wakeup. Is there an easy way to do this? By that I mean as easy as writing a udev rule can be. I'm asking out of curiosity, really, since polling the dpms file would work nicely: it is accurate and reasonably robust, since it requires no parsing.

0

0

You must log in to answer this question.

Browse other questions tagged .