From owner-freebsd-acpi@FreeBSD.ORG Mon Feb 13 05:45:14 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E450816A420 for ; Mon, 13 Feb 2006 05:45:13 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39BA943D45 for ; Mon, 13 Feb 2006 05:45:13 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from fwd27.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1F8WWL-0002NF-01; Mon, 13 Feb 2006 06:45:09 +0100 Received: from ramses.kicks-ass.net (Sx3OUBZ6ZeLrY75wkz94GoCWcenJ5To45U0G2WmbBTkmMmiB8SnbwV@[80.143.247.116]) by fwd27.sul.t-online.de with esmtp id 1F8WWC-1pWRpg0; Mon, 13 Feb 2006 06:45:00 +0100 Received: from localhost (dslb-084-061-001-143.pools.arcor-ip.net [84.61.1.143]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ramses.kicks-ass.net (Postfix) with ESMTP id C9F17B833; Mon, 13 Feb 2006 06:44:51 +0100 (CET) From: Markus Brueffer To: freebsd-acpi@freebsd.org Date: Mon, 13 Feb 2006 06:44:02 +0100 User-Agent: KMail/1.9.1 References: <43EEA588.3080802@cytexbg.com> In-Reply-To: <43EEA588.3080802@cytexbg.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1696157.hshoAJAnLi"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200602130644.06530.markus@brueffer.de> X-ID: Sx3OUBZ6ZeLrY75wkz94GoCWcenJ5To45U0G2WmbBTkmMmiB8SnbwV@t-dialin.net X-TOI-MSGID: 730ae598-a487-44a4-8b76-d435b5f8691c Cc: Subject: Re: [PATCH] debug sysctl for acpi_ibm hiding the event printfs X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 05:45:14 -0000 --nextPart1696157.hshoAJAnLi Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Sunday 12 February 2006 04:03 schrieb Niki Denev: > For some time i started using my IBM TP X31 with > the following sysctl enabled : > > dev.acpi_ibm.0.events=3D1 > > and the following lines in devd.conf : > > notify 10 { > match "system" "ACPI"; > match "subsystem" "IBM"; > match "notify" "0x05"; > action "/usr/local/sbin/wlan_toggle.sh"; > }; > > With this stuff i am able to use the wireless/radio (Fn-F5) button on my > laptop to enable/disable the wireless interface with the help of a > simple shell script. > But as annoying side effect of dev.acpi_ibm.0.events enabled now i get > printfs with the event codes each time i press a special combination. > So i decided to hide the printfs in acpi_ibm behind a debug sysctl, > in my case : dev.acpi_ibm.0.debug > The patch is attached. (it is for -CURRENT) Thanks for the patch. I have the debug output handling of acpi_ibm on my to= do=20 list and will take care of it. > P.S.: As another side effect of dev.acpi_ibm.0.events enabled i can no > longer use the suspend (Fn-F4) and display output (Fn-F7) keys because > now they generate events to devd. If you set the events sysctl to 1, all possible keys (depending on your mod= el)=20 will report acpi events to devd. You can control which keys should raise ac= pi=20 events and which shouldn't via the dev.acpi_ibm.0.eventmask sysctl. See the= =20 manpage for details. > This seems a little strange because the brightness and think light > combinations continue to work and do not generate events.=20 It highly depends on your model, which keys are able to generate events and= =20 which are not. But if brightness and thinklight don't generate events, not= =20 all is lost: acpi_ibm implements a second method to recognize keypresses on= =20 special keys (mostly used on older Thinkpads, but still supported on newer= =20 ones). Take a look at the dev.acpi_ibm.0.hotkey sysctl. To assign actions t= o=20 these keys, you can use the sysutils/tpb port. Cheers, Markus =2D-=20 Markus Brueffer =A0 =A0| GPG-Key: http://people.FreeBSD.org/~markus/markus.= asc markus@brueffer.de | FP: 3F9B EBE8 F290 E5CC 1447 8760 D48D 1072 78F8 A8D4 markus@FreeBSD.org | FreeBSD: The Power to Serve! --nextPart1696157.hshoAJAnLi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBD8Bym1I0Qcnj4qNQRAuQAAJ93XasvxQ0ybkj9yfijTDqcPVOJlACg/bbf ROXFGiA8xR7BlXE24m3mLPk= =jMB6 -----END PGP SIGNATURE----- --nextPart1696157.hshoAJAnLi--