Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Sep 2009 14:14:59 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        Mark Andrews <marka@isc.org>
Cc:        Lars Engels <lars.engels@0x20.net>, freebsd-mobile@freebsd.org
Subject:   Re: Dell M4400 && power-off the display on Lid close (8-CURRENT / Xorg)
Message-ID:  <20090910121459.GA5007@current.Sisis.de>
In-Reply-To: <200909082346.n88NkaLv040439@drugs.dv.isc.org>
References:  <20090820081055.GA2962@current.Sisis.de> <20090908082123.GR38884@e.0x20.net> <20090908144050.GA6014@current.Sisis.de> <200909082346.n88NkaLv040439@drugs.dv.isc.org>

next in thread | previous in thread | raw e-mail | index | archive | help
El día Wednesday, September 09, 2009 a las 09:46:36AM +1000, Mark Andrews escribió:

> I call this on lid events which works even when X isn't running. :-)

Would be nice, but ...

> notify 10 {
>         match "system"          "ACPI";
>         match "subsystem"       "Lid";
>         action "/etc/rc.lid $notify";
> };
> 
> /etc/rc.lid:
> #!/bin/sh
> # deal with lid switch events
> 
> if [ "x$1" = x0x00 ]; then
>         /usr/bin/logger -t Lid Closed at `/bin/date`
>         /sbin/sysctl hw.acpi.video.lcd0.active=0
> else
>         /usr/bin/logger -t Lid Opened at `/bin/date`
>         /sbin/sysctl hw.acpi.video.lcd0.active=1
> fi

... I don't have 'hw.acpi.video.lcd0.active', only:

# sysctl -a | fgrep hw.acpi
hw.acpi.supported_sleep_state: S3 S4 S5
hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S3
hw.acpi.lid_switch_state: NONE
hw.acpi.standby_state: NONE
hw.acpi.suspend_state: S3
hw.acpi.sleep_delay: 1
hw.acpi.s4bios: 1
hw.acpi.verbose: 0
hw.acpi.disable_on_reboot: 0
hw.acpi.handle_reboot: 0
hw.acpi.reset_video: 0
hw.acpi.acline: 1
hw.acpi.battery.life: 80
hw.acpi.battery.time: -1
hw.acpi.battery.state: 2
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 5
hw.acpi.thermal.min_runtime: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.user_override: 0
hw.acpi.thermal.tz0.temperature: 42,5C
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.passive_cooling: 0
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0._PSV: -1
hw.acpi.thermal.tz0._HOT: -1
hw.acpi.thermal.tz0._CRT: 107,0C
hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz0._TC1: -1
hw.acpi.thermal.tz0._TC2: -1
hw.acpi.thermal.tz0._TSP: -1
hw.acpi.cpu.cx_lowest: C1
# sysctl -a | fgrep lcd0

	matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru@unixarea.de> - w http://www.unixarea.de/
People who hate Microsoft Windows use Linux but people who love UNIX use FreeBSD.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090910121459.GA5007>