Re: vidcontrol, acpi lid and devd

Jochen Keil <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
Hi again.

I just found this thread: http://lists.freebsd.org/pipermail/freebsd-current/2004-January/thread.html#19836

Someone posted a kernel module which (hopefully) gives control over the display.

Unfortunately the site isn't accessible from here. It would be great if someone can put it online somewhere else or send it to me via email.

I'll also give the radeontools a try although i've not been very lucky with linux related software yet..

Sorry for wasting your time but maybe there are some other (and easier) ways to achieve my goals.

Regards,

Jochen


On Fri, 7 May 2004 14:56:32 +0200
Jochen Keil <[email protected]> wrote:

> 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]"
> 
>  ** CRM114 Whitelisted by: @chephren.lokal.lan **
>  
>  ** ACCEPT: CRM114 Whitelisted by: @chephren.lokal.lan **
>  
> 
> -=-Extra Stuff-=-
> 
>  Return-Path: <[email protected]>
> X-Flags: 0000
> Delivered-To: GMX delivery to [email protected]
> Received: from pop.gmx.net [213.165.64.20]
> 	by localhost with POP3 (fetchmail-6.2.5)
> 	for jochen@localhost (single-drop); Fri, 07 May 2004 15:05:08 +0200 (CEST)
> Received: (qmail 1268 invoked by uid 65534); 7 May 2004 12:57:54 -0000
> Received: from mx2.freebsd.org (EHLO mx2.freebsd.org) (216.136.204.119)
>   by mx0.gmx.net (mx017) with SMTP; 07 May 2004 14:57:54 +0200
> Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18])
> 	by mx2.freebsd.org (Postfix) with ESMTP
> 	id 46EA356941; Fri,  7 May 2004 05:57:42 -0700 (PDT)
> 	(envelope-from [email protected])
> Received: from hub.freebsd.org (localhost [127.0.0.1])
> 	by hub.freebsd.org (Postfix) with ESMTP
> 	id 70A4116A4CF; Fri,  7 May 2004 05:57:38 -0700 (PDT)
> Delivered-To: [email protected]
> Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
> 	by hub.freebsd.org (Postfix) with ESMTP id 04EA016A4D0
> 	for <[email protected]>;
> 	Fri,  7 May 2004 05:57:04 -0700 (PDT)
> Received: from sillium.dyndns.org (DSL01.212.114.233.75.NEFkom.net
> 	[212.114.233.75])
> 	by mx1.FreeBSD.org (Postfix) with ESMTP id AD2DB43D45
> 	for <[email protected]>;
> 	Fri,  7 May 2004 05:57:02 -0700 (PDT)	(envelope-from [email protected])
> Received: (qmail 72449 invoked from network); 7 May 2004 12:59:31 -0000
> Received: from chephren.lokal.lan (192.168.1.3)
>   by MyLocalMailRouter with SMTP; 7 May 2004 12:59:31 -0000
> Date: Fri, 7 May 2004 14:56:32 +0200
>  From: MyEmailName <[email protected]>
> To: [email protected]
> Message-Id: <[email protected]>
> X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10;
> 	i386-portbld-freebsd5.2.1)
> Mime-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> Subject: vidcontrol, acpi lid and devd
> X-BeenThere: [email protected]
> X-Mailman-Version: 2.1.1
> Precedence: list
> List-Id: Mobile computing with FreeBSD <freebsd-mobile.freebsd.org>
> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-mobile>,
> 	<mailto:[email protected]?subject=unsubscribe>
> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-mobile>
> List-Post: <mailto:[email protected]>
> List-Help: <mailto:[email protected]?subject=help>
> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-mobile>,
> 	<mailto:[email protected]?subject=subscribe>
> Sender: [email protected]
> Errors-To: [email protected]
> X-GMX-Antivirus: -1 (not scanned, may not use virus scanner)
> X-GMX-Antispam: -2 (not scanned, spam filter disabled)
> 
> 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,
>  MyEmailName
> 
> 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]"
> 
>  
>   
>   
>  -0-0-0- 
_______________________________________________
[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.