Re: Laptop display stays on with lid closed

From: Adam McDougall <mcdouga9_at_egr.msu.edu>
Date: Thu, 21 Dec 2006 07:18:29 -0500
On Wed, Dec 20, 2006 at 11:01:58PM +0300, Andrew Pantyukhin wrote:

  On 12/20/06, Andrew Pantyukhin <infofarmer_at_freebsd.org> wrote:
  >I only noticed this now, thought it is a hardware
  >glitch. My laptop display - and its backlight -
  >stay on when I close the lid. Shouldn't it be
  >turned off like in an OS-independent way?..
  
  To answer my own question, I ended up using a cool
  app named radeontool (sysutils/). Clearly, I'm
  lucky to have a Radeon in my laptop. Now I just
  have to figure out how to call a script on lid
  open/close event.

put into /etc/devd.conf and reload devd:

notify 10 {
        match "system"          "ACPI";
        match "subsystem"       "Lid";
        action                  "/etc/rc.lid $notify";
};

Then in /etc/rc.lid:

#!/bin/sh
STAT=$1 
                                                            
if [ $STAT = 0x00 ]; then                                      
        logger -t Lid $STAT Close at `date +'%Y%m%d %H:%M:%S'`    
	# do something for lid close event here
else                                                        
        logger -t Lid $STAT Open at `date +'%Y%m%d %H:%M:%S'`     
	# do something for lid open event here
fi                            
Received on Thu Dec 21 2006 - 11:18:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC