Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934608AbYBTUnN (ORCPT ); Wed, 20 Feb 2008 15:43:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758296AbYBTUm1 (ORCPT ); Wed, 20 Feb 2008 15:42:27 -0500 Received: from mga11.intel.com ([192.55.52.93]:11031 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934027AbYBTUmZ (ORCPT ); Wed, 20 Feb 2008 15:42:25 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,382,1199692800"; d="scan'208";a="300314343" From: Jesse Barnes To: Linus Torvalds Subject: Re: 2.6.25-rc2 System no longer powers off after suspend-to-disk. Screen becomes green. Date: Wed, 20 Feb 2008 12:41:30 -0800 User-Agent: KMail/1.9.6 (enterprise 0.20071204.744707) Cc: "Rafael J. Wysocki" , Jeff Chua , lkml , Dave Airlie , linux-acpi@vger.kernel.org, suspend-devel List , Greg KH References: <200802202114.43007.rjw@sisk.pl> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802201241.30952.jesse.barnes@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1643 Lines: 43 On Wednesday, February 20, 2008 12:29 pm Linus Torvalds wrote: > On Wed, 20 Feb 2008, Rafael J. Wysocki wrote: > > I think we should export the target sleep state somehow. > > Yeah. By *not* using "->suspend()" for freezing or hibernate. > > Please, Rafael - just make the f*cking suspend-to-disk use other routines > already. 99% of all hardware needs to do exactly *nothing* on > suspend-to-disk, and the ones that really do need things tend to need to > not do a whole lot. In talking with Rafael on IRC about this, I think we're agreed that we need separate entry points. Even with a kexec based hibernate, we'll probably want ->hibernate callbacks so we don't end up shutting down the device. The current callback system looks like this (according to Rafael and the last time I looked): ->suspend(PMSG_FREEZE) ->resume() ->suspend(PMSG_SUSPEND) *enter S3 or power off* ->resume() The fact that we get suspend/resume called once before suspend again in the hibernate case is somewhat obnoxious, but it's even worse that we don't know what we're about to enter after ->suspend(PMSG_SUSPEND). So in the short term it would be nice to at least get the target state exported. And in the long term we could have: ->suspend() *enter S3* ->resume() or: ->hibernate() *kexec to another kernel to save image* *power off* ->return_from_hibernate() (or somesuch) Jesse -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/