We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 258e28b commit 6f19dacCopy full SHA for 6f19dac
scheduler/scripts/amd64/backlight_off.sh
@@ -1,3 +1,9 @@
1
#!/bin/bash
2
3
-/usr/sbin/vbetool dpms off
+/usr/sbin/vbetool dpms off 2>/dev/null
4
+
5
+# fallback to sysfs if vbetool fails
6
+if [ $? -ne 0 ]; then
7
+ # source https://unix.stackexchange.com/a/504839
8
+ echo -n 4 > /sys/class/backlight/*/bl_power
9
+fi
scheduler/scripts/amd64/backlight_on.sh
-/usr/sbin/vbetool dpms on
+/usr/sbin/vbetool dpms on 2>/dev/null
+ # source: https://unix.stackexchange.com/a/504839
+ echo -n 0 > /sys/class/backlight/*/bl_power
0 commit comments