Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2006 06:44:02 +0100
From:      Markus Brueffer <markus@brueffer.de>
To:        freebsd-acpi@freebsd.org
Subject:   Re: [PATCH] debug sysctl for acpi_ibm hiding the event printfs
Message-ID:  <200602130644.06530.markus@brueffer.de>
In-Reply-To: <43EEA588.3080802@cytexbg.com>
References:  <43EEA588.3080802@cytexbg.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602130644.06530.markus>