# Shutdown problems

## Hailtiki

The 2.6 kernels have been giving me problems when I shutdown. 2.4 worked fine (even auto-powered off the machine). The first time I used 2.6 (I believe it was 2.6.1) and tried to shutdown, the screen went black and I could hear what I believe to be the hard drive parking, but the machine would hang. Nothing I did would turn it off, not even holding in the power button for 10+ seconds. I had to unplug it. I traced this back to ACPI easily enough by disabling ACPI in my BIOS. When I shutdown this way, it would simply say, "Power Down" and I'd hit the power button on my computer... Inconvient, but it worked. All of the kernels I tried up to 2.6.5 worked like this. Oddly enough, if I tried to compile the kernel without any power management, it wouldn't boot, so I had to compile both ACPI and APM into the kernel and disable ACPI in my BIOS.

I've recently updated to 2.6.7 however (first r1 and now r5, which both act in the same way). I got r5 to compile without any power management... Although, oddly enough, I'm still getting an ACPI related message in dmesg: "ACPI: Unable to locate RSDP". With ACPI still disabled in my BIOS, when I shutdown, I again hear that familiar sound of my hard drive parking, but then, immediately after that, I hear it spin up again. I still only need to push the power button to turn off the computer, but it annoys me to no end that my hard drive has to park twice just to turn off my computer. ICK!

When I was using r1 (and had power management compiled in), I tried enabling ACPI in my BIOS and ran into the same problem as before (I've now dubbed the "black screen of death"). I have not tried enabling it with my r5 kernel, which theoretically has no power management compiled in and it should have no effect... I destinctly remember disabling that when I compiled it... but that ACPI message from dmesg makes me wonder...

Any suggestions would be great. I don't mind that I have to physically push the power button to turn off my computer, as long as the hard drive doesn't park itself and then spin up again before I do it. It would be great if I could get it to auto-power off too, but hey, I'll take what I can get!

----------

## curtis119

powering off the machine automatically is only possible with ACPI. You MUST enable this in the BIOS for it to work. That's probably why you are getting an error message.

----------

## monkey89

Actually, it's possible with apm.  That's the way I do it - no ACPI compiled into the kernel, just have APM enabled.  No user-space daemons either.

Yes, this is a desktop.

-Monkey

----------

## Hailtiki

Yes, I'm aware automatic power off is only possible with ACPI or APM, but like I said, enabling either one of those gives me the "black screen of death" when I run the shutdown command. It looks like the computer is going to power off... the screen goes blank, I hear the click of my hard drive, but the computer remains on and nothing I do short of pulling the plug makes it turn off... and I mean nothing... I've held in the power button for a good 15-20 seconds and nothing would happen... Reset button did nothing... Ctrl+Alt+Delete did nothing (I didn't expect it to though... I figure the kernel is unloaded by then so it wouldn't do anything).

I meant to post my specs with my original post, but I forgot... here they are:

Tyan Tiger MP S2460 motherboard

Dual Athlon MP 1800+'s

768 Meg of PC2100, Registered, ECC

APM is almost entirely disabled when running a multiprocessor system... according to the kernel documentation anyway.

Oh, I'm also not getting any error messages... as far as the messages that appear on screen are concerned, everything is running smoothly.

----------

## randomusername01

I have the same motherboard (Tyan Tiger MP S2460) you have and I had the same problem. The solution I have found is to compile APM in the kernel, turn off ACPI in the BIOS and add this command, apm=power-off, to your kernel options. That is the only way I can get it to automatically shutdown under the 2.6.x kernels and I have tried almost everything. 

My question is: Are there any adverse effects of having ACPI disabled on a SMP system?

----------

## Hailtiki

Well, I've had ACPI disabled in my BIOS since I installed 2.6 which was at the beginning of this year... I haven't noticed any adverse effects. Thanks for the info!!! I'll give that a try when I get a chance (probably tomorrow).

----------

## Hailtiki

I tried the APM "fix" and it didn't work. I get "apm: BIOS not found" when I boot and the computer doesn't turn off when I shutdown. What other options did you enable under APM when you compiled your kernel?

----------

## [Lx]-=Mystify=-

i have exactly the same problem...

while searching i found this thread in the forums. 

the described problem there is exactly the same... at the end of the thread is a bug report, in it's comments leads to this bug report on the kernel bug tracker.

in comments i read that the problem appears since 2.6.2, while earlier versions shut the system down clearly.

in comment #6 is a attachment linked, with a patch to version 1.23 of 'hwsleep.c' which should correct the bug.

i haven't tried it yet, but some people seem to have success with it...

maybe it'll help you!

----------

## [Lx]-=Mystify=-

yeah, the patch solved the shutdown-problem for me...

----------

## Hailtiki

Thanks for the heads up! I'm compiling the patch into linux-2.6.7-gentoo-r9 as I type this and I'll let you know how things go when I boot my machine again in the morning =)

----------

## Hailtiki

Success! Thank you much! I've been trying to solve this problem since January!

Patch from "comment #6" (see link above) applied to linux-2.6.7-gentoo-r9 and kernel recompiled to enable ACPI (disabled APM)... Reenabled ACPI in my BIOS, worked like a charm.

----------

## [Lx]-=Mystify=-

yeah, that's exactly what it was for me...

but one problem still remains: when i do 'init 6' to reboot my machine i get through the bios's (mainboard, ide-raid, scsi), and then the message 'No operating system found' appears on the screen and i have to pull my reset button, to boot.

is there a way, to say the kernel that it should reset the machine the way the reset-switch does it when reboot?

----------

## bludger

The second patch

http://bugme.osdl.org/attachment.cgi?id=2578&action=view

seems to be for ACPI-CA.  There is a comment that you can hand merge for linux.  Does anyone have a clue as to how to do this?

----------

## yannouch

Hi,

I've been searching for a while, I had a similar problem.

When I halted my computer, it automaticaly boot up, didn't shut down.

The problem came for me from a bios setting "allow remote power on"

Actually the network card connected to LAN switched on the computer because it was permanently receiving data.

I've unchecked it in the bios, and now it halts perfectly (Tyan S2603 mobo with dual Xeon in HP X4000 computer)

----------

