Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Helge Deller <helge.deller@sap.com>
To: Hinrich Aue <hinrich_aue@yahoo.de>, parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Power LED
Date: Mon, 18 Feb 2002 12:49:08 +0100	[thread overview]
Message-ID: <E16cmI9-0000SL-00@linuxlab.wdf.sap-ag.de> (raw)
In-Reply-To: <20020218101505.54487.qmail@web21205.mail.yahoo.com>

On Monday 18 February 2002 11:15, Hinrich Aue wrote:
> ------------------------------------------
>
> >715/64, 715/80 and 715/100 belong to the so-called
> >715/new machines and all of those support the
>
> soft-power
>
> >switch, else you wouldn't have received the
> >"Shutdown requested..." message.
> >In your case I assume, that your filesystems wasn't
>
> clean
>
> >before you did shutdown your system....
> >
> >BTW, the shutdown is initiated by the kernel by
>
> sending
>
> >a SIGINT to the PID (cad_pid) of the init process.
>
> This
>
> >is done in the file power.c:
> >http://cvs.parisc-linux.org/linux/arch/parisc/kernel/power.c?rev=1.5&conte
> >nt-type=text/vnd.viewcvs-markup After receiving this signal the init
> > process switches
> >the runlevel,
> >shuts down your system cleanly and runs
>
> /sbin/poweroff
>
> >or /sbin/halt. This is already the case and is also
> >done
> >that way for ATX systems.
> >
> >Regards,
> >Helge
>
> But if I push the power button, the init process
> doesn't seem do change the runlevel, and power off
> immediatly.
> I can see the message "Shutdown requested..." and then
> - power off -.
> I think this souldn't be so.

Yes, that's wrong. But you seem to be the only one
who has such problems with 715/new. As I said in another
mail my Scorpio (715/50) machine shuts down immediately too - 
but this machine doesn't support the soft-power switch either.
BTW, which kernel are you using ?

> Also I think it is a bit dangerous if everyone can
> switch of the system, clean or unclean, just by
> pushing the button.

That's right, but that's also the behaviour on Non-ATX PC's.

> Maybe a 5 second push-time would be good (like ATX)
> but with a gracefull shutdown.

That's not that easy.
On some systems the switch will send a key-down signal from
the first press on, independantly if you released the button again or
not. Other machines just send the signal while the button
is down and stops it again if it was released.

That said, this is how I wrote the code. 
In process_shutdown() you'll find:
       /* wait until the button was pressed for 1 second */
        if (shutdown_timer == HZ) {
                static char msg[] = "Shutting down...";
	    printk(KERN_INFO "%s\n", msg);

This means, that the kernel will just shutdown, if you pressed
the button for at least 1 second. You might change that to 5*HZ if
you want the 5 second push-time. 
But, as I said, the kernel can't recognize on some systems if
you have released the button again and so it will always 
time-out and initiate the shutdown request. Your 715/80 seems
to fall into this category of systems.

Regards,
Helge

  reply	other threads:[~2002-02-18 11:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-18 10:15 [parisc-linux] Power LED Hinrich Aue
2002-02-18 11:49 ` Helge Deller [this message]
2002-02-18 19:29   ` Hinrich Aue
  -- strict thread matches above, loose matches on Subject: below --
2002-02-19  8:50 Hinrich Aue
2002-02-19 11:11 ` Helge Deller
2002-02-18  7:37 Hinrich Aue
2002-02-18  9:21 ` Helge Deller
2002-02-15  7:02 James S
2002-02-15  7:13 ` Christian Suder
2002-02-15  7:26   ` Helge Deller
2002-02-15 12:46     ` Carlos O'Donell Jr.
2002-02-15 22:45     ` Christoph Plattner
2002-02-15  7:19 ` Richard Hirst
2002-02-15 11:17 ` Thibaut VARENE
2002-02-15  5:08 James S
2002-02-15  6:14 ` Grant Grundler
2002-02-15 22:41 ` Christoph Plattner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E16cmI9-0000SL-00@linuxlab.wdf.sap-ag.de \
    --to=helge.deller@sap.com \
    --cc=hinrich_aue@yahoo.de \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox