Is there a way for the hdmi output to completely turn off. When I leave my pi idle the screen turns black but the screen stays on and never turns off. The monitor turns to off/idle with other computers but it doesn't with the pi, just turns black.
Take a look at this blog post.
According to the author, the kernel framebuffer driver does not have complete power management support. Perhaps future versions of the Raspbian kernel will contain a fix. Until then, the author provides a workaround script that polls to see whether the screen should be off or on and runs
tvservice --off or
tvservice --preferred as appropriate.
You can also try adding the line
hdmi_blanking=1 to /boot/config.txt. It automatically turns off the monitor or TV when the pi blanks the screen. It's not yet implemented on the RPi4, although it works on all previous generations of Raspberry Pis. Video Options
EDIT: It has long been implemented on the Raspberry Pi 4. I just forgot that this comment was out there. Also, there's a setting for screen blanking in the GUI config app and possibly the CLI one. I think that controls the blanking only, and not whether the screen physically turns off. You may still need the above flag for that.
In current firmware you can to turn the monitor off and on with the folowing:
sudo vcgencmd display_power 0
sudo vcgencmd display_power 1
It does not risk changing resolution, and there is no need for fbset, chvt, xrefresh, or restarting your GLES and OMX overlays afterwards.
I've tested it on my Raspberry Pi 3