vidcontrol, acpi lid and devd

Jochen Keil <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
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     [email protected]:/usr/obj/usr/src/sys/CHEPHREN  i386
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.