From owner-freebsd-acpi@FreeBSD.ORG Mon Feb 25 00:58:41 2013 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2FB06D47; Mon, 25 Feb 2013 00:58:41 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-da0-f44.google.com (mail-da0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id DD92615E; Mon, 25 Feb 2013 00:58:40 +0000 (UTC) Received: by mail-da0-f44.google.com with SMTP id z20so1201164dae.31 for ; Sun, 24 Feb 2013 16:58:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=C6yTWJgDKjLg5k4JuLlBHyW3FHrBc/GHWCepd4UgBFA=; b=De7rP8CfzsWL6q7y2Imfiun3K2imubfxnGA8vP5OXdi3//qf/CQYhZ8W2lDFxzXE/Y G6N2t2KbEc3tnSE98DnzfdIOhCuL2r2jAzFdZcRp4wyy9Gpdtffzh+eSOmAFkoi/VtmC v0vi8CJ8038HroqlDsYBO7q2MmM3DrrBhdkiQy+KxtSytajrnSb3/d7zh8easC7PoG2Q foqSU0lpm+Tq0bqUTMbcnLmp35W9a8AknCmHubIATYQHA2pG8GcsSFuMg6R29lQSUCn+ Qzvnj2rNVOdoCkE7zgsgICsktVE8gFr3eq5heEXRCj+ABVeH0TjASYHWNH3ZeZFxa9Zj DUVA== X-Received: by 10.68.237.165 with SMTP id vd5mr15429536pbc.52.1361753913936; Sun, 24 Feb 2013 16:58:33 -0800 (PST) Received: from flatline.local (70-36-223-239.dsl.dynamic.sonic.net. [70.36.223.239]) by mx.google.com with ESMTPS id qb10sm10706217pbb.43.2013.02.24.16.58.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Feb 2013 16:58:32 -0800 (PST) Message-ID: <512AB6F3.6030001@gmail.com> Date: Sun, 24 Feb 2013 16:57:23 -0800 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130202 Thunderbird/17.0.2 MIME-Version: 1.0 To: Ian Smith Subject: Re: what is required to support a new laptop? References: <20130128114938.GK50515@e-new.0x20.net> <20130130024649.R87033@sola.nimnet.asn.au> <20130130032714.D87033@sola.nimnet.asn.au> <20130130050811.H87033@sola.nimnet.asn.au> In-Reply-To: <20130130050811.H87033@sola.nimnet.asn.au> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, bapt@freebsd.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 00:58:41 -0000 On 01/29/13 10:24, Ian Smith wrote: > On Tue, 29 Jan 2013 12:46:43 -0500, Eitan Adler wrote: > > On 29 January 2013 12:29, Ian Smith wrote: > > > Ah right. I don't suppose kldload -v shows anything useful about the > > > problem loading it? Ah, never mind, it may be obvious .. lightly > > > skimming your asl.y530.gz, I recalled folks having to patch something > > > for Lenovo rather than IBM OEMIDs .. hunt, hunt .. ok, here it is: > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/164538 > > > > > > This is after the install of a patched acpi_ibm > > [3500 root@gravity /usr/src/sys/modules/acpi ]#kldload -v acpi_ibm > > Loaded acpi_ibm, id=12 > > Which looks maybe successful, on the face of it? .. > > > [5507 eitan@gravity (100)% ~ !1!]%sysctl dev.acpi_ibm > > sysctl: unknown oid 'dev.acpi_ibm' > > .. but clearly wasn't. > The Y series doesn't have the HKEY stuff, or it's not the same. You want acpi_video (as does every new Lenovo, thinkpad or not). The problem is Lenovo is putting the "correct" _BCL/_BCM under "PEG" devices....section from your dsdt follows, temporary workaround test after that Device (LCD) { Method (_ADR, 0, NotSerialized) { Return (0x0110) } Method (LVLS, 1, NotSerialized) { Store (One, Local0) Store (Zero, Local1) If (LEqual (OSYS, 0x07DC)) { Store (0x14, Local5) Store (PLV2, Local6) } Else { Store (0x0F, Local5) Store (PLVL, Local6) } While (Local0) { Add (Local1, 0x02, Local2) Store (DerefOf (Index (Local6, Local2)), Local3) And (Arg0, 0xFF, Local4) If (LEqual (Local4, Local3)) { Store (Zero, Local0) } Subtract (Local3, One, Local3) If (LEqual (Local4, Local3)) { Store (Zero, Local0) } If (LGreaterEqual (Local1, Local5)) { Store (Zero, Local0) } If (Local0) { Add (One, Local1, Local1) } } Return (Local1) } Method (_BCL, 0, NotSerialized) { If (LNotEqual (OSYS, 0x07DC)) { Return (PLVL) } Else { Return (PLV2) } } Method (_BCM, 1, NotSerialized) { If (IGDS) { Store (^^^^GFX0.DD02.LVLS (Arg0), Local1) Store (Local1, ^^^^LPCB.EC0.BRTS) ^^^^GFX0.AINT (One, Arg0) } Else { Store (LVLS (Arg0), Local1) Store (Local1, ^^^^LPCB.EC0.BRTS) } Store (Arg0, BRTL) } Method (_BQC, 0, NotSerialized) { Return (BRTL) } } } } This would be under _SB.PCI0.PEG0.VGA Try acpi_call -p '\_SB.PCI0.PEG0.VGA.LCD._BCL' then acpi_call -p '\_SB.PCI0.PEG0.VGA.LCD._BCL' -i 50 Experiment with the numbers. We need to fix acpi_video so it attaches to the correct _BCL on these laptops. Matt