2002-04-18 20:36:20

by Christian Schoenebeck

[permalink] [raw]
Subject: power off (again)

>>> please cc me, I'm offlist <<<

Hi!

I'm still fighting the problem that power off doesn't work with one of our
machines since moving from 2.2.19 to 2.4.7 kernel.

I compared both apm.c versions (1.13ac and 1.14) but there are no 'real'
changes to the functions involved in the shutdown process, except some
minor changes to macro definitions.

'cat /proc/apm' says '1.14 1.2 0x03 0x01 0xff 0x80 -1% -1 ?' which are all
normal values for non-notebooks.

I'm a little bit stuck with this and I have no idea what to look for so hints
would be highly appreciated!

Christian Schoenebeck

P.S. Yes, apm is supported by the bios, I have enabled apm, I tried real mode
power off, I tried using apm as module and also tried acpi instead


2002-04-18 21:03:08

by Trever L. Adams

[permalink] [raw]
Subject: Re: power off (again)

Just out of curiosity, have you changed your power off scripts to
reflect: "halt -p". I can't remember where you make this change on
RedHat, but I had to make it to make 2.4.x work for power down (Actually
it was 2.3.xx where the change was made, I believe).

Trever

2002-04-19 13:03:34

by Christian Schoenebeck

[permalink] [raw]
Subject: Re: power off (again)

Am Donnerstag, 18. April 2002 23:02 schrieb Trever L. Adams:
> Just out of curiosity, have you changed your power off scripts to
> reflect: "halt -p".

Yes, this is not the problem

2002-04-19 13:02:12

by Christian Schoenebeck

[permalink] [raw]
Subject: Re: power off (again)

> > >>> please cc me, I'm offlist <<<

Am Donnerstag, 18. April 2002 22:46 schrieb Marcelo de Paula Bezerra:
> Did you enable acpi and apm? Only apm, or only acpi?

I tried: APM only, ACPI only and I'm not really sure, but I think I also
tried ACPI & APM, but AFAIK this automatically enables just one of them
anyway.

>
> On Thu, 2002-04-18 at 17:40, Christian Schoenebeck wrote:
> >
> > Hi!
> >
> > I'm still fighting the problem that power off doesn't work with one of
> > our machines since moving from 2.2.19 to 2.4.7 kernel.

2002-04-19 13:02:07

by Christian Schoenebeck

[permalink] [raw]
Subject: Re: power off (again)

Am Freitag, 19. April 2002 06:56 schrieb [email protected]:
> On Thu, Apr 18, 2002 at 10:40:06PM +0200, Christian Schoenebeck wrote:
> > I'm still fighting the problem that power off doesn't work with one of
> > our machines since moving from 2.2.19 to 2.4.7 kernel.
>
> I have no idea if this will help but most of my systems have
>
> append="apm=power-off"
>
> in their lilo config.

And ours append="apm=on", but I also tried apm=power-off - didn't help

2002-04-19 23:01:18

by Rob Landley

[permalink] [raw]
Subject: Re: power off (again)

On Friday 19 April 2002 08:58 am, Christian Schoenebeck wrote:
> Am Donnerstag, 18. April 2002 23:02 schrieb Trever L. Adams:
> > Just out of curiosity, have you changed your power off scripts to
> > reflect: "halt -p".
>
> Yes, this is not the problem

Just thought I'd give a "me too" response. The Red Hat 7.2 kernel powers
down all three systems I've tried it on (a Dell Inspiron 3500 laptop, a
Toshiba Tecra 8000, and an SIS chipset motherboard). The 2.4.18 and 2.4.17
kernels do NOT power down any of those systems (It will spins down the hard
drive instead, but the system power stays on. Yes, I'm compiling in the
right APM support. I've tried it both with and without the "use APM bios to
power down" switch.)

The only difference between boots is the kernel. Haven't had time to really
look into it, but a quick check of the code didn't reveal any obviously
cuplable differences between the apm power down functions under the arch
directory. It seems like something else in the system state is getting
twiddled that turns a turn-the-machine-off request into a "reduce power but
stay on" request that just spins down the hard drive...

Dunno.

Rob

2002-04-19 23:01:09

by Rob Landley

[permalink] [raw]
Subject: Re: power off (again)

On Friday 19 April 2002 08:56 am, Christian Schoenebeck wrote:
> Am Freitag, 19. April 2002 06:56 schrieb [email protected]:
> > On Thu, Apr 18, 2002 at 10:40:06PM +0200, Christian Schoenebeck wrote:
> > > I'm still fighting the problem that power off doesn't work with one of
> > > our machines since moving from 2.2.19 to 2.4.7 kernel.
> >
> > I have no idea if this will help but most of my systems have
> >
> > append="apm=power-off"
> >
> > in their lilo config.
>
> And ours append="apm=on", but I also tried apm=power-off - didn't help

Oh, forgot to mention earlier...

The machines that refuse to actually switch off all SUSPEND just fine.
They'll power down most of the way and stay suspended on battery power for a
week.

It's just that when you tell them to actually switch off, use NO battery, and
reboot when you come back up... Then they won't even suspend, they just stay
on but spin the hard drive down.

Weird, eh?

Rob

2002-04-20 13:04:00

by Christian Schoenebeck

[permalink] [raw]
Subject: Re: power off (again)

>>> please cc me, I'm offlist <<<

Am Freitag, 19. April 2002 17:52 schrieb Rob Landley:
> On Friday 19 April 2002 08:58 am, Christian Schoenebeck wrote:
> > Am Donnerstag, 18. April 2002 23:02 schrieb Trever L. Adams:
> > > Just out of curiosity, have you changed your power off scripts to
> > > reflect: "halt -p".
> >
> > Yes, this is not the problem
>
> Just thought I'd give a "me too" response. The Red Hat 7.2 kernel powers
> down all three systems I've tried it on (a Dell Inspiron 3500 laptop, a
> Toshiba Tecra 8000, and an SIS chipset motherboard). The 2.4.18 and 2.4.17
> kernels do NOT power down any of those systems (It will spins down the hard
> drive instead, but the system power stays on. Yes, I'm compiling in the
> right APM support. I've tried it both with and without the "use APM bios
> to power down" switch.)
>

And I already thought I was the only one having that problem.

Meanwhile Wolfgang Loeffler told me the possibility that power off also won't
work if you enabled SMP on a uniprocessor machine. It wasn't a solution for
my machine as I haven't compiled the kernel with SMP support, but maybe it's
one for yours.

2002-04-20 14:24:38

by Thunder from the hill

[permalink] [raw]
Subject: Re: power off (again)

--- /etc/rc.d/init.d/halt Mon Mar 18 06:27:37 2002
+++ /etc/rc.d/init.d/halt~ Sat Apr 20 08:20:00 2002
@@ -234,3 +234,3 @@

-HALTARGS="-i -d -p"
+HALTARGS="-i -d"
if [ -f /halt ]; then


Attachments:
halt.diff (187.00 B)

2002-04-20 19:34:43

by Rob Landley

[permalink] [raw]
Subject: Re: power off (again)

On Saturday 20 April 2002 09:06 am, Christian Schoenebeck wrote:
> >>> please cc me, I'm offlist <<<
>
> Am Freitag, 19. April 2002 17:52 schrieb Rob Landley:
> > On Friday 19 April 2002 08:58 am, Christian Schoenebeck wrote:
> > > Am Donnerstag, 18. April 2002 23:02 schrieb Trever L. Adams:
> > > > Just out of curiosity, have you changed your power off scripts to
> > > > reflect: "halt -p".
> > >
> > > Yes, this is not the problem
> >
> > Just thought I'd give a "me too" response. The Red Hat 7.2 kernel powers
> > down all three systems I've tried it on (a Dell Inspiron 3500 laptop, a
> > Toshiba Tecra 8000, and an SIS chipset motherboard). The 2.4.18 and
> > 2.4.17 kernels do NOT power down any of those systems (It will spins down
> > the hard drive instead, but the system power stays on. Yes, I'm
> > compiling in the right APM support. I've tried it both with and without
> > the "use APM bios to power down" switch.)
>
> And I already thought I was the only one having that problem.
>
> Meanwhile Wolfgang Loeffler told me the possibility that power off also
> won't work if you enabled SMP on a uniprocessor machine. It wasn't a
> solution for my machine as I haven't compiled the kernel with SMP support,
> but maybe it's one for yours.

Nope. SMP is off.

It might be a configuration thing. Maybe. I suppose I could compare the red
hat and 2.4.18 .config files to see if anything obvious jumps out at me.

But it does suspend just fine. That's the odd part...

Rob

2002-04-20 19:44:14

by Rob Landley

[permalink] [raw]
Subject: Re: power off (again)

On Saturday 20 April 2002 10:24 am, Thunder from the hill wrote:
> Hi,
>
> Trever L. Adams wrote:
> > I can't remember where you make this change on RedHat
>
> Should be /etc/rc.d/init.d/halt. See appended patch.
>
> Regards,
> Thunder

Unless your patch is reversed, that's what I've got (on the red hat systems,
the linux from scratch systems use BSD style init scripts because I'm not
THAT masochistic). It doesn't help.

I've also wandered through arch/i386/kernel/apm.c enough to confirm that
apm_power_off() does seem to be getting called. And the hard drive does
audibly spin down on the systems that have the case off, it just doesn't stop
throwing out a video signal to the monitor, using the processor to heat the
room, etc...

I might get some time to thump onn it more this weekend, but it's pretty far
down on the to-do list...

Rob

2002-04-20 22:46:58

by Trever L. Adams

[permalink] [raw]
Subject: Re: power off (again)

On Sat, 2002-04-20 at 06:45, Rob Landley wrote:
> Unless your patch is reversed, that's what I've got (on the red hat systems,
> the linux from scratch systems use BSD style init scripts because I'm not
> THAT masochistic). It doesn't help.

It is reversed. If you want power off, you do need the -p.

Trever

2002-04-20 23:24:23

by Thunder from the hill

[permalink] [raw]
Subject: Re: power off (again)

Hi,

On 20 Apr 2002, Trever L. Adams wrote:
> It is reversed. If you want power off, you do need the -p.
Sure. I accidently mixed those files... As you could see, the halt was
removed, the halt~ inserted...

Regards,
Thunder
--
Thunder from the hill.
Not a citizen of any town. Not a citizen of any state.
Not a citizen of any country. Not a citizen of any planet.
Citizen of our universe.

2002-04-21 10:45:40

by Rob Landley

[permalink] [raw]
Subject: Re: power off (again)

On Saturday 20 April 2002 07:24 pm, Thunder from the hill wrote:
> Hi,
>
> On 20 Apr 2002, Trever L. Adams wrote:
> > It is reversed. If you want power off, you do need the -p.
>
> Sure. I accidently mixed those files... As you could see, the halt was
> removed, the halt~ inserted...
>
> Regards,
> Thunder

In any case, I just re-verified: "halt -p", as root, from the command line,
takes the machine down to the "Power down" message, parks the hard drive, but
leaves the rest of the system on. This is on both a linux from scratch
system and a Red Hat system, both of which have been known to power down
before (with a different kernel).

It still might be my .config, although a config that produces a kernel that
powers down for suspend but won't power down on halt, on three radically
different systems (dell, toshiba, sis)...

I'll thump on it some more later.

Rob

2002-04-22 05:40:47

by Akkana

[permalink] [raw]
Subject: Re: power off (again)

Rob Landley writes:
> Just thought I'd give a "me too" response. The Red Hat 7.2 kernel powers
> down all three systems I've tried it on (a Dell Inspiron 3500 laptop, a
> Toshiba Tecra 8000, and an SIS chipset motherboard). The 2.4.18 and 2.4.17
> kernels do NOT power down any of those systems

Christian Schoenebeck writes:
> I tried: APM only, ACPI only and I'm not really sure, but I think I also
> tried ACPI & APM, but AFAIK this automatically enables just one of them

Another data point: VIA KT266 chipset (MSI mobo) and ALI Magick1 chipset
(Soyo mobo), kernels 2.4.7, 2.4.17 and 2.4.18: enabling ACPI makes the
system power down correctly. It doesn't matter whether APM is enabled,
nor whether "use real mode APM to power down" is enabled. Single
processor, no SMP support in the kernel. (Distro kernels tested:
stock Redhat 7.1, 7.2, and Mandrake 8.1 kernels do not power the
system down; the stock SuSE 7.3 kernel does.)

...Akkana