Restoring the display on Dell Latitude D610

I have a Dell Latitude D610 at work. I don't use its own display very often but when I happen to do it is a bit annoying that the display does not turn on after the lid has been closed. When I tried to search for a solution I found a number of fixes for Linux but none for FreeBSD.

The fix on FreeBSD isn't that complicated. The display can be turned on again using DPMS. This requires a running X session to work.

Insert the following lines into /etc/devd.conf:
notify 0 {
        match "system"                  "ACPI";
        match "subsystem"               "Lid";
        match "notify"                  "0x01";
        action "/root/bin/restore_display";
};

Then create a file called /root/bin/restore_display containing the following:
#!/bin/sh

/usr/bin/logger Lid opened, restoring display

export HOME=/home/cfl
export DISPLAY=:0

/usr/local/bin/xset dpms force on

Of course you need to change the home directory to that of the user logged into X.


E-mail Valid XHTML 1.1 Valid CSS!