# System reboots instead of poweroff

## drescherjm

I have a dual Opteron K8 board Supermicro HDCI and I am having a lot of difficulty getting the system to poweroff in linux. If I boot freedos on UBCD (Ultimate Boot CD) and type poweroff from there it powers off. But in linux (tried several versions) power off results in powering off the hard drives and then a second or two later the hard drives and fans spin back up the system does the normal initialization beep and then it boots... The frustrating thing is at one point hibernate powered down the system but now even that causes a reboot. Any ideas how to begin to solve this. I have googled this several times but it there are too many results and most of them are either for ancient kernels or halting with the message "Power Down" on the screen.

----------

## jcat

Have you tried just running 

```
shutdown -h now
```

 or 

```
tellinit 0
```

 or just 

```
halt
```

?

Do you have the ACPI daemon running?

Cheers,

jcat

----------

## ZeuZ_NG

What about directly issuing the command "poweroff" ?

What's the output of that? does the system reboot or actually shuts down?

----------

## drescherjm

I just tried halt and it did the same as poweroff and hibernate as I described above. This time I believe I saw a "Power Down" at the bottom of the output just before the reboot. I am now hooking up a serial console to grab the output. 

Also acpid is running.

----------

## jcat

I know it's unlikely given that works properly off a boot CD, but it maybe worth having a little dig around in the BIOS, make sure there's no strange acpi or shutdown/startup options.

Cheers,

jcat

----------

## drescherjm

Yes it definitly says Power Down before the reboot.

```

nfsmount          | * ERROR: nfsmount failed to stop

alsasound         | * Unloading ALSA modules ...

netmount          | [ ok ]

rpc.statd         | * Stopping NFS statd ...

rpc.statd         | [ ok ]

net.eth0          | * Bringing down interface eth0

net.lo            | * Bringing down interface lo

portmap           | * Stopping portmap ...

portmap           | [ ok ]

alsasound         | [ ok ]

net.eth0          | *   Stopping dhcpcd on eth0 ...

net.eth0          | [ ok ]

localmount        | * Unmounting loopback devices

localmount        | *   Unmounting /tmp/squash_dir.readonly.qS9koI ...

localmount        | [ ok ]

localmount        | *   Unmounting /tmp/squash_dir.readonly.d0FZzk ...

localmount        | [ ok ]

localmount        | *   Unmounting /tmp/squash_dir.readonly.DyriGc ...

localmount        | [ ok ]

localmount        | * Unmounting filesystems

localmount        | *   Unmounting /usr/src/linux-2.6.26-openvz-patched ...

localmount        | [ ok ]

 * Remounting remaining filesystems read-only ...

 *   Remounting / ...

 [ ok ]

 [ ok ]

[   70.480950] Power down.
```

@jcat 

I tried a couple of different settings for acpi but none have changed this behavior.

----------

## ZeuZ_NG

What about directly disabling it? (acpi=off) have you tried it? any difference?

----------

## drescherjm

That caused a kernel panic.

```
root (hd0,0)                                                                    

 Filesystem type is ext2fs, partition type 0x83                                 

kernel /kernel-genkernel-x86_64-2.6.26-nopreempt-squashfs-serial-00028-gc00febb 

-dirty root=/dev/ram0 init=/linuxrc real_root=/dev/sdb5 acpi=off console=ttyS0, 

115200 noexec32=off md-mod.start_dirty_degraded=1                               

   [Linux-bzImage, setup=0x2c00, size=0x255990]                                 

initrd /initramfs-genkernel-x86_64-2.6.26-nopreempt-squashfs-serial-00028-gc00f 

ebb-dirty                                                                       

   [Linux-initrd @ 0x37ded000, 0x202e9d bytes]                                  

                                                                                

Probing EDD (edd=off to disable)... ok                                          [    0.000000] L8

[    0.000000] Command line: root=/dev/ram0 init=/linuxrc real_root=/dev/sdb5 acpi=off console=t1

[    0.000000] BIOS-provided physical RAM map:                                  

[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)         

[    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)       

[    0.000000]  BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)       

[    0.000000]  BIOS-e820: 0000000000100000 - 000000009ffd0000 (usable)         y) 23:08:10

[    0.000000]  BIOS-e820: 000000009ffd0000 - 000000009ffde000 (ACPI data)      

[    0.000000]  BIOS-e820: 000000009ffde000 - 00000000a0000000 (ACPI NVS)       

[    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)       

[    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)       

[    0.000000]  BIOS-e820: 00000000ff700000 - 0000000100000000 (reserved)       

[    0.000000] max_pfn_mapped = 1048576                                         

[    0.000000] init_memory_mapping                                              

[    0.000000] DMI 2.3 present.                                                 

[    0.000000] Scanning NUMA topology in Northbridge 24                         

[    0.000000] Number of nodes 2                                                

[    0.000000] Node 0 MemBase 0000000000000000 Limit 0000000040000000           

[    0.000000] Node 1 MemBase 0000000040000000 Limit 000000009ffd0000           

[    0.000000] Using node hash shift of 30                                      

[    0.000000] Intel MultiProcessor Specification v1.4                          

[    0.000000] MPTABLE: OEM ID: TEMPLATE Product ID: ETEMPLATE    <6>MPTABLE: Product ID: ETEMPL0

[    0.000000] Bootmem setup node 0 0000000000000000-0000000040000000                            

[    0.000000]   NODE_DATA [0000000000001000 - 0000000000004fff]                                 

[    0.000000]   bootmap [000000000000d000 -  0000000000014fff] pages 8                          

[    0.000000]   early res: 0 [0-fff] BIOS data page                                             

[    0.000000]   early res: 1 [6000-7fff] TRAMPOLINE                                             

[    0.000000]   early res: 2 [200000-79053f] TEXT DATA BSS                                      

[    0.000000]   early res: 3 [37ded000-37fefe9c] RAMDISK                                        

[    0.000000]   early res: 4 [9e000-fffff] BIOS reserved                                        

[    0.000000]   early res: 5 [8000-cfff] PGTABLE                                                

[    0.000000] Bootmem setup node 1 0000000040000000-000000009ffd0000                            

[    0.000000]   NODE_DATA [0000000040000000 - 0000000040003fff]                                 

[    0.000000]   bootmap [0000000040004000 -  000000004000ffff] pages c                          

[    0.000000] Zone PFN ranges:                                                                  

[    0.000000]   DMA             0 ->     4096                                                   

[    0.000000]   DMA32        4096 ->  1048576                                                   

[    0.000000]   Normal    1048576 ->  1048576                                                   

[    0.000000] Movable zone start PFN for each node                                              

[    0.000000] early_node_map[3] active PFN ranges                                               

[    0.000000]     0:        0 ->      159                                                       

[    0.000000]     0:      256 ->   262144                                                       

[    0.000000]     1:   262144 ->   655312                                                       

[    0.000000] Nvidia board detected. Ignoring ACPI timer override.                              

[    0.000000] If you got timer trouble try acpi_use_timer_override                              

[    0.000000] Detected use of extended apic ids on hypertransport bus                           

[    0.000000] Detected use of extended apic ids on hypertransport bus                           

[    0.000000] Intel MultiProcessor Specification v1.4                                           

[    0.000000] MPTABLE: OEM ID: TEMPLATE Product ID: ETEMPLATE    <6>MPTABLE: Product ID: ETEMPL0

[    0.000000] Processor #0 (Bootup-CPU)                                                         

[    0.000000] Processor #1                                                                      

[    0.000000] I/O APIC #2 Version 17 at 0xFEC00000.                                             

[    0.000000] I/O APIC #3 Version 17 at 0xBFEFE000.                                             

[    0.000000] I/O APIC #4 Version 17 at 0xBBBFE000.                                             

[    0.000000] I/O APIC #5 Version 17 at 0xBBBFF000.                                             

[    0.000000] Setting APIC routing to flat                                                      

[    0.000000] Processors: 2                                                                     

[    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000                 

[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e8000                 

[    0.000000] PM: Registered nosave memory: 00000000000e8000 - 0000000000100000                 

[    0.000000] Allocating PCI resources starting at a8000000 (gap: a0000000:5ec00000)            

[    0.000000] SMP: Allowing 2 CPUs, 0 hotplug CPUs                                              

[    0.000000] PERCPU: Allocating 31088 bytes of per cpu data                                    

[    0.000000] Built 2 zonelists in Node order, mobility grouping on.  Total pages: 643443       

[    0.000000] Policy zone: DMA32                                                                

[    0.000000] Kernel command line: root=/dev/ram0 init=/linuxrc real_root=/dev/sdb5 acpi=off co1

[    0.000000] Initializing CPU#0                                                                

[    0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)                             

[    0.000000] TSC calibrated against PIT                                                        

[    0.000000] Marking TSC unstable due to TSCs unsynchronized                                   

[    0.000000] time.c: Detected 2400.019 MHz processor.                                          

[    0.003333] Console: colour VGA+ 80x25                                                        

[    0.003333] console [ttyS0] enabled                                                           

[    0.003333] Checking aperture...                                                              

[    0.003333] Node 0: aperture @ 18000000 size 32 MB                                            

[    0.003333] Aperture pointing to e820 RAM. Ignoring.                                          

[    0.003333] No AGP bridge found                                                               

[    0.003333] Memory: 2571828k/2621248k available (3192k kernel code, 49032k reserved, 1413k da)

[    0.086939] Calibrating delay using timer specific routine.. 4803.92 BogoMIPS (lpj=8003075)   

[    0.100711] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)                

[    0.109999] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)                  

[    0.115663] Mount-cache hash table entries: 256                                               

[    0.120238] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)                 

[    0.126666] CPU: L2 Cache: 1024K (64 bytes/line)                                              

[    0.129999] CPU 0/0 -> Node 0                                                                 

[    0.133000] Page beancounter hash is 262144 entries.                                          

[    0.139999] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000         

[    0.139999] IP: [<0000000000000000>]                                                          

[    0.139999] PGD 0                                                                             

[    0.139999] Oops: 0010 [1] SMP                                                                

[    0.139999] CPU: 0                                                                            

[    0.139999] Modules linked in:                                                                

[    0.139999] Pid: 1, comm: swapper Not tainted 2.6.26-nopreempt-squashfs-serial-00028-gc00febb1

[    0.139999] RIP: 0010:[<0000000000000000>]  [<0000000000000000>]                              

[    0.139999] RSP: 0000:ffffffff806fef60  EFLAGS: 00010046                                      

[    0.139999] RAX: 0000000000000000 RBX: ffffffff80680540 RCX: 0000000095811bfb                 

[    0.139999] RDX: ffffffff8068ef00 RSI: ffffffff80680540 RDI: 0000000000000000                 

[    0.139999] RBP: 0000000000000000 R08: 0000000000000010 R09: 0000000000000010                 

[    0.139999] R10: 000000000000000f R11: ffffffff805cbb49 R12: 0000000000000000                 

[    0.139999] R13: ffffffff80680590 R14: 0000000000000000 R15: 0000000000000004                 

[    0.139999] FS:  0000000000000000(0000) GS:ffffffff80680000(0000) knlGS:0000000000000000      

[    0.139999] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b

[    0.139999] CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006e0

[    0.139999] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000

[    0.139999] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400

[    0.139999] Process swapper (pid: 1, veid=0, threadinfo ffff81009f060000, task ffff81003f4734)

[    0.139999] Stack:  ffffffff80263469 ffffffff8020d08c 0000000000000030 0000000000000000

[    0.139999]  0000000000000000 00000000ffffffff ffffffff8020f2bd 0000000000000000

[    0.139999]  000000000024a2ad ffff81009f061d30 ffffffff8020c411 ffff81009f061d30

[    0.139999] Call Trace:

[    0.139999]  <IRQ>  [<ffffffff80263469>] handle_level_irq+0x3c/0xdf

[    0.139999]  [<ffffffff8020d08c>] call_softirq+0x1c/0x28

[    0.139999]  [<ffffffff8020f2bd>] do_IRQ+0x6c/0xd3

[    0.139999]  [<ffffffff8020c411>] ret_from_intr+0x0/0xa

[    0.139999]  <EOI>  [<ffffffff8021233d>] native_read_tsc+0xd/0x1d

[    0.139999]  [<ffffffff803a0b4c>] __delay+0x1c/0x41

[    0.139999]  [<ffffffff806acf3c>] timer_irq_works+0x1f/0x42

[    0.139999]  [<ffffffff806ad3e1>] setup_IO_APIC+0x482/0x6a7

[    0.139999]  [<ffffffff806ab2bf>] native_smp_prepare_cpus+0x246/0x29d

[    0.139999]  [<ffffffff806a0823>] kernel_init+0x59/0x29c

[    0.139999]  [<ffffffff8020cd18>] child_rip+0xa/0x12

[    0.139999]  [<ffffffff806a07ca>] kernel_init+0x0/0x29c

[    0.139999]  [<ffffffff8020cd0e>] child_rip+0x0/0x12

[    0.139999]

[    0.139999]

[    0.139999] Code:  Bad RIP value.

[    0.139999] RIP  [<0000000000000000>]

[    0.139999]  RSP <ffffffff806fef60>

[    0.139999] CR2: 0000000000000000

[    0.139999] ---[ end trace 4eaa2a86a8e2da22 ]---

[    0.139999] Kernel panic - not syncing: Aiee, killing interrupt handler!

```

----------

## ZeuZ_NG

So basically, that kinda confirms the ACPI issue, is your hardware ACPI capable? or is it APM capable? 

Was ACPI and it's drivers/modules built-in the kernel?

----------

## drescherjm

ACPI version 2.0

BIOS date: March 03, 2007

ACPI drivers are builtin to the kernel.

----------

## ZeuZ_NG

 *drescherjm wrote:*   

> ACPI version 2.0
> 
> BIOS date: March 03, 2007
> 
> ACPI drivers are builtin to the kernel.

 

Perhaps you could build a test kernel based upon your current configuration, and set some things (not as the power governor) as modular, and see what happens... 

If so, perhaps it's a section mismatch error that can be debugged later so you can have it built in. 

If not, perhaps a kernel specific bug related to your hardware? 

By this time, have you tried updating the BIOS of the troublesome machine?

----------

## drescherjm

 *Quote:*   

> By this time, have you tried updating the BIOS of the troublesome machine?

 

Yes. This is the latest bios and probably the last one to be released being that it is for socket 940 which has been discontinued.

----------

## ZeuZ_NG

Just a guess then, but, are you using a vanilla kernel? have you patched it with something?

I guess you could try another version, 2.6.25 and 2.6.26 are known to be buggy with ACPI, in my laptop for a problem not too similar to yours, I had to downgrade to 2.6.24.7 for example

----------

## drescherjm

 *Quote:*   

> Just a guess then, but, are you using a vanilla kernel? have you patched it with something? 

 

No. I am using a patched openvz kernel based on the latest git + squashfs so I can run VPS containers on it. I can try a vanilla kernel. I did have the same problem with a livecd but I don't know the kernel version.

----------

## ZeuZ_NG

if you're using your kernel with some GIT branch prepatches or patches, then you should go for a vanilla kernel to test that..

As we know, GIT holds the latest yet not totally stable fixes/patches/features

----------

## drescherjm

vanilla-sources-2.6.25.9 had the same problem. I will eventually try an older kernel to see if that helps.

----------

## ZeuZ_NG

 *drescherjm wrote:*   

> vanilla-sources-2.6.25.9 had the same problem. I will eventually try an older kernel to see if that helps.

 

Well, I wouldn't have used vanilla sources from the portage tree, but from kernel.org or some mirror...

Dunno if those are currently the same ones, would have to download the vanilla sources and compare the sums later.

Still, going to 2.6.25 is still a bad desition as for ACPI related problems come to, since the last more stable and "untroublesome" was 2.6.24(.7 in my case)

----------

## jcat

FYI

As far as I know, Vanilla sources are un-tampered with and should be the same as kernel sources available anywhere else.

They're in portage for convenience.

Cheers,

jcat

----------

