From owner-freebsd-acpi@freebsd.org Thu Feb 11 06:20:05 2016 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64D96AA4B8C for ; Thu, 11 Feb 2016 06:20:05 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00FF1FDA for ; Thu, 11 Feb 2016 06:20:04 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 808F61FE023; Thu, 11 Feb 2016 07:20:02 +0100 (CET) Subject: Re: Regarding Wake On USB input from S3 Sleep To: Dee Zay , freebsd-acpi@freebsd.org References: From: Hans Petter Selasky Message-ID: <56BC289F.2070208@selasky.org> Date: Thu, 11 Feb 2016 07:22:23 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 06:20:05 -0000 On 02/11/16 04:54, Dee Zay wrote: > Dear FreeBSD ACPI Community, > > I am trying to implement WakeOnUSB (e.g. USB keyboard input) from S3 Sleep > state, but have no clue where to start from. > I noticed the PS2 keyboard is capable of waking up a system and also found > there is a PS2 handler portion in asl from acpidump: > > Method (PS2K._PRW, 0, NotSerialized) // _PRW: Power Resources > for Wake > { > Return (GPRW (0x6B, 0x03)) > } > However, there is no such handle for individual usb ports other than its > parent's class (\_SB_.PCI0.XHC_). > Also, I found there are FreeBSD-specific ACPICA C codes under /sys/dev > including acpi_button.c and acpi_lid.c, which are only for the fixed acpi > components. > > So my question is, > Is it possible to implement WakeOnUSB input for individual USB ports by > somehow fixing the ACPICA C codes (without fixing the asl as it is > system-dependent)? If so, how? > > I would really appreciate it if you could help me out here. > > Best regards, > Julian Hi, The USB controller drivers shutdown the HC at suspend and reset at resume. That has proven to work the best. At the moment I think wakeup by USB resume is not supported. --HPS