FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 06-16-2010, 08:18 PM
Amit Kucheria
 
Default UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume

On 10 Jun 16, Leann Ogasawara wrote:
> 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?
>

I think PM is in a lot better shape than 2 years ago. I'd forgotten about it.
Drop it.

It might be worth creating a test kernel with that patch dropped for Lucid
too and posting it to suspend-related bugs.

/Amit

> [1] https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/594885
>
> >From 6063b4dc3721a63d70f81522fa130372ded60b45 Mon Sep 17 00:00:00 2001
> From: Amit Kucheria <amit.kucheria@ubuntu.com>
> 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 <amit.kucheria@ubuntu.com>
>
> Signed-off-by: Ben Collins <ben.collins@canonical.com>
> ---
> 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
> --
> 1.7.0.4
>
>
>
>
>

--
----------------------------------------------------------------------
Amit Kucheria, Kernel Engineer || amit.kucheria@canonical.com
----------------------------------------------------------------------

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 06-16-2010, 08:28 PM
Amit Kucheria
 
Default UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume

On 10 Jun 16, Amit Kucheria wrote:
>
>
> On 10 Jun 16, Leann Ogasawara wrote:
> > 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?
> >
>
> I think PM is in a lot better shape than 2 years ago. I'd forgotten about it.
> Drop it.
>
> It might be worth creating a test kernel with that patch dropped for Lucid
> too and posting it to suspend-related bugs.
>
> /Amit
>

I forgot to mention that it was more of a debugging tool, so I am not sure if
should be enabled by default.

/Amit
--
----------------------------------------------------------------------
Amit Kucheria, Kernel Engineer || amit.kucheria@canonical.com
----------------------------------------------------------------------

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 06-16-2010, 10:40 PM
Lee Jones
 
Default UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume

>> I think PM is in a lot better shape than 2 years ago. I'd forgotten about it.
>> Drop it.

Again, personally I'd like to keep it for use as a debugging tool.

It has served me well over the last few weeks.

By all means turn it off by default, but I'd like to keep it for future use if possible.

Kind regards,
Lee

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 06-16-2010, 11:14 PM
Leann Ogasawara
 
Default UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume

On Wed, 2010-06-16 at 23:40 +0100, Lee Jones wrote:
> >> I think PM is in a lot better shape than 2 years ago. I'd forgotten about it.
> >> Drop it.
>
> Again, personally I'd like to keep it for use as a debugging tool.
>
> It has served me well over the last few weeks.
>
> By all means turn it off by default, but I'd like to keep it for future use if possible.

Even if we do keep it but disable by default, not to mention I'd add to
to the config enforcer, you'll still have to modify the config and build
a custom kernel to enable it. In that sense it seems it wouldn't be
that much more effort to apply the patch at the same time.

By dropping it we avoid having old cruft in the distro kernel which
deviates us from mainline and knowingly breaks suspend/resume for some
users. It also has the potential to add a maintenance burden every time
we rebase and definitely adds additional bloat when we do our delta
review at the beginning of each release cycle.

Give me till tomorrow to ponder over it more. I'd be happy to hear
anyone else's feedback as well.

Thanks,
Leann


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 06-17-2010, 01:55 AM
Tim Gardner
 
Default UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume

On 06/16/2010 05:14 PM, Leann Ogasawara wrote:
> On Wed, 2010-06-16 at 23:40 +0100, Lee Jones wrote:
>>>> I think PM is in a lot better shape than 2 years ago. I'd forgotten about it.
>>>> Drop it.
>>
>> Again, personally I'd like to keep it for use as a debugging tool.
>>
>> It has served me well over the last few weeks.
>>
>> By all means turn it off by default, but I'd like to keep it for future use if possible.
>
> Even if we do keep it but disable by default, not to mention I'd add to
> to the config enforcer, you'll still have to modify the config and build
> a custom kernel to enable it. In that sense it seems it wouldn't be
> that much more effort to apply the patch at the same time.
>
> By dropping it we avoid having old cruft in the distro kernel which
> deviates us from mainline and knowingly breaks suspend/resume for some
> users. It also has the potential to add a maintenance burden every time
> we rebase and definitely adds additional bloat when we do our delta
> review at the beginning of each release cycle.
>
> Give me till tomorrow to ponder over it more. I'd be happy to hear
> anyone else's feedback as well.
>
> Thanks,
> Leann
>
>

+1 for Leann's opinion. You can instrument your own kernels. The distro
does not need to carry this kind of cruft.

rtg
--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 06-17-2010, 06:46 AM
Lee Jones
 
Default UBUNTU: SAUCE: pm: Config option to disable handling of console during suspend/resume

> +1 for Leann's opinion. You can instrument your own kernels. The distro
> does not need to carry this kind of cruft.
>
> rtg

No problem.

I'll add it to my toolbox instead.

Kind regards,
Lee

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 01:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org