2026-11-10 21:54:53 +02:00
|
|
|
#!/bin/sh
|
2026-11-10 23:20:13 +02:00
|
|
|
# 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.
|
2026-11-10 21:54:53 +02:00
|
|
|
set -u
|
|
|
|
|
export DISPLAY="${DISPLAY:-:0}"
|
|
|
|
|
case "${1:-}" in
|
|
|
|
|
reinit)
|
2026-11-11 08:23:12 +02:00
|
|
|
timeout 1 xset dpms force off >/dev/null 2>&1 || true
|
2026-11-10 21:54:53 +02:00
|
|
|
sleep 0.08
|
2026-11-11 08:23:12 +02:00
|
|
|
timeout 1 xset dpms force on >/dev/null 2>&1 || true
|
2026-11-10 21:54:53 +02:00
|
|
|
;;
|
|
|
|
|
on)
|
2026-11-11 08:23:12 +02:00
|
|
|
timeout 1 xset dpms force on >/dev/null 2>&1 || true
|
2026-11-10 21:54:53 +02:00
|
|
|
;;
|
|
|
|
|
off)
|
2026-11-11 08:23:12 +02:00
|
|
|
timeout 1 xset dpms force off >/dev/null 2>&1 || true
|
2026-11-10 21:54:53 +02:00
|
|
|
;;
|
|
|
|
|
*)
|
2026-11-10 23:20:13 +02:00
|
|
|
printf 'Usage: %s [reinit|on|off]\n' "${0##*/}" >&2; exit 1 ;;
|
2026-11-10 21:54:53 +02:00
|
|
|
esac
|
|
|
|
|
exit 0
|