This has been very frustrating as I initially thought Ubuntu would not sleep because of the graphics drivers. I figured out it would not sleep when the mythtv backend service was running. It would just sit there with a blinking cursor and totally unresponsive.
To have Ubuntu disable mythtv backend service before sleep and start it again after waking up we need to add a file to /etc/pm/sleep.d/*file name*
case "$1" in