Skip to content

Instantly share code, notes, and snippets.

@Informatic
Created February 24, 2018 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Informatic/792a2cdf62926c5792b27e591eeac696 to your computer and use it in GitHub Desktop.
Save Informatic/792a2cdf62926c5792b27e591eeac696 to your computer and use it in GitHub Desktop.
Raspberry Pi xscreensaver DPMS fix

This script will watch for xscreensaver blanking event and disable actual HDMI output accordingly.

#!/bin/bash
set -e
sudo -u pi xscreensaver-command -watch | while read state ts; do
case "$state" in
"BLANK") vcgencmd display_power 0 ;;
"UNBLANK") vcgencmd display_power 1 ;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment