LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [BUG?] APM is hidden in menuconfig
@ 2008-02-20 12:08 Jarek Poplawski
  2008-02-21  0:23 ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Jarek Poplawski @ 2008-02-20 12:08 UTC (permalink / raw)
  To: linux-kernel

Hi,

I needed APM to have poweroff on old box. So, in 2.6.24.2 menuconfig:

1) Power management options -->
   No APM.
2) [*] Power Management support
   No APM. I can see ACPI...
3) I try searching with "/" + "APM"
   APM [=n]
   Depends on: !X86_VOYAGER && X86_32 && PM_SLEEP && !X86_VISWS
4) I check above: all correct except:
   Symbol: PM_SLEEP [=n]
   No more "depends on".
5) Exit menuconfig - enter grep:
6) Some time wasting in arch/.
7) less kernel/power/Kconfig:
   config PM_SLEEP
        bool
        depends on SUSPEND || HIBERNATION
        default y
   ... 
   config SUSPEND
        bool "Suspend to RAM and standby"
        depends on PM
        depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
        default y
        ---help---
          Allow the system to enter sleep states in which main memory is
          powered and thus its contents are preserved, such as the
          suspend-to-RAM state (i.e. the ACPI S3 state).

8) Back to menuconfig:
   [*] Suspend to RAM and standby

   Bingo! APM revealed! (And not even "DEPRECATED"!)

So, has it to be so hard? It seems not - at least in good old times...

Regards,
Jarek P.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG?] APM is hidden in menuconfig
  2008-02-20 12:08 [BUG?] APM is hidden in menuconfig Jarek Poplawski
@ 2008-02-21  0:23 ` Rafael J. Wysocki
       [not found]   ` <E1JS02I-0003gO-Py@faramir.fjphome.nl>
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2008-02-21  0:23 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: linux-kernel

On Wednesday, 20 of February 2008, Jarek Poplawski wrote:
> Hi,
> 
> I needed APM to have poweroff on old box. So, in 2.6.24.2 menuconfig:
> 
> 1) Power management options -->
>    No APM.
> 2) [*] Power Management support
>    No APM. I can see ACPI...
> 3) I try searching with "/" + "APM"
>    APM [=n]
>    Depends on: !X86_VOYAGER && X86_32 && PM_SLEEP && !X86_VISWS
> 4) I check above: all correct except:
>    Symbol: PM_SLEEP [=n]
>    No more "depends on".
> 5) Exit menuconfig - enter grep:
> 6) Some time wasting in arch/.
> 7) less kernel/power/Kconfig:
>    config PM_SLEEP
>         bool
>         depends on SUSPEND || HIBERNATION
>         default y
>    ... 
>    config SUSPEND
>         bool "Suspend to RAM and standby"
>         depends on PM
>         depends on SUSPEND_UP_POSSIBLE || SUSPEND_SMP_POSSIBLE
>         default y
>         ---help---
>           Allow the system to enter sleep states in which main memory is
>           powered and thus its contents are preserved, such as the
>           suspend-to-RAM state (i.e. the ACPI S3 state).
> 
> 8) Back to menuconfig:
>    [*] Suspend to RAM and standby
> 
>    Bingo! APM revealed! (And not even "DEPRECATED"!)
> 
> So, has it to be so hard? It seems not - at least in good old times...

Something in APM uses some code from drivers/base/power/main.c that depends
on PM_SLEEP.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG?] APM is hidden in menuconfig
       [not found]   ` <E1JS02I-0003gO-Py@faramir.fjphome.nl>
@ 2008-02-21  1:21     ` Rafael J. Wysocki
  2008-02-21  7:43       ` Jarek Poplawski
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2008-02-21  1:21 UTC (permalink / raw)
  To: Frans Pop; +Cc: jarkao2, linux-kernel

On Thursday, 21 of February 2008, Frans Pop wrote:
> Rafael J. Wysocki wrote:
> > On Wednesday, 20 of February 2008, Jarek Poplawski wrote:
> >> So, has it to be so hard? It seems not - at least in good old times...
> > 
> > Something in APM uses some code from drivers/base/power/main.c that
> > depends on PM_SLEEP.
> 
> Sure, but that does not make Jarek's point invalid. From a user PoV APM is a
> high-level configuration option. That is what he wants.
> It should thus be easily accessible and not be buried beneath a lot of
> other, much more technical, options.
> 
> Could this maybe be solved by making APM automatically 'select' some options
> instead of 'depending' on them?

That, unfortunately, doesn't work.

IMO the solution might be to separate the APM suspend code from the rest of the
APM code and make it depend on (PM_SUSPEND && APM).

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG?] APM is hidden in menuconfig
  2008-02-21  1:21     ` Rafael J. Wysocki
@ 2008-02-21  7:43       ` Jarek Poplawski
  2008-02-21  8:23         ` Jarek Poplawski
  0 siblings, 1 reply; 5+ messages in thread
From: Jarek Poplawski @ 2008-02-21  7:43 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Frans Pop, linux-kernel

On Thu, Feb 21, 2008 at 02:21:52AM +0100, Rafael J. Wysocki wrote:
> On Thursday, 21 of February 2008, Frans Pop wrote:
> > Rafael J. Wysocki wrote:
> > > On Wednesday, 20 of February 2008, Jarek Poplawski wrote:
> > >> So, has it to be so hard? It seems not - at least in good old times...
> > > 
> > > Something in APM uses some code from drivers/base/power/main.c that
> > > depends on PM_SLEEP.
> > 
> > Sure, but that does not make Jarek's point invalid. From a user PoV APM is a
> > high-level configuration option. That is what he wants.
> > It should thus be easily accessible and not be buried beneath a lot of
> > other, much more technical, options.

Probably Frans is right: this should be my point... But I'm not so
"greedy", and I would be happy if it were at least more visible. It
simply seems to me quite not obvious to even think about turning
SUSPEND on when I have problems with a basic acpi function.

Even more interesting question is why this APM or PM_SLEEP dependency
on SUSPEND (or HIBERNATION) isn't visible with "/" searching: PM_SLEEP
looks like some "hidden" option - that's why I tried first to find some
comment in arch/ instead of simply reading Kconfig.

> > Could this maybe be solved by making APM automatically 'select' some options
> > instead of 'depending' on them?
> 
> That, unfortunately, doesn't work.
> 
> IMO the solution might be to separate the APM suspend code from the rest of the
> APM code and make it depend on (PM_SUSPEND && APM).

...Or at least to mention APM in SUSPEND title and description.
Actually, this is really strange: both SUSPEND and PM_SLEEP have
default = y. So it seems they are intended to be more "advertised"
than they are?

Thanks & regards,
Jarek P.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [BUG?] APM is hidden in menuconfig
  2008-02-21  7:43       ` Jarek Poplawski
@ 2008-02-21  8:23         ` Jarek Poplawski
  0 siblings, 0 replies; 5+ messages in thread
From: Jarek Poplawski @ 2008-02-21  8:23 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Frans Pop, linux-kernel

On Thu, Feb 21, 2008 at 07:43:46AM +0000, Jarek Poplawski wrote:
...
> ...Or at least to mention APM in SUSPEND title and description.
> Actually, this is really strange: both SUSPEND and PM_SLEEP have
> default = y. So it seems they are intended to be more "advertised"
> than they are?

Now I see it could be even stranger: it *is* visible by default(!)
after make defconfig. make menuconfig does something else: it seems
to "help me" and sees some other config (current kernel is in other
directory) even after deleting .config and make mrproper. So, maybe
this started because of this and the problem is with changing this
back.

Jarek P.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-21  8:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-20 12:08 [BUG?] APM is hidden in menuconfig Jarek Poplawski
2008-02-21  0:23 ` Rafael J. Wysocki
     [not found]   ` <E1JS02I-0003gO-Py@faramir.fjphome.nl>
2008-02-21  1:21     ` Rafael J. Wysocki
2008-02-21  7:43       ` Jarek Poplawski
2008-02-21  8:23         ` Jarek Poplawski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).