Audio device gone after sleep

I am running mojave on a i5-8400 and a gigabyte z370n board. The board comes with an hdmi 2.0 port which is just an internal converter for a displayport source signal. Sleep generally works with audio remaining functional, however under certain circumstances the entire display port audio device disappears after the machine is being waken up. The box is hooked up to a hdmi switch which i use to cycle between various devices. I managed to narrow down the issue: if the hack goes to sleep while the hdmi switch is left as it is, i see the audio device after resuming from sleep and audio output works fine. If, however, the machine turns into sleep while i switched to another hdmi source such as my chromecast, the display port audio device is gone. I have codec commander installed, and audio layout id set to 7. I also tried multiple darkwake values such as 0, 8 and 10 to no avail. Any ideas?

submitted by /u/fussballbundesfahrer
[link] [comments]