How to switch off a screen laptop under Linux

In this post, I describe how to write a shell script that switches off a laptop screen. The instructions are tested with Ubuntu Linux 5.10 (Breezy) on a Dell Latitude C810. First, set the governor for the CPU frequency with the following command. echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor This command can be run automatically at run-level …