From owner-freebsd-current@FreeBSD.ORG Fri Jan 30 10:36:42 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9781716A4CE for ; Fri, 30 Jan 2004 10:36:42 -0800 (PST) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 6F38A43D2F for ; Fri, 30 Jan 2004 10:36:41 -0800 (PST) (envelope-from nate@root.org) Received: (qmail 126 invoked by uid 1000); 30 Jan 2004 18:36:35 -0000 Date: Fri, 30 Jan 2004 10:36:35 -0800 (PST) From: Nate Lawson To: Anish Mistry In-Reply-To: <200401282000.15594.mistry.7@osu.edu> Message-ID: <20040130102141.F99864@root.org> References: <200401272247.59306.freebsd-current@webteckies.org> <20040129060727.619f3866.taku@cent.saitama-u.ac.jp> <200401282000.15594.mistry.7@osu.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: acpi-jp@jp.FreeBSD.org Subject: Re: [acpi-jp 3030] Re: API to turn off the display X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2004 18:36:42 -0000 On Wed, 28 Jan 2004, Anish Mistry wrote: > On Wednesday 28 January 2004 04:07 pm, Taku YAMAMOTO wrote: > ... > > > > I wrote a driver that handles what John told. > > > > http://access.cent.saitama-u.ac.jp/~taku/freebsd/acpi_vid-20031013.tar.gz > > MD5 (acpi_vid-20031013.tar.gz) = adbfa6931e505544fb784e00c7b974e7 > > > > This driver uses ACPI video extension to control display switching and > > backlight brightness. So working ACPI is a requisition for this driver. > > > > Whether it does or does not work depends heavily on how well the BIOS > written, > > however, I hope it worth trying. > > > > Suggestions, working/not-working reports etc are very appreciated. > > It attaches and detects the displays: > littleguy# sysctl hw.acpi.video > hw.acpi.video.crt0.active: 0 > hw.acpi.video.lcd0.active: 1 > hw.acpi.video.tv0.active: 0 > > But trying to turn off the LCD doesn't work: > littleguy# sysctl hw.acpi.video.lcd0.active=0 > hw.acpi.video.lcd0.active: 1 -> 1 > > Tried to connect the tvout and activate it, but the sysctl showed 0, even > though it was displaying to the TV. Twiddling this sysctl while the tv > out was active yielded the same results as the lcd, except it stayed at 0. > > My laptop's asl: > http://am-productions.biz/debug/littleguy.asl Thanks for writing this driver, Yamamoto-san. A few comments: 1. Use acpi_UserNotify() like in acpi_acad.c so userland knows about notifies. 2. Use the package convenience routines like acpi_cmbatt.c (routines in acpivar.h and acpi_package.c). 3. Remove power_profile hooks and use /etc/power_profile and /etc/defaults/rc.conf (similar to acpi_cpu). This way every driver does not have performance/economy sysctls but instead they can be set in rc.conf. 4. You may find some examples from /sys/i386/acpica/acpi_toshiba.c useful. I would like to import this after some work. Thanks, -Nate