From owner-acpi-jp@jp.FreeBSD.org Tue Sep 23 19:25:28 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id h8NAPSJ33262;
	Tue, 23 Sep 2003 19:25:28 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from hermes.nixsys.be (postfix@hermes.nixsys.be [2001:ab8:2007:0:20c:6eff:fe4b:23f])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet6 id h8NAPQJ33256
	for <acpi-jp@jp.FreeBSD.org>; Tue, 23 Sep 2003 19:25:26 +0900 (JST)
	(envelope-from philip@nixsys.be)
Received: by hermes.nixsys.be (Postfix, from userid 1001)
	id CC8A86D; Tue, 23 Sep 2003 12:25:23 +0200 (CEST)
From: Philip Paeps <philip+freebsd@paeps.cx>
To: acpi-jp@jp.FreeBSD.org
Message-ID: <20030923102523.GG645@hermes.nixsys.be>
Mail-Followup-To: acpi-jp@jp.FreeBSD.org
References: <20030923072516.GC645@hermes.nixsys.be>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="oJ71EGRlYNjSvfq7"
Content-Disposition: inline
In-Reply-To: <20030923072516.GC645@hermes.nixsys.be>
X-Date-in-Rome: ante diem IX Kalendas Octobres MMDCCLVI ab Urbe Condida
X-PGP-Fingerprint: FA74 3C27 91A6 79D5 F6D3 FC53 BF4B D0E6 049D B879
X-Message-Flag: Get a proper mailclient!  Mutt: <http://www.mutt.org/>
User-Agent: Mutt/1.5.4i
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Tue, 23 Sep 2003 12:25:23 +0200
X-Sequence: acpi-jp 2694
Subject: [acpi-jp 2694] Re: Driver for Asus extras
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: philip+freebsd@paeps.cx
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+030902


--oJ71EGRlYNjSvfq7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On 2003-09-23 09:25:16 (+0200), Philip Paeps <philip+freebsd@paeps.cx> wrote:
> I'll write a little manual (asus(4)) later today, and also think about a way
> to handle the events the machine notifies.

A first version of the manual is attached.  My nroff is a little rusty I'm
afraid, but it does parse and looks like a manual too :-)

 - Philip

-- 
Philip Paeps                                          Please don't CC me, I am
                                                       subscribed to the list.

  Nature always sides with the hidden flaw.

--oJ71EGRlYNjSvfq7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="asus.4"

.\"
.\" Copyright (c) 2003 Philip Paeps <philip@paeps.cx>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd 23 September 2003
.Dt ASUS 4
.Os
.Sh NAME
.Nm asus
.Nd Asus Laptop ACPI Extras
.Sh SYNOPSIS
.Cd kldload acpi_asus
.Sh DESCRIPTION
Recent laptops manufactured by 
.Em Asus 
and others sport a number of cool extra
buttons to control the brightness, the volume, and the display.  Many also
come with programmable
.Em hotkeys 
which can be used to launch frequently used applications.
.Pp
This driver allows the user to control indicator leds, LCD brightness, and
output displays using the
.Xr sysctl 8
interface.  Hardware
.Em events
are caught and passed on to be handled in userspace by
.Xr acpid 8 .
.Pp
Currently, the following laptops are fully supported:
.Pp
.Bl -item -offset indent -compact
.It
L2000E
.It
L3400D
.It 
L3500H
.El
.Pp
Using
.Xr sysctl 8 ,
the following can be set:
.Bl -ohang -offset indent
.It Va hw.acpi.asus.bright
Set display brightness.  Can be set to values between 0 and 15, where 0 is
total blackness and 15 causes permanent damage to the eyes.
.It Va hw.acpi.asus.disp
Select output display.  Values between 0 and 7 are bitfiddled (think: bitwise
OR) so that:
.Pp
.Bl -tag -width 10 -offset indent -compact
.It 0
No display
.It 1
LCD only
.It 2
CRT only
.It 3
LCD and CRT
.It 4
TV-Out only
.It 5
LCD and TV-Out
.It 6
CRT and TV-Out
.It 7
LCD and CRT and TV-Out
.El
.Pp
.It Va hw.acpi.asus.mled
Turn the 'mail' indicator on (1) and off (0).
.It Va hw.acpi.asus.wled
Turn the 'wifi' indicator on (1) and off (0).
.El
.Pp
It should be perfectly safe to use the
.Em Fn
buttons on the keyboard intermixed with the
.Xr sysctl 8
interface.  They are not mutually exclusive and are not known to interfere
with each other.
.Sh DIAGNOSTICS
When an
.Em event
is received from the hardware, the notification is simply printed.  The
userspace daemon (qv) is still in development.
.Sh SEE ALSO
.Xr acpi 4 ,
.Xr loader.conf 5
.Pp
http://sourceforge.net/projects/acpi4asus/
.Sh AUTHORS
This driver was written by
.An Philip Paeps Aq philip@paeps.cx .
.Pp
Inspiration came from the 
.Em acpi4asus project 
started by Julien Lerouge which maintains a driver implementing this
functionality in the Linux kernel.
.Sh BUGS
Keeping track of the current display settings doesn't work correctly all the
time.  It appears as though the ACPI method doesn't properly update the
register after setting the display.
.Pp
It is possible to use
.Xr sysctl 8
to switch output to a display which is not present, causing blindness.  The
keyboard buttons don't allow this, this driver shouldn't either.

--oJ71EGRlYNjSvfq7--
