From patchwork Wed Jun 16 19:42:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leann Ogasawara X-Patchwork-Id: 55929 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id C73E91007D2 for ; Thu, 17 Jun 2010 05:42:18 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OOyV2-0007ZC-3N; Wed, 16 Jun 2010 20:42:12 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OOyV0-0007Z0-Az for kernel-team@lists.ubuntu.com; Wed, 16 Jun 2010 20:42:10 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OOyV0-0008S4-3R; Wed, 16 Jun 2010 20:42:10 +0100 Received: from c-76-105-148-120.hsd1.or.comcast.net ([76.105.148.120] helo=[192.168.1.4]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OOyUz-0007He-MK; Wed, 16 Jun 2010 20:42:10 +0100 Subject: [RFC] [Maverick] UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume From: Leann Ogasawara To: Amit Kucheria Date: Wed, 16 Jun 2010 12:42:06 -0700 Message-ID: <1276717326.2985.1.camel@emiko> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Cc: kernel-team , psusi@cfl.rr.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Hi Amit, We've got a bug report [1] from Phillip (CC'd) that when resuming from suspend on Maverick his display never comes back out of power save mode with the latest 2.6.35 Maverick kernels. He tested yesterday's 2.6.35 daily mainline build and could not reproduce the issue. He was able to narrow it down to the CONFIG_PM_DISABLE_CONSOLE option being enabled. This config option originates from an Ubuntu SAUCE patch (inlined below) which was authored by yourself a few years ago. Is it still necessary that we carry this patch? I'm inclined to drop it, or at least disable the config option, especially since it appears to be causing issues. Your thoughts? Thanks, Leann [1] https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/594885 >From 6063b4dc3721a63d70f81522fa130372ded60b45 Mon Sep 17 00:00:00 2001 From: Amit Kucheria Date: Fri, 23 May 2008 11:43:45 +0300 Subject: [PATCH] UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume Signed-off-by: Amit Kucheria Signed-off-by: Ben Collins --- kernel/power/Kconfig | 15 +++++++++++++++ kernel/power/console.c | 4 ++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 5c36ea9..e829331 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -133,6 +133,21 @@ config SUSPEND_FREEZER config HIBERNATION_NVS bool +config PM_DISABLE_CONSOLE + bool "Disable Power Management messing with the active console" + depends on PM + default n + ---help--- + By default, PM will take over the active console (generally, this means + switching to the console when suspending from X). This can at times cause + problems, especially if userspace suspend scripts try to do things with + the console before or after suspending (e.g. calling vbestate). + + To work around this, enable this option so that PM will not handle the + console. + + If unsure, say N. + config HIBERNATION bool "Hibernation (aka 'suspend to disk')" depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE diff --git a/kernel/power/console.c b/kernel/power/console.c index 218e5af..5b254ba 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c @@ -17,19 +17,23 @@ static int orig_fgconsole, orig_kmsg; int pm_prepare_console(void) { +#ifndef CONFIG_PM_DISABLE_CONSOLE orig_fgconsole = vt_move_to_console(SUSPEND_CONSOLE, 1); if (orig_fgconsole < 0) return 1; orig_kmsg = vt_kmsg_redirect(SUSPEND_CONSOLE); +#endif return 0; } void pm_restore_console(void) { +#ifndef CONFIG_PM_DISABLE_CONSOLE if (orig_fgconsole >= 0) { vt_move_to_console(orig_fgconsole, 0); vt_kmsg_redirect(orig_kmsg); } +#endif } #endif