From owner-freebsd-acpi@FreeBSD.ORG Sat May 26 03:25:49 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 604A8106566B for ; Sat, 26 May 2012 03:25:49 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id E4BDE8FC0C for ; Sat, 26 May 2012 03:25:48 +0000 (UTC) Received: by werg1 with SMTP id g1so1226521wer.13 for ; Fri, 25 May 2012 20:25:48 -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=Yqh1EtkbeRogr4RQl7I/fC0fr6uYUC5xnssfyofIGKY=; b=m13f7nMCL5HvWzMidkFi0bs1ph2FyWOZjNmvUmDvPSe5KZt10vWS8BgvaIYuoRrgJ1 KfPuzu8JKc46KpPxCQeyezqqT2Xu7JjahvxGe8D5FOF9UXDJAm5Fq3s5PIyU1HvvBrEu qbQhnu26KWDfeIaPStjLEtJY6bAjd+E3CwDDQq98Ke3G8O7EJTI245iNqAQoFJSUo7cG V2XbqDPcEpTv+GbFW2PzFKnQNerm3IINF5CfXAt4sPcyTYzA9iK2Hy8P2kY1O8d4yGhL z04ubFmKcU7KxY4sRWirhRYRz5fMLc/kIWX0H0JolTwdHMDPCARozCZIZRsKz7GYgyU8 imDw== MIME-Version: 1.0 Received: by 10.180.80.97 with SMTP id q1mr845733wix.13.1338002747964; Fri, 25 May 2012 20:25:47 -0700 (PDT) Received: by 10.223.155.4 with HTTP; Fri, 25 May 2012 20:25:47 -0700 (PDT) In-Reply-To: <20120524065532.GB39168@e-new.0x20.net> References: <20120523151357.GC97037@sigil.instinctive.eu> <20120524065532.GB39168@e-new.0x20.net> Date: Fri, 25 May 2012 20:25:47 -0700 Message-ID: From: Kevin Oberman To: Lars Engels Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-acpi@freebsd.org, =?ISO-8859-1?Q?Natacha_Port=E9?= Subject: Re: How can I help with thinkpad x220 issues? 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, 26 May 2012 03:25:49 -0000 On Wed, May 23, 2012 at 11:55 PM, Lars Engels wrote: > On Wed, May 23, 2012 at 03:19:14PM -0700, Kevin Oberman wrote: >> On Wed, May 23, 2012 at 8:13 AM, Natacha Port=E9 = wrote: >> > Hello, >> > >> > I happen to be the owner of a brand new Lenovo Thinkpad X220. From a >> > recent thread here I gather it almost works with FreeBSD, and the >> > remaining problems are screen brightness and screen left unpowered at >> > resume. Is that right? >> > >> > So my question is, how can I help make progress in any of these area? >> > (though I admit I'm more interested in having the brightness problem >> > solved than the resume one) >> > >> > I don't know anything about ACPI or about FreeBSD or Linux internals, >> > but I'm quite proficient in C and somewhat used to navigate in unknown >> > huge code bases. >> > >> > So I guess the first steps to help would be to first learn stuff. >> > >> > However I don't have much time available. I guess FreeBSD 11 would rea= ch >> > end-of-life before I could reach a level of understanding I find >> > satisfying (though I admit I have high standards there), so I would ha= ve >> > to prioritize. So my question is rather *what* should I learn to provi= de >> > help as soon as possible? >> > >> > For example, if the brightness issue is just a matter of extracting th= e >> > right numbers from linux kernel code and plug them into FreeBSD, I >> > probably won't need to learn anything more about ACPI than what I woul= d >> > gather looking at the code. I guess if it was that simple someone woul= d >> > have already done it, but that illustrate well my point about >> > prioritizing learning. >> > >> > Or is the barrier of entry too high for me to be of any use? >> >> If it has not been committed, the minor fix to make acpi_ibm work on >> modern ThinkPads needs to be committed. Once done, the issues >> mentioned need to be addressed.This includes getting brightness to be >> setable from both the keypad hot-keys and from applications. ATM, I >> can set the brightness, but making the hot-keys work will require the >> ability to extract the current level so that it may be adjusted >> plus/minus one. >> >> The other issue is volume control keys don't work. I suspect it will >> be similar to brightness, but I don't know just how to figure it out. >> >> I should also mention that I don't have an X220. I have a T520, but >> the issues seem to be identical, so fixing one will probably fix a lot >> of recent ThinkPads. > > About the key: > > Did you try loading "acpi_ibm", "sysctl dev.acpi_ibm.0.events=3D1", > "cat /var/run/devd.pipe" and then press the keys. Does anything show up? After adding LEN0068 ti the ACPI IDs, I tried this and I get no ACPI event when pressing either button, but I do get regular key press events: KeyPress event, serial 30, synthetic NO, window 0x4600001, root 0x121, subw 0x0, time 166670035, (96,121), root:(100,750), state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 33, synthetic NO, window 0x4600001, root 0x121, subw 0x0, time 166670185, (96,121), root:(100,750), state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 33, synthetic NO, window 0x4600001, root 0x121, subw 0x0, time 166927339, (98,0), root:(102,629), state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 33, synthetic NO, window 0x4600001, root 0x121, subw 0x0, time 166927451, (98,0), root:(102,629), state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False I can set these up as hot keys and issue a command, but I have no idea what I can set to adjust the hardware volume. But I will also need to read out the current volume so I know what value to which is should be set. (Same issue as with brightness.) --=20 R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com