#!/bin/sh # Switch DRM DPMS for whichever GC9305 is behind the gpio13 bus switch. # The cover daemon sends the stock external init separately through the # panel-mipi-dbi-spi debugfs command hook; this helper only stops/restarts # Xorg's framebuffer flushes and the shared backlight power state. set -u export DISPLAY="${DISPLAY:-:0}" case "${1:-}" in reinit) timeout 1 xset dpms force off >/dev/null 2>&1 || true sleep 0.08 timeout 1 xset dpms force on >/dev/null 2>&1 || true ;; on) timeout 1 xset dpms force on >/dev/null 2>&1 || true ;; off) timeout 1 xset dpms force off >/dev/null 2>&1 || true ;; *) printf 'Usage: %s [reinit|on|off]\n' "${0##*/}" >&2; exit 1 ;; esac exit 0