From owner-freebsd-arch@FreeBSD.ORG Fri May 9 20:12:29 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89EEAA2D; Fri, 9 May 2014 20:12:29 +0000 (UTC) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E793E9F; Fri, 9 May 2014 20:12:29 +0000 (UTC) Received: by mail-pa0-f46.google.com with SMTP id kq14so658345pab.19 for ; Fri, 09 May 2014 13:12:29 -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:message-id:subject :from:to:cc:content-type; bh=dLioNfn9FiVlEvybSPFIB3tkoFEK0Cb2/x+2/OcG0KY=; b=bSF7pBEaJKVTdAyXSiA6XL6qVZRoTI7QAGvjBlYfzTt+8rrAkqcg6iTiHqHrEcF0su Q6wcfVx7lPuBV6DACxK2mJp8KKv7uuvgcUNaT1NkWI699ypyuOYTuO0cVi2pIGKmnEgc GR+JwIBJlZZThaxsIwxBPi4Ce6IwQna9tJgSpzFrp9XsjO/Ss1/ihZB97S+ko5YjNEot Z219UHgWeBirSnYHrrTeULHVBVFEsXuTELTRV4SrLMFXoTUPmu8H/PinUuADOv1EcVFd A/TQjf6cnD601EKbMYm71IMKcYwSuaeEW5t4oiarwsw/S5nmD5ZTC8/NQAVPOPKY2T+v tkeg== MIME-Version: 1.0 X-Received: by 10.67.8.102 with SMTP id dj6mr24209393pad.10.1399666348963; Fri, 09 May 2014 13:12:28 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.66.73.34 with HTTP; Fri, 9 May 2014 13:12:28 -0700 (PDT) In-Reply-To: References: <20140505011654.O11699@sola.nimnet.asn.au> <2223.1399233644@critter.freebsd.dk> <20140505153421.W11699@sola.nimnet.asn.au> <85787.1399271121@critter.freebsd.dk> <20140505163316.R11699@sola.nimnet.asn.au> <7681.1399629328@critter.freebsd.dk> Date: Fri, 9 May 2014 13:12:28 -0700 X-Google-Sender-Auth: L9x_f_czLEgBkIM9ioseXVAWcpY Message-ID: Subject: Re: proposal: set default lid state to S3, performance/economy Cx states to Cmax From: Kevin Oberman To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: Poul-Henning Kamp , "freebsd-arch@freebsd.org" , Ian Smith , "freebsd-acpi@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 20:12:29 -0000 On Fri, May 9, 2014 at 3:25 AM, Adrian Chadd wrote: > Hi! > > On 9 May 2014 02:55, Poul-Henning Kamp wrote: > > In message <20140505163316.R11699@sola.nimnet.asn.au>, Ian Smith writes: > >>On Mon, 5 May 2014 06:25:21 +0000, Poul-Henning Kamp wrote: > >> > In message <20140505153421.W11699@sola.nimnet.asn.au>, Ian Smith > writes: > >> > > >> > Do we have a canonical page with all the various workarounds one > should > >> > attempt in order to get suspend/resume to work ? > >> > >>Bits scattered all over the place. For the above there's: > > > > So based on various scattered hints, I tried booting the VT kernel, > > r265336, on my Thinkpad T430s and that seems to fix both Suspend/Resume > > and also console switching. > > > > Much appreciated! > > > > I'll keep an eye on any peripheral bogons as I used it now. > > Woo! > > Would you mind populating http://wiki.freebsd.org/Laptops with your > details? > > Thanks! > > > -a > Excellent! This alone will save batteries and also lower the carbon footprint of FreeBSD servers! Just to clarify the various settings of *_cx_lowest in rc.conf, HIGH is obvious. At one time, LOW was also obvious, but then some vendors started shipping BIOS that "skipped" some C-states in different power conditions. E.g. C1, C2 and C3 when on Battery, but only C1 and C3 when on AC. This scenario was common on Sandybridge systems (like my T320). Skipping a state broke "LOW" as it only saw C1 when on AC. Thus, Cmax appeared. Cmax is simply C8. It is just easier ot remember then C8. The code was re-written to ignore "missing" C-states and try all possible C-states until C8 was reached. Why "LOW" was not just changed to deal with this I don't understand, but Cmax (or C8) is recommended to gain the maximum power savings from C-states. On AC power: dev.cpu.0.cx_supported: C1/1/1 C2/3/104 dev.cpu.0.cx_lowest: C8 dev.cpu.0.cx_usage: 8.86% 91.13% last 2685us On battery: dev.cpu.0.cx_supported: C1/1/1 C2/2/80 C3/3/109 dev.cpu.0.cx_lowest: C8 dev.cpu.0.cx_usage: 3.09% 0.74% 96.15% last 728us Note the supported list on AC? C2/3/104 The first part, "C2", is what the OS labels that second state. The next part, "3", is the ACPI number of this state. On AC, this system has no C-state 2, so FreeBSD call the ACPI state 3 "C2". Oh, the last number is the number of clock cycles required to get into/out of that state. so in my case, when on battery, my CPU goes ot C2 after being halted for 80 clock cycles and C3 after 109. I hope this makes sense to everyone. I'm not really sure that it does to me! -- R. Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com