From owner-freebsd-acpi@FreeBSD.ORG Sun May 4 08:27:39 2014 Return-Path: Delivered-To: freebsd-acpi@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 AC14FA86; Sun, 4 May 2014 08:27:39 +0000 (UTC) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) (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 5EC6C1C57; Sun, 4 May 2014 08:27:39 +0000 (UTC) Received: by mail-qc0-f176.google.com with SMTP id x13so6629258qcv.35 for ; Sun, 04 May 2014 01:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=SJOaulOTSv4UQdCH9/3BW8n8h7iEu4lgIdbH75efsY0=; b=TfQweivZppTF1+TdnafZrV4EIxav+d/SWv+UGP8ziU2u+WVl4tXmNfuE1uIOa5RPVN iEbxJNf6JEmlhqfpEkbnSA/EfYnuvvFdrr0n0iP13Q24X0/2p55eXAIhVByk1T/AE4O2 VkTTEQ87vV1Njty5/42Gake4Yt+fnmR/dMKbG2tQGk3dHedWFiI37dHLb1rVe2muEqrA TDK6xPQF9M3wVW0ScKgVO0TwObweBOpCgdxAF2Y8q/SQXKAbFjPhFSauNoX0TYoUB762 iyXxfcWRrdsQ6aBLnOITo6CL50Nv467O1z+5xPLZfVT0oNUdniav8H0TXyDOhLULGan6 PCRg== MIME-Version: 1.0 X-Received: by 10.140.96.51 with SMTP id j48mr33463775qge.24.1399192058524; Sun, 04 May 2014 01:27:38 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.191.201 with HTTP; Sun, 4 May 2014 01:27:38 -0700 (PDT) Date: Sun, 4 May 2014 01:27:38 -0700 X-Google-Sender-Auth: u8h749eWk6MBEQcd3bo2SBVr0wM Message-ID: Subject: proposal: set default lid state to S3, performance/economy Cx states to Cmax From: Adrian Chadd To: Kevin Oberman , "freebsd-arch@freebsd.org" , "freebsd-acpi@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 08:27:39 -0000 Hi, I'd like to propose flipping a few things: * Flipping the default lid state to S3. I think ACPI suspend/resume seems to work well enough these days and I've not met anyone lately who expects the default from their laptop to be "stay awake with the lid shut." * Save chip bugs that we should add workarounds for, we should be OK to enter lower sleep states when idling. Flipping this may expose some further crazy driver, platform or timer bugs, but they again likely should be fixed. what do people think? -a Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf (revision 265255) +++ etc/defaults/rc.conf (working copy) @@ -642,9 +642,9 @@ devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to # apply (must be mounted already, i.e. fstab(5)) devfs_load_rulesets="YES" # Enable to always load the default rulesets -performance_cx_lowest="HIGH" # Online CPU idle state +performance_cx_lowest="Cmax" # Online CPU idle state performance_cpu_freq="NONE" # Online CPU frequency -economy_cx_lowest="HIGH" # Offline CPU idle state +economy_cx_lowest="Cmax" # Offline CPU idle state economy_cpu_freq="NONE" # Offline CPU frequency virecover_enable="YES" # Perform housekeeping for the vi(1) editor ugidfw_enable="NO" # Load mac_bsdextended(4) rules on boot Index: sys/dev/acpica/acpi.c =================================================================== --- sys/dev/acpica/acpi.c (revision 265255) +++ sys/dev/acpica/acpi.c (working copy) @@ -620,11 +620,12 @@ /* * Dispatch the default sleep state to devices. The lid switch is set - * to UNKNOWN by default to avoid surprising users. + * to S3 to mirror what everything else iBook and later does. */ sc->acpi_power_button_sx = acpi_sleep_states[ACPI_STATE_S5] ? ACPI_STATE_S5 : ACPI_STATE_UNKNOWN; - sc->acpi_lid_switch_sx = ACPI_STATE_UNKNOWN; + sc->acpi_lid_switch_sx = acpi_sleep_states[ACPI_STATE_S3] ? + ACPI_STATE_S3 : ACPI_STATE_UNKNOWN; sc->acpi_standby_sx = acpi_sleep_states[ACPI_STATE_S1] ? ACPI_STATE_S1 : ACPI_STATE_UNKNOWN; sc->acpi_suspend_sx = acpi_sleep_states[ACPI_STATE_S3] ?