I gave up and went back to Kodibuntu for the last 8 months. However, the recent update to Kodi 17 completely messed up my Kodibuntu install. I'm getting weird scrolling tearing on the interface. Seems like the fix is to use the closed-source AMD drivers, but the video card is too old to be supported. That, plus Kodibuntu no longer being officially suppoted, means... back to LibreELEC. Which means back to the "no audio on wake" issue.
I'm running v7.95.3 BETA, because I want that Kodi v17 goodness. I decided, what the heck, let's try this stuff out again. sakos's suggestion just caused my entire display to refresh every time I navigated to a new menu item. So, back to the Chromebox solution. Like before, it resolved the audio issue, but this time there was an even worse video issue. The interface was all while and aqua, impossible to make anything out. This time, I decided to try to understand the script.
Looks like xrandr is shutting off HDMI video and audio, then turning HDMI video and audio back on. Well, that's silly. Why do I need to turn off HDMI audio and video, if the machine is going to sleep anyway? I commented out that first xrandr line. Result: When waking up the laptop, audio is working, but video is set to a lower resolution. Hmm. Why do I need to turn HDMI video back on with xrandr? Surely that happens automatically on wake? So I took out the "--auto" portion of the script. Result: on wake, audio is working and video is at the same resolution it was when I put it to sleep!
Here's the script I'm using, modified from the chromebox solution:
s#!/bin/sh
case $1 in
pre)
#xrandr --output HDMI-0 --off --set "audio" "off";
;;
post)
xrandr --output HDMI-0 --set "audio" "on";
;;
esac
I could probably just delete that first xrandr line instead of commenting it out, but I don't know enough about linux to say for sure. Commenting out felt safer. Hopefully this helps others having this same problem.
Note that I'm using HDMI-0 instead of HDMI1. I got that by running xrandr with no arguments, to see what my device was listed as.