Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2012 11:53:05 -0700
From:      Kevin Oberman <kob6558@gmail.com>
To:        Pierre-Luc Drouin <pldrouin@pldrouin.net>
Cc:        "freebsd-acpi@freebsd.org" <freebsd-acpi@freebsd.org>
Subject:   Re: How can I help with thinkpad x220 issues?
Message-ID:  <CAN6yY1uMHY7M6nxpjmedA166qHG8ddG0OFJ=otbWM9KM2Q34Hw@mail.gmail.com>
In-Reply-To: <CANT0rcsxTeOfc2_0a8AQx_%2BhsNwRDXdqTm02S%2Bgsf51W4Qsamw@mail.gmail.com>
References:  <20120523151357.GC97037@sigil.instinctive.eu> <CAN6yY1vbc5DJcc4GrktyJaokA6CPNgTdx5X%2BHH7J1W_NvLJPxA@mail.gmail.com> <20120524065532.GB39168@e-new.0x20.net> <CAN6yY1u6DzSyGBCRB4zbstDP7ES7p4SjuyXkFQU5KkE264W6xw@mail.gmail.com> <CANT0rcsxTeOfc2_0a8AQx_%2BhsNwRDXdqTm02S%2Bgsf51W4Qsamw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 25, 2012 at 10:10 PM, Pierre-Luc Drouin
<pldrouin@pldrouin.net> wrote:
>
>
> On Friday, May 25, 2012, Kevin Oberman wrote:
>>
>> On Wed, May 23, 2012 at 11:55 PM, Lars Engels <lars.engels@0x20.net>
>> 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 <natbsd@instinctive.=
eu>
>> >> 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 are=
a?
>> >> > (though I admit I'm more interested in having the brightness proble=
m
>> >> > solved than the resume one)
>> >> >
>> >> > I don't know anything about ACPI or about FreeBSD or Linux internal=
s,
>> >> > 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
>> >> > reach
>> >> > 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
>> >> > have
>> >> > to prioritize. So my question is rather *what* should I learn to
>> >> > provide
>> >> > help as soon as possible?
>> >> >
>> >> > For example, if the brightness issue is just a matter of extracting
>> >> > the
>> >> > 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
>> >> > would
>> >> > gather looking at the code. I guess if it was that simple someone
>> >> > would
>> >> > 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 lo=
t
>> >> 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 u=
p?
>>
>> 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,
>> =A0 =A0root 0x121, subw 0x0, time 166670035, (96,121), root:(100,750),
>> =A0 =A0state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume),
>> same_screen YES,
>> =A0 =A0XLookupString gives 0 bytes:
>> =A0 =A0XmbLookupString gives 0 bytes:
>> =A0 =A0XFilterEvent returns: False
>>
>> KeyRelease event, serial 33, synthetic NO, window 0x4600001,
>> =A0 =A0root 0x121, subw 0x0, time 166670185, (96,121), root:(100,750),
>> =A0 =A0state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume),
>> same_screen YES,
>> =A0 =A0XLookupString gives 0 bytes:
>> =A0 =A0XFilterEvent returns: False
>>
>> KeyPress event, serial 33, synthetic NO, window 0x4600001,
>> =A0 =A0root 0x121, subw 0x0, time 166927339, (98,0), root:(102,629),
>> =A0 =A0state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume),
>> same_screen YES,
>> =A0 =A0XLookupString gives 0 bytes:
>> =A0 =A0XmbLookupString gives 0 bytes:
>> =A0 =A0XFilterEvent returns: False
>>
>> KeyRelease event, serial 33, synthetic NO, window 0x4600001,
>> =A0 =A0root 0x121, subw 0x0, time 166927451, (98,0), root:(102,629),
>> =A0 =A0state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume),
>> same_screen YES,
>> =A0 =A0XLookupString gives 0 bytes:
>> =A0 =A0XFilterEvent 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.)
>> --
>> R. Kevin Oberman, Network Engineer
>> E-mail: kob6558@gmail.com
>
>
> You should be able to bind these keys to commands such as mixer vol +5 am=
d
> mixer vol -5

Actually, to get it to work I had to bind to "/usr/sbin/mixer vol
+5:+5" and "/usr/sbin/mixer vol -5:-5" Just doing +5 set the volume to
5% (absolute) and -5 did nothing. Slightly odd, but I do have it
working, now, t least when Gnome is being used.

Thanks!
--=20
R. Kevin Oberman, Network Engineer
E-mail: kob6558@gmail.com



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