l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 20: Web Application Hacking: How to Make and Break Security on the Web
Next Installfest:
TBD
Latest News:
Oct. 10: LUGOD Installfests coming again soon
Page last updated:
2003 Jun 09 12:03

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Redhat 8.0 shutdown does not power off.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Redhat 8.0 shutdown does not power off.



On Fri, Jun 06, 2003 at 05:35:58PM -0700, Jim Angstadt wrote:
> > - the machine never powered itself off (beside the two times above
> >   and the one time I mentioned) since you started this thread?  (yes
> >   or no)
> 
> Yes.
> 
> > 
> > - the machine *did* power itself off the three
> > times mentioned above?
> >   (yes or no)
> 
> Yes.

okay good.


> The results are mixed:
> 
> With just 'single' added to boot parms:
> 
> 1. s-u-o led to off
> 2. s-u-o led to reboot
> 3. s-u-o led to off
> 4. s-u-o led to off
> 5. s-u-o led to off
> 6. s-u-o led to off
> 
> With 'single apm=realmode_power_off' added:
> 
> 1. s-u-o led to off
> 2. s-u-o led to off
> 3. s-u-o led to reboot
> 4. s-u-o led to off
> 5. s-u-o led to off
> 6. s-u-o led to off

  This is interesting.  It powers off _most_ of the time regardless of
the realmode_power_off setting.  It _seems_ that something that starts 
up during a full system boot is causing the kernel to fail to shutdown
correctly... which is strange.


> To satisfy my own curosity, I ran 
>    grub> halt 
> six times in a row.  All resulted in a power off.

  I don't think there are enough samples to say for sure... it only
failed to shutdown 2 out of 18 tries, for all three methods.


  Also I've looked into the grub and Linux kernel source, they seem to
be calling the exact same APM function, although GRUB works in realmode
and the kernel works in either realmode or 32bit mode, depending on the
setup... it is possible there is a kernel bug, but in the apm.c there have 
been only two minor changes from the 2.4.18 you are running to the
current 2.5.70 so if it is no one else is complaining about it.

  From what I can tell the two patches don't seem to apply to power off,
one deals with bioses that skew the clock without reporting it and
the other is to allow APM to be enabled on SMP machines (which has
been disabled for ages).

  Since grub and the kernel call seem to do very similar things I think 
that if you try halt a dozen times in grub it would fail sometimes
too... if grub fails to halt it would hint strongly that your machine 
BIOS or hardware is acting flaky (like the power supply which Rob Rogers) 
suggested in this thread a long time back.
  If you try grub a bunch and it always turns off power it doesn't
really help narrow down the problem to kernel software, BIOS, or
hardware bug (since the kernel could still be doing something correct
but the BIOS might not like it).  Someone more familiar with how APM
works and what the kernel is doing would have to comment...


If you really want to get it fixed I would suggest:
- Upgrading the kernel to the latest stable version (2.4.20), 
  verifying it happens there...
- Writing up that halt from grub works 100% and halt sysrq-O from kernel 
  works frequently but not always when booted into single user mode, 
  booting into Redhat 8.0 greatly lowers the number of times power off 
  really happens.  Then sending that to the kernel mailing list or 
  the APM maintainer:
===
APM DRIVER
P:      Stephen Rothwell
M:      sfr@canb.auug.org.au
L:      linux-laptop@vger.kernel.org
W:      http://www.canb.auug.org.au/~sfr/
S:      Supported
===

  It looks like it would be possible to copy the code from grub into 
the kernel so they are doing the *exact* same instructions in realmode 
poweroff... but I don't really like messing with assembly code so I 
would be wanting some sort of pay to figure that out and test it here.

  Over list I'd be willing to help with the kernel upgrade to 2.4.20
with and the writeup for the APM people.

    Good Luck,
      Mike Simons

-- 
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56  8109 E10C 249F B7FA ACBE

Attachment: pgp00009.pgp
Description: PGP signature



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.