How to switch off a screen laptop under Linux

In this article how to minimise power consumption on a laptop running Linux by switching off the backlight on the screen. This will help save energy as well as reducing the amount of time the fan needs to run. The instructions have been tested on a Dell Latitude C810 running Ubuntu Linux 5.10.

The first part was easy to achieve. It simply required setting the correct governor for the CPU frequency with the following command.

Under Breezy, this is executed at run-level 2 from /etc/rc2.d/S30freq-scaling.

It took a bit more work to get the second result. Out of the box, Breezy does very good power management, but some problems still exist due to the inevitable incompatibility of Linux with some laptops.

The first problem with mine was that ACPI events, such as activation of the lid button, were not reported by the kernel. To fix this, an additional option had to be passed to the kernel at boot time by modifying GRUB’s menu.lst as follows.

The second problem seems to be related to the NVIDIA Linux driver that prevents the screen from switching off with xset dpms force off. The solution is to use _vbetool_, which is marked as causing un-expected behaviour in the “man” pages. Nevertheless, I tried it with the Dell Latitude C810 and found it to work fine.

I created the following script to turn the screen on or off. (This actually controls the backlight and does not just blank/unblank the screen.)

Using this script, after Linux boots, the screen can be switched off by issuing the following command.

Alternatively, screen de-activation can be automated by including this command in an appropriate run-level. The same script can also be used to improve the built-in ACPI-related scripts, for example, for suspend, sleep or hibernate power-saving.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: