Solution for laptop display going blank after lid close/reopen.

  • Just wanted to share a solution I came up with recently for getting a laptop display to turn back on properly after the lid has been closed/reopened.  I've seen the issue on Dell Latitude D600, D610, D420, and D620 models that I've re-built from salvaged parts, but other makes/models are sure to experience the problem as well.

    I've spent countless hours searching on and off for a solution over the last couple of years and finally took the time to find the root cause between freebsd + the pfSense customizations.

    First, all recent versions of pfsense have "hw.acpi.lid_switch_state" set to "NONE".  This is a good thing for always on applications like pfSense.  Years ago there were some 1.x builds where this was set to S1/S2/S3, so sleep/suspend mode would be initiated when the lid switch was activated.  You can check the value of "hw.acpi.lid_switch_state" by issuing the command "sysctl -a hw.acpi".  (NONE = good)

    Second, you need to load the acpi_video kernel module.  You can load this manually (per reboot) via the command: "kldload acpi_video".  A long term solution that survives a reboot is to add ' acpi_video_load="YES" ' to /boot/loader.conf.

    Third, you need the to set "" after the lid is reopened.  This can be done manually by the command: "sysctl".  Long term you will want the system to do this automatically when a lid switch change occur.  This can be done by adding the following to /etc/devd.conf.

    _#Added to fix issue with LCD staying blank after close/re-open.
    #Lid switch
    notify 0 {
           match "system"         "ACPI";
           match "subsystem"      "Lid";
           match "notify"         "0x00";
           action "sysctl";

    notify 0 {
           match "system"         "ACPI";
           match "subsystem"      "Lid";
           match "notify"         "0x01";
           action "sysctl";

    At this point you need to restart the system for the changes to /etc/devd.conf to take effect.

    An option for additional power savings/heat reduction - Enable PowerD power management in pfSense.  This allows the processor speed to be dymanically adjusted via speedstep or some other method.  In pfsense 2.x you can enable this in the GUI @ System > Advanced > Misc. > Use PowerD.  Personally I set the mode to adaptive and it's been fine for home use with 10 - 15 network devices.  Once enabled, you can see the current CPU speed in the pfSense Dashboard: CPU Type > under the make/model info , Current: xxx MHz, Max: xxxx MHz.  (If you don't see Current/Max, PowerD isn't enabled.)

    For refference, my kill-a-watt shows:

    D420 1.2ghz C2D + mechanical HD + docking station + intel dual gigabit card + all USB/wifi/serial/etc disabled: 24 watts at idle, lid closed.

    D420 1.2ghz C2D + mechanical HD + on board nic + generic "pluggable" usb 2.0 gbit nic: 18-19 watts at idle, lid closed.

    D620 2ghz C2D + mechanical HD + extras disabled + on board nic + cisco usb300m usb nic: 22-23 wt at idle, lid closed.  (No noticiable difference using 60wt vs 90wt power brick.)

    D620 + mechanical HD + onboard usb/nic/extras disabled + docking station + intel dual gbit NIC: 31-33 wt at idle, lid closed.

    SUPERMICRO SYS-5015A-EHF (1U Intel Atom D510 + onboard dual Gigabit + mechanical 2.5" HD): 26 wt at idle.  (Due to the built in power supply fan being too noisy + all the onboard sata connections, I'm moving this from pfsense duty to a full tower case + quiet PS for NAS use.

    Hope this helps for folks doing laptop builds in the future.

    Note: I'm not a fan of using USB or cardbus nics with freebsd/pfsense due to driver and timeout/reset issues.  The usb nics mentioned above have not been used for more than a day or so to verify basic functionality and pull power draw stats.

    Keywords: Laptop Display Blank Acpi Lid LCD open close

  • Thanks for sharing. I'm sure many will find this of use in the future.

    USB NICs tend to be hit and miss, but I know there are a lot of people using cardbus with no issues. One test system I used to use a lot had two 3Com (xl driver) cardbus NICs and never had an issue. Those seem to work well for a lot of people. I can't say I've used any other than the 3Com though.

  • Yes thanks for sharing this.  Intend to look into the video blanking stuff after first of the year.  Though on my DELL Inspiron 5100 closing the lid seems to do nothing other than turning off the display and pfSense continues to run just fine.  Would like to turn off display (including backlight) without closing the lid/display.

    Turned on PowerD with Adaptive setting and that seems to work fine.  However when set to Hiadaptive the current/max display in dashboard comes and goes.  One update cycle it with be there then the next gone, then back again and so on.

    Just noticed it comes and goes in Adaptive mode also.  Just less so than in Hiadaptive mode.

Log in to reply