From owner-freebsd-acpi@FreeBSD.ORG Sun May 27 18:53:13 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 1E3E3106564A for ; Sun, 27 May 2012 18:53:13 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id 9D5638FC15 for ; Sun, 27 May 2012 18:53:12 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so852952wib.13 for ; Sun, 27 May 2012 11:53:06 -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=mMIJSy/0zzZZ0g67IxttvQIdPJOJFhu8jib+9pn8mtY=; b=sEPXTUDXx5Zh6y1O7cCbkOYs5WS7E5x+7reg5MmmoAF8bIt2j0P4H7Bv5xGDc28zYL RJ8rTZPgv4y//jKvXjncP9oQsiBdU+ZtNE0an0jfkPcSAHbS9JyR9toZxqYL6mUJifXC oPcTGl1JFoISvmAPnCwLhC623qC0NOWR6n/jVao/ixy3uHHz5wW2Nk6NXP1H36BbuOEn TcByMOUZrSWGEsHv6j4JWTWecpiU2PbCtCd6XMsY7P0Di8M5bx7jKCiIO3fCHbsJu1MJ u+X/0UOa2cz3WCDxtsgbEtIEUtNNjVzulcvOyZCUJeEarryo4tmc8dgvSNglnehQkEb3 hnHA== MIME-Version: 1.0 Received: by 10.180.109.197 with SMTP id hu5mr10264088wib.8.1338144785832; Sun, 27 May 2012 11:53:05 -0700 (PDT) Received: by 10.223.155.4 with HTTP; Sun, 27 May 2012 11:53:05 -0700 (PDT) In-Reply-To: References: <20120523151357.GC97037@sigil.instinctive.eu> <20120524065532.GB39168@e-new.0x20.net> Date: Sun, 27 May 2012 11:53:05 -0700 Message-ID: From: Kevin Oberman To: Pierre-Luc Drouin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-acpi@freebsd.org" 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: Sun, 27 May 2012 18:53:13 -0000 On Fri, May 25, 2012 at 10:10 PM, Pierre-Luc Drouin wrote: > > > On Friday, May 25, 2012, Kevin Oberman wrote: >> >> 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 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 From owner-freebsd-acpi@FreeBSD.ORG Sun May 27 19:14:33 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 321151065673 for ; Sun, 27 May 2012 19:14:33 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id B50D98FC2B for ; Sun, 27 May 2012 19:14:32 +0000 (UTC) Received: by wibhj8 with SMTP id hj8so847428wib.13 for ; Sun, 27 May 2012 12:14:31 -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=EW65DaRmVNNw5Wfo10APmhxh7Nd1Th4McfH+HfmcmPs=; b=Dk/1u2wTKcG5FNXSKiBIvH3Qi+o0VFwCgQV2ldoSDRdvzu8Gy8xJCZR64y6rFm8OtW obL7HgoaGMw0T3iERuZPAA8lhFI87rkQ0F3A9mFrGBZAq2FCYPOShptuT3SErEkYzG0k mLN3FmoW6VmTJJkahzOkEqAA5wmco2aAXX3Kfn4QOm5146iNUnG2LExdTmAQQoScRroK Z0IS4/RSXprqI7BJL6cc0K4qeApi6MrRhSXS2G6QeBU+MvMgvRUfQxld58dk4jSTuDRQ whqBopsjFDt+KyrLbPqVgIHY6etda0V6YYEUf7gHOsKaaLGv7x64BcVDI8914tz3g8Na 0HBA== MIME-Version: 1.0 Received: by 10.216.215.194 with SMTP id e44mr3227627wep.61.1338146071396; Sun, 27 May 2012 12:14:31 -0700 (PDT) Received: by 10.223.155.4 with HTTP; Sun, 27 May 2012 12:14:31 -0700 (PDT) In-Reply-To: <20120526124542.GK39168@e-new.0x20.net> References: <20120523151357.GC97037@sigil.instinctive.eu> <20120524065532.GB39168@e-new.0x20.net> <20120526124542.GK39168@e-new.0x20.net> Date: Sun, 27 May 2012 12:14:31 -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: Sun, 27 May 2012 19:14:33 -0000 On Sat, May 26, 2012 at 5:45 AM, Lars Engels wrote: > On Fri, May 25, 2012 at 08:25:47PM -0700, Kevin Oberman wrote: >> On Wed, May 23, 2012 at 11:55 PM, Lars Engels wro= te: >> > 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 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 unkn= own >> >> > 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 pr= ovide >> >> > 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 w= ould >> >> > gather looking at the code. I guess if it was that simple someone w= ould >> >> > 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 =A0 root 0x121, subw 0x0, time 166670035, (96,121), root:(100,750), >> =A0 =A0 state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume)= , >> same_screen YES, >> =A0 =A0 XLookupString gives 0 bytes: >> =A0 =A0 XmbLookupString gives 0 bytes: >> =A0 =A0 XFilterEvent returns: False >> >> KeyRelease event, serial 33, synthetic NO, window 0x4600001, >> =A0 =A0 root 0x121, subw 0x0, time 166670185, (96,121), root:(100,750), >> =A0 =A0 state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume)= , >> same_screen YES, >> =A0 =A0 XLookupString gives 0 bytes: >> =A0 =A0 XFilterEvent returns: False >> >> KeyPress event, serial 33, synthetic NO, window 0x4600001, >> =A0 =A0 root 0x121, subw 0x0, time 166927339, (98,0), root:(102,629), >> =A0 =A0 state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume)= , >> same_screen YES, >> =A0 =A0 XLookupString gives 0 bytes: >> =A0 =A0 XmbLookupString gives 0 bytes: >> =A0 =A0 XFilterEvent returns: False >> >> KeyRelease event, serial 33, synthetic NO, window 0x4600001, >> =A0 =A0 root 0x121, subw 0x0, time 166927451, (98,0), root:(102,629), >> =A0 =A0 state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume)= , >> same_screen YES, >> =A0 =A0 XLookupString gives 0 bytes: >> =A0 =A0 XFilterEvent returns: False > > Hmm, okay, that's not too bad. At least the keys are recognized. > > >> >> 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.) > > Do you have dev.acpi_ibm.0.lcd_brightness and .volume? > > If you cou can write a script that raises / lowers the values with > sysctl. Unfortunately newer Lenovo systems no longer play correctly with the acpi_ibm module. Some things do work, but brightness, volume, and fan speed control don't use the same ACPI methods as older units. Brightness now uses /VBRC instead of /_BCL and can be accessed via the call_acpi port do do raw ACPI operations. See http://lists.freebsd.org/pipermail/freebsd-current/2012-March/032511.ht= ml Of course, you need to add LEN0068 to the list of IDs to get acpi_ibm to work at all. Guess I need to open a PR to get this "fix" added, but the proper one would be to fork off acpi_lenovo to use the ACPI methods now used by ThinkPads. (I wonder if the ID is the only things needed to detect the switch?) --=20 R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com From owner-freebsd-acpi@FreeBSD.ORG Mon May 28 11:07:22 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 4142A106566B for ; Mon, 28 May 2012 11:07:22 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 11DA28FC12 for ; Mon, 28 May 2012 11:07:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4SB7Leh063269 for ; Mon, 28 May 2012 11:07:21 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4SB7LRn063267 for freebsd-acpi@FreeBSD.org; Mon, 28 May 2012 11:07:21 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 May 2012 11:07:21 GMT Message-Id: <201205281107.q4SB7LRn063267@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org 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: Mon, 28 May 2012 11:07:22 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/164329 acpi [acpi] hw.acpi.thermal.tz0.temperature shows strange v o kern/163268 acpi [acpi_hp] fix driver detach in absence of CMI o kern/162859 acpi [acpi] ACPI battery/acline monitoring partialy working o kern/161715 acpi [acpi] Dell E6520 doesn't resume after ACPI suspend o kern/161713 acpi [acpi] Suspend on Dell E6520 o kern/160838 acpi [acpi] ACPI Battery Monitor Non-Functional o kern/160419 acpi [acpi_thermal] acpi_thermal kernel thread high CPU usa o kern/158689 acpi [acpi] value of sysctl hw.acpi.thermal.polling_rate ne o kern/154955 acpi [acpi] Keyboard or ACPI doesn't work on Lenovo S10-3 o kern/152438 acpi [acpi]: patch to acpi_asus(4) to add extra sysctls for o kern/152098 acpi [acpi] Lenovo T61p does not resume o i386/146715 acpi [acpi] Suspend works, resume not on a HP Probook 4510s o kern/145306 acpi [acpi]: Can't change brightness on HP ProBook 4510s o i386/143798 acpi [acpi] shutdown problem with SiS K7S5A o kern/143420 acpi [acpi] ACPI issues with Toshiba o kern/142009 acpi [acpi] [panic] Panic in AcpiNsGetAttachedObject o kern/139088 acpi [acpi] ACPI Exception: AE_AML_INFINITE_LOOP error o amd64/138210 acpi [acpi] acer aspire 5536 ACPI problems (S3, brightness, o kern/137042 acpi [acpi] hp laptop's lcd not wakes up after suspend to r o i386/136008 acpi [acpi] Dell Vostro 1310 will not shutdown (Requires us o bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/132602 acpi [acpi] ACPI Problem with Intel SS4200: System does not p kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o bin/126162 acpi [acpi] ACPI autoload failed : loading required module o kern/123039 acpi [acpi] ACPI AML_BUFFER_LIMIT errors during boot a i386/122887 acpi [panic] [atkbdc] 7.0-RELEASE on IBM HS20 panics immed o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/91594 acpi [acpi] FreeBSD > 5.4 w/ACPI fails to detect Intel Pro/ o kern/73823 acpi [request] acpi / power-on by timer support o kern/56024 acpi ACPI suspend drains battery while in S3 32 problems total. From owner-freebsd-acpi@FreeBSD.ORG Tue May 29 09:38:31 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 D761B106564A for ; Tue, 29 May 2012 09:38:31 +0000 (UTC) (envelope-from natbsd@instinctive.eu) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 58E738FC18 for ; Tue, 29 May 2012 09:38:30 +0000 (UTC) Received: by werg1 with SMTP id g1so3161461wer.13 for ; Tue, 29 May 2012 02:38:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent:x-gm-message-state; bh=PVGIGe20K8VNtt0LScl9PnKmYLQp7KW7MYrO18+wJho=; b=dWYjuQEY3kjD3XzosFIi+k40yBJvIQYgJ1ONMXpNQSeuv7uQDZw0OuWKcpt51jKBDd IGq6n8NDhIaV5nh9nwsvnBSCDeXxDZ9DtWUbCT8uBbK+gXEeRgFqNw3u1vmeF/s6j3+i e9rsystYVW6ol/BlIu3QzdsWAz/rUf/Qry9SEZbS/q9mS2Molw2ySjYBkmgRsHf5MSRv +SoVX2HRUiUja5VmZAW11ErYADADxBQN9L+5dT+OeZmxEYBHR7ng4FHz8f5dXT3doYc1 /2ebVXa2EZUgwRGMxly8MAqdmuOmbKc3HT1e3NUV1l7bLtATvOf4usJ1yx64KVx8NccH 6AHQ== Received: by 10.216.141.15 with SMTP id f15mr6787612wej.82.1338284309998; Tue, 29 May 2012 02:38:29 -0700 (PDT) Received: from sigil.instinctive.eu (sigil.instinctive.eu. [78.41.233.119]) by mx.google.com with ESMTPS id ei4sm43393338wid.5.2012.05.29.02.38.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 02:38:28 -0700 (PDT) Date: Tue, 29 May 2012 11:38:12 +0200 From: Natacha =?iso-8859-1?Q?Port=E9?= To: =?utf-8?B?0JvRjtCx0L7QvNC40YAg0JPRgNC40LPQvtGA0L7Qsg==?= Message-ID: <20120529093812.GH97037@sigil.instinctive.eu> References: <20120523151357.GC97037@sigil.instinctive.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQlArKikOyncOE4aprQCQF+BHYPLjLS7Q8JzraE1pquqIercZjnlZkpLUqheX+8b4K03zwBi Cc: freebsd-acpi@freebsd.org 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: Tue, 29 May 2012 09:38:32 -0000 Hello, on Wednesday 23 May 2012 at 10:05, Любомир Григоров wrote: > Well, brightness works with the command line, sooo.... I think it has to be > mapped to the hardware keys. There is a long thread where I discussed this > with a couple other members (toward the bottom for the recent brightness > discussion). > http://comments.gmane.org/gmane.os.freebsd.current/135827 Thanks a lot for pointing this discussion, I found there information more up-to-date than what I previously found. In particular, according to what I understand from http://marc.info/?l=freebsd-current&m=133341372825281&w=2 helping with the brightness seems to require a quite broad understanding of ACPI and/or EC, and maybe also a good overview of how things work currently in FreeBSD. Both of these seem to be far beyond anything that I can reach in a reasonable amount of time :-( Still, my offer stands, and if anybody can think of anything useful I can do or learn, please don't hesitate to tell me so. > Good news is that Konstantin's latest patch works with FreeBSD 9-STABLE so > no longer need to run HEAD. I would love to see resume work, though. I'm not sure whether this is the right place to ask for such help, but I haven't been able to get it working as much as I would like. More specifically, I checked out 9-STABLE, and merged all 14 commits listed at the end of http://wiki.freebsd.org/Intel_GPU I then added WITH_NEW_XORG="YES" and WITH_KMS="YES" to /etc/make.conf and compiled x11/xorg metaport with default options, except for KMS=on for graphics/libdrm. It seems that adding i915kms in /boot/loader.conf freezes the system, but that's only a minor inconvenience. Now I kldload it just before starting slim. The screen resolution is correctly detected, everything in Xorg.0.log and `dmesg` looks fine, DRI2 is enabled, xdriinfo reports i915 dri activated for the screen. Well, all in all, as far as I can tell everything is fine, except I don't see any acceleration : it takes up to a whole second for my rxvt-unicode to refresh its 80x56 window (whether scrolling or switching tmux window, and no image background is set), opaque window moving is very jumpy (but I can live without it), and armagetron runs at 7-12 fps (to test whether 3D acceleration fared better than 2D acceleration). Do you see the same behavior? Would you have any idea on how to diagnose whatever could be wrong? Thanks for your help, Natacha Porté From owner-freebsd-acpi@FreeBSD.ORG Tue May 29 10:57:18 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 159E01065672 for ; Tue, 29 May 2012 10:57:18 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mx1.freebsd.org (Postfix) with ESMTP id BF87D8FC12 for ; Tue, 29 May 2012 10:57:17 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mail.0x20.net (Postfix) with ESMTP id DC3E86A6010 for ; Tue, 29 May 2012 12:57:16 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.0x20.net Received: from mail.0x20.net ([217.69.76.211]) by mail.0x20.net (mail.0x20.net [217.69.76.211]) (amavisd-new, port 10024) with ESMTP id BpuNPsSrfLvl for ; Tue, 29 May 2012 12:57:16 +0200 (CEST) Received: from 0x20.net (0x20.net [217.69.76.212]) (Authenticated sender: lala) by mail.0x20.net (Postfix) with ESMTPA id 93EEA6A6002 for ; Tue, 29 May 2012 12:57:16 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 29 May 2012 12:57:16 +0200 From: Lars Engels To: In-Reply-To: <20120529093812.GH97037@sigil.instinctive.eu> References: <20120523151357.GC97037@sigil.instinctive.eu> <20120529093812.GH97037@sigil.instinctive.eu> Message-ID: <82349e69fbf5975b184b8a064d403ed0@mail.0x20.net> X-Sender: lars.engels@0x20.net User-Agent: Roundcube Webmail/0.7 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: Tue, 29 May 2012 10:57:18 -0000 Am 29.05.2012 11:38, schrieb Natacha Porté: > Hello, > > on Wednesday 23 May 2012 at 10:05, Любомир Григоров wrote: >> Well, brightness works with the command line, sooo.... I think it >> has to be >> mapped to the hardware keys. There is a long thread where I >> discussed this >> with a couple other members (toward the bottom for the recent >> brightness >> discussion). >> http://comments.gmane.org/gmane.os.freebsd.current/135827 > > Thanks a lot for pointing this discussion, I found there information > more up-to-date than what I previously found. > > In particular, according to what I understand from > http://marc.info/?l=freebsd-current&m=133341372825281&w=2 > helping with the brightness seems to require a quite broad > understanding > of ACPI and/or EC, and maybe also a good overview of how things work > currently in FreeBSD. Both of these seem to be far beyond anything > that > I can reach in a reasonable amount of time :-( Oh, what I forgot: Have you tried x11/xbacklight? You should be able to in- and decrease the screen's brightness with it. From owner-freebsd-acpi@FreeBSD.ORG Wed May 30 01:18:48 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 E93461065672 for ; Wed, 30 May 2012 01:18:47 +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 656CD8FC08 for ; Wed, 30 May 2012 01:18:47 +0000 (UTC) Received: by werg1 with SMTP id g1so3914991wer.13 for ; Tue, 29 May 2012 18:18:46 -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=9d1mF5obHmxIO7odrb2Ps1JOm6oNZceR7ffoB09Tn9o=; b=JVipTClvesADT9ZoFiyKoWVA5XaPVpXnVPQlzneEDONUjqyxNKlzI4s9jNZ5jGORQX DU3WcqAkFz21Gc4ChA3uSkpE2sTb7gPw9QMIESiNBY/wjzYF+nqKmeBT+pWDR0QUEQz3 1GWADU4UNivXGs0tio4EWRFWwDOb2sk5H6+nVd9eedvkLpQZLp27xzmg1g1SFAk98Igc hFzG/OIKEA+6AZep+z7TUQHWiVa/e6X+AQOIL8mpA7vkwGEAsjKk758HE1fCp8lZlkkw qM+RRtv1l8eFH1EzI6VzdErQG9qQiNxp8Do3vEHsDBbak+K4j+mFC22EaaUJ5Jgj7UB+ AKfQ== MIME-Version: 1.0 Received: by 10.216.206.164 with SMTP id l36mr9024907weo.154.1338340726260; Tue, 29 May 2012 18:18:46 -0700 (PDT) Received: by 10.223.155.4 with HTTP; Tue, 29 May 2012 18:18:46 -0700 (PDT) In-Reply-To: <20120529093812.GH97037@sigil.instinctive.eu> References: <20120523151357.GC97037@sigil.instinctive.eu> <20120529093812.GH97037@sigil.instinctive.eu> Date: Tue, 29 May 2012 18:18:46 -0700 Message-ID: From: Kevin Oberman To: =?ISO-8859-1?Q?Natacha_Port=E9?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-acpi@freebsd.org 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: Wed, 30 May 2012 01:18:48 -0000 On Tue, May 29, 2012 at 2:38 AM, Natacha Port=C3=A9 = wrote: > Hello, > > on Wednesday 23 May 2012 at 10:05, =D0=9B=D1=8E=D0=B1=D0=BE=D0=BC=D0=B8= =D1=80 =D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=BE=D0=B2 wrote: >> Well, brightness works with the command line, sooo.... I think it has to= be >> mapped to the hardware keys. There is a long thread where I discussed th= is >> with a couple other members (toward the bottom for the recent brightness >> discussion). >> http://comments.gmane.org/gmane.os.freebsd.current/135827 > > Thanks a lot for pointing this discussion, I found there information > more up-to-date than what I previously found. > > In particular, according to what I understand from > http://marc.info/?l=3Dfreebsd-current&m=3D133341372825281&w=3D2 > helping with the brightness seems to require a quite broad understanding > of ACPI and/or EC, and maybe also a good overview of how things work > currently in FreeBSD. Both of these seem to be far beyond anything that > I can reach in a reasonable amount of time :-( > > Still, my offer stands, and if anybody can think of anything useful I > can do or learn, please don't hesitate to tell me so. > >> Good news is that Konstantin's latest patch works with FreeBSD 9-STABLE = so >> no longer need to run HEAD. I would love to see resume work, though. > > I'm not sure whether this is the right place to ask for such help, but I > haven't been able to get it working as much as I would like. > > More specifically, I checked out 9-STABLE, and merged all 14 commits > listed at the end of http://wiki.freebsd.org/Intel_GPU > I then added WITH_NEW_XORG=3D"YES" and WITH_KMS=3D"YES" to /etc/make.conf > and compiled x11/xorg metaport with default options, except for > KMS=3Don for graphics/libdrm. > > It seems that adding i915kms in /boot/loader.conf freezes the system, > but that's only a minor inconvenience. Now I kldload it just before > starting slim. > > The screen resolution is correctly detected, everything in Xorg.0.log > and `dmesg` looks fine, DRI2 is enabled, xdriinfo reports i915 dri > activated for the screen. Well, all in all, as far as I can tell > everything is fine, except I don't see any acceleration=C2=A0: it takes u= p to > a whole second for my rxvt-unicode to refresh its 80x56 window (whether > scrolling or switching tmux window, and no image background is set), > opaque window moving is very jumpy (but I can live without it), and > armagetron runs at 7-12 fps (to test whether 3D acceleration fared > better than 2D acceleration). > > Do you see the same behavior? Would you have any idea on how to diagnose > whatever could be wrong? Have you applied the kernel patches? Installing the new Xorg stuff after building them with the two lines added to make.conf. only builds the tools to send the appropriate requests to the kernel, but, without the patches, the kernel does not know how to deal with them. The required kernel changes have been committed to HEAD,but not to 9-Stable, so y0ou still need to manually apply these. --=20 R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com From owner-freebsd-acpi@FreeBSD.ORG Wed May 30 08:02:10 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 9FA0D1065676 for ; Wed, 30 May 2012 08:02:10 +0000 (UTC) (envelope-from natbsd@instinctive.eu) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 22BED8FC0A for ; Wed, 30 May 2012 08:02:09 +0000 (UTC) Received: by wibhj8 with SMTP id hj8so2835921wib.13 for ; Wed, 30 May 2012 01:02:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent:x-gm-message-state; bh=Bqmvnd3+zi4EAMx/hhMfoXT67FQPP/2lxyvwCxZtgOg=; b=TanuvX6BSaaeK+EXqBxK5+gO4JtsosmN6+BvNcVndhRjQS5r3juNLc7HDVNGiOpbZp J47s+Ffmlyj6mGS1bwZa0JKYOOAOfO51FAA2QfcFcDYbg1yn+gm3swyauJWalS9Twn5J 0I8sMUXSAmK2hTBkF+FOLkSpPyRr5rh6IaQ4YmYddNqQwh0X8FvVw9AReBlmOWoH6f3D XLrFCiBXD4VfzXqoQZVazvwaiJB1aIE0YY3UMKhoWKiXpIB6PkYaT4XNONHh/ULLAXV+ 6ZgF8aRoi06D0lum+XFFER4QCLResom3xTbIto9Zit0uiFrgZvtlS62a+oHBFS9kQOOD 3zbw== Received: by 10.216.212.217 with SMTP id y67mr10160385weo.173.1338364928295; Wed, 30 May 2012 01:02:08 -0700 (PDT) Received: from sigil.instinctive.eu (sigil.instinctive.eu. [78.41.233.119]) by mx.google.com with ESMTPS id m20sm24786525wie.6.2012.05.30.01.02.04 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 May 2012 01:02:06 -0700 (PDT) Date: Wed, 30 May 2012 10:01:48 +0200 From: Natacha =?iso-8859-1?Q?Port=E9?= To: Kevin Oberman Message-ID: <20120530080148.GJ97037@sigil.instinctive.eu> References: <20120523151357.GC97037@sigil.instinctive.eu> <20120529093812.GH97037@sigil.instinctive.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQkgp0CbIJGZbNCu0udOB0dBK6Ipw9Y7O6QK3Q18/xAo9fMtiE7nIe2Lp2259Ug0cBpEq5De Cc: freebsd-acpi@freebsd.org 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: Wed, 30 May 2012 08:02:10 -0000 Hello, on Tuesday 29 May 2012 at 18:18, Kevin Oberman wrote: > > Do you see the same behavior? Would you have any idea on how to diagnose > > whatever could be wrong? > > Have you applied the kernel patches? Yes, I think so, that's what I meant when I wrote: > On Tue, May 29, 2012 at 2:38 AM, Natacha Porté wrote: > > More specifically, I checked out 9-STABLE, and merged all 14 commits > > listed at the end of http://wiki.freebsd.org/Intel_GPU More specifically, here is the sequence of commands I used, extracted from my shell history: mkdir STABLE cd STABLE svn co svn://svn.freebsd.org/base/stable/9 cd 9/sys svn merge -c 235356,235359,235362,235365,235366,235372,235375,235776,235782,235783,235846,235847,235859,235925 svn://svn.freebsd.org/base/head/sys cd .. vim sys/dev/acpi_support/acpi_ibm.c # adding "LEN0068" make buildworld buildkernel make installworld installkernel mergemaster -FUi shutdown -r now The list of revisions to merge is taken directly from http://wiki.freebsd.org/Intel_GPU where the patch used to be. There was only one reported merge conflict, caused by a line a context from CURRENT that didn't exist in STABLE, but since it was only adding declaration lines, it was trivially solved. Now maybe I'm missing some code, maybe I made a mistake copying the revision numbers (I've only checked them 3 times, but found no mismatch), maybe the wiki page is wrong. That's why I'm publicly asking for help, at least for diagnosis. Or maybe I made no mistake and intel integrated GPU is just that bad (though performance in Windows does not really hint that way). Thanks for your help, Natacha From owner-freebsd-acpi@FreeBSD.ORG Wed May 30 08:07:38 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 2FD61106564A for ; Wed, 30 May 2012 08:07:38 +0000 (UTC) (envelope-from nm.knife@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 B1CC58FC22 for ; Wed, 30 May 2012 08:07:37 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so4710026wgb.31 for ; Wed, 30 May 2012 01:07:31 -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; bh=KX+X9Tc2WAIRwwUq1ZJBbJz0iwm+xwFd2ahnPH6eZVs=; b=G7l0urTXOO+w5YMGUo10XPTXWq33BvRvXTLYoE2YAAAL/fElSTPSRM2WUuIr/ujbaL PpwIae8KjPxlIPqXqgzpbuleL1/45p8+0g9LOLtU+A7WKdNQaKopLYIuRpH3Hy8q5wIO lW/A/eQXRYCohsa+lKE4IsVG/pQ0Q3HHFYjWx4t0FtX/r2t3EljxGj3yEHHmpx9BnfPi nw3JItuqYyH+oZPrJL5s1kA8keL9cLvyglt/35AIjNVeKsb9G6v2A4xM+Q8jqXBUWauV YGtCqs1wMm2RBjwgIdO4k7yu1R+IJ6sNDkhOHWq+puJVED7mslfyF7zr3z0iLj7NK870 s6Vw== MIME-Version: 1.0 Received: by 10.216.219.11 with SMTP id l11mr10310513wep.213.1338365251201; Wed, 30 May 2012 01:07:31 -0700 (PDT) Received: by 10.227.20.9 with HTTP; Wed, 30 May 2012 01:07:31 -0700 (PDT) In-Reply-To: <20120530080148.GJ97037@sigil.instinctive.eu> References: <20120523151357.GC97037@sigil.instinctive.eu> <20120529093812.GH97037@sigil.instinctive.eu> <20120530080148.GJ97037@sigil.instinctive.eu> Date: Wed, 30 May 2012 01:07:31 -0700 Message-ID: From: =?windows-1251?B?y/7h7uzo8CDD8Ojj7vDu4g==?= To: =?ISO-8859-1?Q?Natacha_Port=E9?= Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-acpi@freebsd.org 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: Wed, 30 May 2012 08:07:38 -0000 Natacha, have a look at this thread, esp. instructions by Toto: http://forums.freebsd.org/showthread.php?t=21852&page=5 It worked for me. See also my notes on the next page regarding the latest patch (only once you have a working STABLE with patch): update source via csup (same file) apply patch, remove .rej's make -j8 buildworld && make installworld reboot In either case if you messed up too much I recommend a clean install. Follow Toto's instructions. Cheers. -- Lyubomir Grigorov (bgalakazam) From owner-freebsd-acpi@FreeBSD.ORG Sat Jun 2 15:25:57 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 1CE2B1065670 for ; Sat, 2 Jun 2012 15:25:57 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id AED3D8FC0C for ; Sat, 2 Jun 2012 15:25:56 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q52FPtCl026191 for ; Sun, 3 Jun 2012 00:25:55 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Sun, 03 Jun 2012 00:25:54 +0900 (JST) Message-Id: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> To: freebsd-acpi@freebsd.org From: Mitsuru IWASAKI X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: preparation for x86/acpica/acpi_wakeup.c 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, 02 Jun 2012 15:25:57 -0000 Hi, Well I think we are ready to have x86/acpica/acpi_wakeup.c to share acpi_sleep_machdep() and acpi_wakeup_machdep() between amd64 and i386. http://people.freebsd.org/~iwasaki/acpi/x86-acpi_wakeup-20120602.diff There are no functional changes. The following is major changes. amd64: - Add suspend/resume related members in PCB. - Add suspendctx() in cpu_switch.S. - acpi_switch.S moved into cpu_switch.S as resumectx(). amd64, i386: - Add pcb_flags bit PCB_SUSPENDING to indicate AP is wakeup or not. Please review the patches, suggestions welcome. I'm going to commit this 1 week later. Thanks From owner-freebsd-acpi@FreeBSD.ORG Sat Jun 2 16:37:26 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 EA46C106566C for ; Sat, 2 Jun 2012 16:37:26 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 645868FC0C for ; Sat, 2 Jun 2012 16:37:26 +0000 (UTC) Received: by laai10 with SMTP id i10so2816053laa.13 for ; Sat, 02 Jun 2012 09:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=nrFZyJ7DodW3oZNF4tb8QTh7iSqubFnx+hKBvrJK4Bs=; b=kDE1Q6HTUNdGXmnXL8Wox5UwP3Z76ZX+YqnwWL9YJlrWyg922MHCz4OqyU2slKVPkc cINCGjgCHm7gs665D1o0cTsdc7IE8Es8e8eUlkbsH2zOtLzrwGW9jucO0sNN1hcyeqpu GSWM5jBY1UOm3dAQ5In3vLmx1Q+dq9EQ18MBqUIw/I3JhmYTR4Rn+BHeu9XibL13Eevp tLx8jOaxJaGKqO5Gt0tcx15K3fWY9JKHlixquluWyqMiUXu3SG7zgTf9dk78T3uOWj4d 0kRzzn076nG3vKq1tI/JDpaNhnSodUyHvqfiEDe4hpMHuRuL/pcuYaRhfNOCAoJ8mUkM W2SA== MIME-Version: 1.0 Received: by 10.112.42.34 with SMTP id k2mr3754861lbl.0.1338655045006; Sat, 02 Jun 2012 09:37:25 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.27.65 with HTTP; Sat, 2 Jun 2012 09:37:24 -0700 (PDT) In-Reply-To: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> References: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> Date: Sat, 2 Jun 2012 17:37:24 +0100 X-Google-Sender-Auth: fpODTT12zDZHsKQqMZLijDOhmEM Message-ID: From: Attilio Rao To: Mitsuru IWASAKI Content-Type: text/plain; charset=UTF-8 Cc: freebsd-acpi@freebsd.org Subject: Re: preparation for x86/acpica/acpi_wakeup.c 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, 02 Jun 2012 16:37:27 -0000 2012/6/2 Mitsuru IWASAKI : > Hi, > > Well I think we are ready to have x86/acpica/acpi_wakeup.c to share > acpi_sleep_machdep() and acpi_wakeup_machdep() between amd64 and i386. > > http://people.freebsd.org/~iwasaki/acpi/x86-acpi_wakeup-20120602.diff IWASAKI-san, the move of the file makes most of the patch to acpi_wakeup.c unreadable (in order to determine the code changing for adaping back and forth from i386 to amd64). For the sake of reviewers, can you please simply patch the amd64 version in a way that it shows clearly the changes to get i386 (or the other way around)? Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-acpi@FreeBSD.ORG Sat Jun 2 16:52:31 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 949F01065674; Sat, 2 Jun 2012 16:52:31 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 42EB98FC0A; Sat, 2 Jun 2012 16:52:31 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q52GqTSo026516; Sun, 3 Jun 2012 01:52:29 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Sun, 03 Jun 2012 01:52:29 +0900 (JST) Message-Id: <20120603.015229.02270533.iwasaki@jp.FreeBSD.org> To: attilio@freebsd.org From: Mitsuru IWASAKI In-Reply-To: References: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: preparation for x86/acpica/acpi_wakeup.c 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, 02 Jun 2012 16:52:31 -0000 Hi, > the move of the file makes most of the patch to acpi_wakeup.c > unreadable (in order to determine the code changing for adaping back > and forth from i386 to amd64). > For the sake of reviewers, can you please simply patch the amd64 > version in a way that it shows clearly the changes to get i386 (or the > other way around)? Sorry about that. Here is the patches amd86 to x86 version of acpi_wakeup.c: http://people.freebsd.org/~iwasaki/acpi/acpi_wakeup-amd64-x86-20120603.diff i386 to x86 is at: http://people.freebsd.org/~iwasaki/acpi/acpi_wakeup-i386-x86-20120603.diff Thanks From owner-freebsd-acpi@FreeBSD.ORG Sat Jun 2 21:39:19 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 CB366106566B for ; Sat, 2 Jun 2012 21:39:19 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4B8CD8FC12 for ; Sat, 2 Jun 2012 21:39:19 +0000 (UTC) Received: by lbon10 with SMTP id n10so3056711lbo.13 for ; Sat, 02 Jun 2012 14:39:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=O0Ran4sjHzTmQznzGHpZkgWdTRkqJqKTG+I0EJPNzPc=; b=qcNMvj9x4k8qtbBV+gio/jIJ3Dpp5AmlXsSqkATGbGnj7MAoEoOIbxyFu/g5OW2Evt hfHTjBZ+g+XFYwxki6wiYY3SxGqKJbKo95sysvRHb0dnT6oiaN3NAmWidWPlL/bn3Zwi ytDiEdFJvVyADu+xurkj8rUvucj7g9a0VYNYkbUkEe5iObo2QOF1NZpMvp8l87EcNRFs npe9VwvKN1wS4J8rvxStvT6rlpV1SIrL1cbRV1mZXRNO3L54p7ALzL4NnU+GLJku+cb7 pYj/4YLWMRbkzS90m7MxiCVoX7FSSt+56nofgmzAWmQKUM6Pf2TiJ1zXjJRhsBhAicy9 uiBg== MIME-Version: 1.0 Received: by 10.152.104.171 with SMTP id gf11mr7618942lab.5.1338673158018; Sat, 02 Jun 2012 14:39:18 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.27.65 with HTTP; Sat, 2 Jun 2012 14:39:17 -0700 (PDT) In-Reply-To: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> References: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> Date: Sat, 2 Jun 2012 22:39:17 +0100 X-Google-Sender-Auth: QwEwbOF4BScMtq3EEwA-bienoyA Message-ID: From: Attilio Rao To: Mitsuru IWASAKI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-acpi@freebsd.org Subject: Re: preparation for x86/acpica/acpi_wakeup.c 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, 02 Jun 2012 21:39:19 -0000 2012/6/2 Mitsuru IWASAKI : > Hi, > > Well I think we are ready to have x86/acpica/acpi_wakeup.c to share > acpi_sleep_machdep() and acpi_wakeup_machdep() between amd64 and i386. > > http://people.freebsd.org/~iwasaki/acpi/x86-acpi_wakeup-20120602.diff > > There are no functional changes. =C2=A0The following is major changes. > amd64: > - Add suspend/resume related members in PCB. > - Add suspendctx() in cpu_switch.S. > - acpi_switch.S moved into cpu_switch.S as resumectx(). > > amd64, i386: > - Add pcb_flags bit PCB_SUSPENDING to indicate AP is wakeup or not. I still didn't review your patch in detail, but I think PCB_SUSPENDING is not really the way it should be done. PCB datas are about the thread state on a particular CPU and the suspension of the CPU has not much to do with the thread state. It should be more a CPU state itself. This area is very weak in FreeBSD right now, however, but I will try to dump my thinking on it right now. The first thing to consider is that right now we only have 2 states for CPUs: started and stopped. These states are controlled by started_cpus and stopped_cpus masks respectively. It seems you really want to add an intermediate level among the 2 where you have: started -> suspended -> started -> suspended ... -> stopped and you need to expand the mechanism for dealing with started and stopped cpus to do that. I'm pretty sure this will be very helpful also for other architectures that want to do the same. This is however a larger patch and you want probabilly implement it in a second round of changes. For the moment dropping the paranoid check on PCB_SUPENDING is good enough in order to evaluate the merge of the amd64/i386. Attilio --=20 Peace can only be achieved by understanding - A. Einstein