Date: Fri, 7 May 2004 14:56:32 +0200 From: Jochen Keil <j.keil@gmx.de> To: freebsd-mobile@freebsd.org Subject: vidcontrol, acpi lid and devd Message-ID: <20040507145632.560f4df0@chephren.lokal.lan>
next in thread | raw e-mail | index | archive | help
Hello List. Short time ago i've read in an email from this list that it is possible to switch between the terminals with "vidcontrol -sX </dev/console". This works fine for me. The next step i took was modifying my /etc/devd.conf: notify 10 { match "system" "ACPI"; match "subsystem" "Lid"; action "/root/lid_switch $notify"; }; In /root/lid_switch i've written the following: #!/usr/local/bin/bash case $1 in 0x00) vidcontrol -s1 </dev/console ;; 0x01) vidcontrol -s9 </dev/console ;; esac So far everything just works great and the console is switched to ttyv1 when the lid switch is pressed. But while holding the switch down for testing i recognized that the screen turns on after a certain time (around 4-5s). This doesn't happen when i'm switching the console manually (ctrl-alt-F1). I presume that the activity of switching to ttyv1 after disabling the display is to blame for turning it on again. What i'd like to ask: Is there a way to turn the screen of again by software e.g. sending a "Lid closed" statement to the appropriate device (/dev/acpi)? It would be very nice if this could be easily implentend into my lid_switch script :) However, any solution is appreciated. Feel free to ask me if some facts are unclear or not mentioned. Regards, Jochen Keil P.S. Would be running -current an option? jochen@chephren ~> uname -a FreeBSD chephren.lokal.lan 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #3: Mon Mar 29 00:11:42 CEST 2004 jochen@chephren.lokal.lan:/usr/obj/usr/src/sys/CHEPHREN i386
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040507145632.560f4df0>