LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Howto shutdown Slackware correctly (https://www.linuxquestions.org/questions/slackware-14/howto-shutdown-slackware-correctly-686618/)

Supporter1984 11-27-2008 07:18 AM

Howto shutdown Slackware correctly
 
Hi guys, ive been searching around and i havent been able to get a valid final answer on how to properly shutdown my slackware machine.

shutdown -h now | /sbin/poweroff | halt | What?

Any ideas?

Thanks.

hitest 11-27-2008 07:31 AM

A little more information would be helpful. So shutdown -h now doesn't work? What happens when you issue that command? I have an aging Plll running Slackware 12.1 and to get it to fully shutdown I need to modify lilo.conf and add acpi=force.

Code:

# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0 acpi=force"
boot = /dev/hda


ChrisAbela 11-27-2008 07:32 AM

It depends if you are logged in a Command line terminal or in Windows Manager. In UNIX, the best way to shutdown is
Quote:

shutdown -h now
because shutdown has many more options than halt.

bgeddy 11-27-2008 07:45 AM

Code:

su -c poweroff
is what I always use.
Quote:

I need to modify lilo.conf and add acpi=force.
Some of my older machines need this and some ancient ones won't powerdown properly at all !

Supporter1984 11-27-2008 07:48 AM

When i use shutdown -h now it comes to an finishing line that says System halted.

Is that allright? Can i power off my machine then?

hitest, what do you mean with "fully shutdown"? You mean it have to go power off by its own?

*sorry for my bad english

hitest 11-27-2008 07:55 AM

Quote:

Originally Posted by Supporter1984 (Post 3356660)
When i use shutdown -h now it comes to an finishing line that says System halted.

Is that allright? Can i power off my machine then?

hitest, what do you mean with "fully shutdown"? You mean it have to go power off by its own?

*sorry for my bad english

Yes. You can power down then when it says system halted. If you want it to shut off completely when you issue shutdown -h now you can try to add acpi=force to /etc/lilo.conf with a text editor (see my code above). For example:

# nano etc/lilo.conf

When you make your changes make sure to run lilo to update lilo.conf.

Supporter1984 11-27-2008 08:25 AM

Well i did this:

* Added the line append=" vt.default_utf8=0 acpi=force"to my lilo.conf
* Runned my lilo before shuting down, doing /sbin/lilo
* Shutdown -h now
* It stayed like before, on System halted.

Should i add the whole line ou only acpi=force ?

Thanks for the help so far guys.

H_TeXMeX_H 11-27-2008 08:27 AM

Can you provide a bit more info on your computer, how old is it ? is it a laptop or desktop ? what brand if any ?

Supporter1984 11-27-2008 08:31 AM

Its a Desktop Pentium II
Dell Optiplex GX1
512 RAM

Dual boot with windows

dive 11-27-2008 09:38 AM

Dont know how old that is but maybe its using apm rather than acpi? Is there an apm kernel append line?

hitest 11-27-2008 09:47 AM

Quote:

Originally Posted by Supporter1984 (Post 3356694)
Well i did this:

* Added the line append=" vt.default_utf8=0 acpi=force"to my lilo.conf
* Runned my lilo before shuting down, doing /sbin/lilo
* Shutdown -h now
* It stayed like before, on System halted.

Should i add the whole line ou only acpi=force ?

Thanks for the help so far guys.

Your line should look like mine; just add acpi=force to the end.

Edit: added later. Try a re-boot to see if that allows the changes to lilo to take effect.

bgeddy 11-27-2008 10:04 AM

Quote:

Dont know how old that is but maybe its using apm rather than acpi? Is there an apm kernel append line?
From the /usr/src/linux/arch/i386/kernel/apm.c kernel source file :
Code:

/*
 * See Documentation/Config.help for the configuration options.
 *
 * Various options can be changed at boot time as follows:
 * (We allow underscores for compatibility with the modules code)
 *        apm=on/off                        enable/disable APM
 *            [no-]allow[-_]ints                allow interrupts during BIOS calls
 *            [no-]broken[-_]psr                BIOS has a broken GetPowerStatus call
 *            [no-]realmode[-_]power[-_]off        switch to real mode before
 *                                                    powering off
 *            [no-]debug                        log some debugging messages
 *            [no-]power[-_]off                power off on shutdown
 *            [no-]smp                        Use apm even on an SMP box
 *            bounce[-_]interval=<n>        number of ticks to ignore suspend
 *                                            bounces
 *          idle[-_]threshold=<n>      System idle percentage above which to
 *                                      make APM BIOS idle calls. Set it to
 *                                      100 to disable.
 *          idle[-_]period=<n>          Period (in 1/100s of a second) over
 *                                      which the idle percentage is
 *                                      calculated.
 */

I've tried mucking about with these but some older boxes (as in PII's) refuse to powerdown for me.

H_TeXMeX_H 11-27-2008 10:10 AM

Quote:

Originally Posted by Supporter1984 (Post 3356700)
Its a Desktop Pentium II
Dell Optiplex GX1
512 RAM

Dual boot with windows

For such an old computer I would disable ACPI and use APM instead. So use this kernel option:

Code:

acpi=off

lumak 11-27-2008 10:51 AM

I thought Slackware was set up so that pressing (not holding) the power button will shut everything down. Additionally can't you always 'sudo init 0' ??

dive 11-27-2008 11:16 AM

You the acpi config file has the power button to init 0 but it has never worked for me, although I'm glad cos a few times I've to hard reset by holding power button.

jstephens84 11-27-2008 11:23 AM

didn't see this suggested or maybe it was and I glanced over it but you can initiate the following.
Code:

shutdown -hP now
this will try to power down the server as long as your acpi supports it. But yes when your system says it is halted it can be manually powered down.

bgeddy 11-27-2008 11:35 AM

Quote:

I thought Slackware was set up so that pressing (not holding) the power button will shut everything down. Additionally can't you always 'sudo init 0' ??
Running init 0 as root will call rc.0 effectively shutting down the machine but the powerdown problem will be the same as if running poweroff or shutdown -h now had been ran. The problem is usually with a kernel setting which may be fixed by passing a boot time parameter.

Woodsman 11-27-2008 12:21 PM

Quote:

It stayed like before, on System halted.
If the computer BIOS and power supply do not support APM or ACPI then you will not be able to enjoy automatic power down. I have a box with a 1997 Asus TXP4 motherboard (Socket 7) that supports APM but not ACPI. The power supply does not support either therefore I cannot power down the box automatically. When the screen displays 'system halted' I then manually press the power button.

If you believe the power supply and BIOS support power management, and the box was built before the year 2000, then as previously suggested consider disabling acpi (acpi=off) and use APM. If I recall correctly, however, the stock Slackware huge kernel does not have APM built in. You'll have to recompile the kernel to obtain APM features.

If you are interested in using APM then perhaps the following might help:

Configuring the APM Daemon

linuxpokernut 11-27-2008 02:10 PM

Am I missing why I can't just use
Code:

su
poweroff

?

Ilgar 11-27-2008 02:22 PM

Quote:

Originally Posted by Woodsman (Post 3356934)
If the computer BIOS and power supply do not support APM or ACPI then you will not be able to enjoy automatic power down.

I have a PIII Dell Optiplex GX110 from 1997, though not with me right now, but it should at least support APM. I remember using Slackware >=10 and some other distros on it and automatic shutdown was working.

GazL 11-27-2008 02:29 PM

My Dell XPS P3-800 works just fine under slackware. When I switch off, I just logout, press the power button on the front panel and it runs shutdown for me. When I tried OpenBSD on this same hardware, I was getting the same problem as you describe with slackware. I get the feeling these early APM systems were a bit hit and miss.

gnashley 11-27-2008 02:49 PM

Try to find out if your BIOS supports acpi or apm:
dmesg |grep acpi
dmesg |grep apm

I too, would most likely try using apm on an older machine. In that case you'd need to make sure the apm kernel module is loaded before shutting doen with 'poweroff'. I use a home-made shutdown GUI that mdoprobes the apm module before shutting down, if ti isn't already loaded.
You may alos need to adjust your BIOS settings. Some BIOS'es can use either apm or acpi, so you may be able to choose which way to go.

adriv 11-27-2008 04:32 PM

I've been struggling with this matter on one machine (P4, 2005) for quite some time now and haven't solved it so far.
As far as I know, you cannot get APM to work on a SMP-kernel (correct me if I'm wrong). Building my own kernel didn't work either, so I'm curious, has anyone gotten this to be solved by using the non-smp-kernel?

Edit:
Just tried that, no such luck...


All times are GMT -5. The time now is 06:14 PM.