From owner-freebsd-acpi@FreeBSD.ORG Sat Jun 16 04:48:05 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8EA1106564A for ; Sat, 16 Jun 2012 04:48:05 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4382A8FC15 for ; Sat, 16 Jun 2012 04:48:05 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so3516449wgb.31 for ; Fri, 15 Jun 2012 21:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=vfoz7mweYtVz7qIOwh3q3JIBEaB5fygz10m6axrfa1Q=; b=XEh90ZNedo0u3t6dfwkGhH8TK+Q5itzsKcp0vfvX6PDHM/iDxHnQLRZ8fqOK2q9oXV aOP8nHnimeqd4MIaDhQKK0AiYzkmxp3N1Vcd6dYfput746tJ86DaNj3D2Sv1r8Ont9uG 72uxBDvmanMPZZmhBJTgm6TTjJkpw26jAy/Sxd9WzM6Mqp4AX/pfObLpQ5Vy0p3lH58W ifEBH/BzYnWOegND85cU9xLK85MQh7CQAaQIr/X36fIWCofzkwHEL1IapJo6wQvr6cNa xYbv/BOKzRoUDOLyXEiPMFuiTfRj0jDf+Lp0wBweqMZ+mQLYQLDZfo9zhXx0cF0+cyy4 I93Q== MIME-Version: 1.0 Received: by 10.180.78.233 with SMTP id e9mr9141887wix.5.1339821634858; Fri, 15 Jun 2012 21:40:34 -0700 (PDT) Received: by 10.223.155.4 with HTTP; Fri, 15 Jun 2012 21:40:34 -0700 (PDT) In-Reply-To: <4FDBE1BA.3070204@gmail.com> References: <20120616.025804.48535013.iwasaki@jp.FreeBSD.org> <4FDBE1BA.3070204@gmail.com> Date: Fri, 15 Jun 2012 21:40:34 -0700 Message-ID: From: Kevin Oberman To: freegih Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-acpi@freebsd.org Subject: Re: [CFT] acpi_ibm event handler 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: Sat, 16 Jun 2012 04:48:05 -0000 On Fri, Jun 15, 2012 at 6:30 PM, freegih wrote: > Thanks, it looks good, works on my X61, =C2=A0I also have SL500 , the len= ovo tp. > > =C2=A0can somebody make acpi_ibm works on the Lenovo ThinkPads ? > > > > On 2012/06/16 01:58, Mitsuru IWASAKI wrote: >> >> Hi, >> >> I've noticed that brightness up/down keys on my Thinkpad X61 doesn't >> work. =C2=A0Checking DSDT of X61, many changes were found comparing with >> older Thinkpad (eg. X41). =C2=A0So I made the patches against acpi_ibm(4= ) >> as a workaround so that devd(8) events are handled by event handler in >> acpi_ibm(4). >> >> the patches at: >> http://people.freebsd.org/~iwasaki/acpi/acpi_ibm-20120615.diff >> >> With the following sysctl setting, now brightness control is working :) >> >> sysctl dev.acpi_ibm.0.events=3D1 >> sysctl dev.acpi_ibm.0.handlerevents=3D'0x04 0x10 0x11' >> >> Thanks! Lots of stiff has been moved from ACPI to the EC, so the changes are pretty significant. The easiest is to add LEN0068 to the "list" of ibm_ids in /usr/src/sys/dev/acpi_support/icpi_ibm.c: static char *ibm_ids[] =3D {"IBM0068","LEN0068", NULL}; That will get a few things like the ThinkLight and several other things. It won't provide volume or brightness control, though. You can fix volume by defining the keys XF86AudioLowerVolume and XF86AudioRaiseVolume to execute the mixer command: /usr/sbin/mixer vol -5:-5 and /usr/sbin/mixer vol +5:+5 This can be done in most desktops. Brightness can be adjusted using "acpi_call -p '\VBRC' -i n" (where n is 0-15). acpi_call must be installed from ports. But this command sets absolute brightness, so it can't raise or lower the brightness unless you have the current value and I don't know how to get that. This is the case on my T520. --=20 R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com