Created attachment 23138 [details] 2.6.31 .config used on Intel DX58SO mainboard Not sure if it's ACPI related or not... On Intel DX58SO mainboard with 2.6.31 kernel, powering off takes really long. With 2.6.30 these last steps of shutting down the computer take at most 5 seconds: Halting system... [Here up to 5 seconds wait] Power down... [Here the PC is turned off, fan, disks etc. is off] With 2.6.31 with the same .config, it usually takes something around 30-240 seconds, sometimes it takes ~5 minutes; very rarely, it never powers down: Halting system... [Here ~30-240 seconds wait, sometimes more] Power down... [Here the PC is turned off, fan, disks etc. is off] I have the latest BIOS installed; this happened with previous BIOS releases as well.
please boot with boot option printk.time=1, poweroff and boot, then attach the /var/log/messages file.
Created attachment 23147 [details] syslog from bootup till shutdown This is a full syslog output, fro system bootup to system shutdown. Obviously, it doesn't contain a long pause before which the system powers off, as then, syslog does not work anymore. Note that rebooting is very fast with this board (there is no delay after init.d shutdown sequence). Only powering down with 2.6.31 is very long and sometimes, the PC is not powered off (I tested it by waiting up to an hour, when the system was still not powered off - but was waiting: Halting system... [here, a long pause, and below sometimes never happens] Power down... Note that with this syslog, the system has 2 graphics card using proprietary fglrx driver. I tested shutting down without X enabled and without fglrx loaded and it is still long.
Hi, Tomasz Which command is used to power off the box? poweroff or shutdown? Will you please use the following command and see whether it still take long time to shtudown the system? echo shutdown > /sys/power/disk echo disk > /sys/power/state Thanks.
Created attachment 23166 [details] write 0x3C01 to 0x404 and see whether the box is shutdown will you please use the attached IO port tool to write 0x3C01 to 0x404 I/O port and see whether the box can be shutdown? ./iow --addr 0x404 --width 16 --value 0x3C01 Thanks.
Will you please also attach the output of acpidump, lspci -vxxx? Thanks.
Created attachment 23167 [details] acpidump output
Created attachment 23168 [details] lspci -vxxx output
I normally use "halt" to shutdown / poweroff this machine. I'll answer to your other questions in the evening; I only have remote access to this box right now.
When I started: ./iow --addr 0x404 --width 16 --value 0x3C01 it immediately powered off the PC. Is this an expected result?
Yes. This is the expected result. The last step in poweroff/shutdown is to write 0x3C01 to 0x404 I/O port. In such case the box can be poweroff/shutdown. Please use the poweroff to see whether it still takes long time. thanks.
Whether I use shutdown, poweroff or halt, a /etc/init.d/halt script is executed. So I modified this script to see where it "hangs", by adding "-x" at the beginning of the script: #!/bin/bash -x The command which (sometimes) "hangs" with 2.6.31 is /sbin/halt: + exec /sbin/halt -i -d -p The meaning of these parameters is as follow: -d Don't write the wtmp record. The -n flag implies -d. -i Shut down all network interfaces just before halt or reboot. -p When halting the system, switch off the power. This is the default when halt is called as poweroff. Could it be that the network is blocking here? I don't use NFS nor iSCSI on this machine, so it shouldn't be the case. I'll remove the "-i" parameter to see if it changes anything though.
Removing the "-i" parameter does not change anything, powering off can still take very long with 2.6.31.x kernels.
How about the following command? >echo shutdown > /sys/power/disk >echo disk > /sys/power/state It can also be used to shutdown. Thanks.
I was about to bisect it (issue does not happen with 2.6.30; does happen with 2.6.31-rc1). But I just booted and powered off 2.6.32-rc1 several times and I don't see this issue any more. So I think we can close this bug? If it reappears, I'll reopen.
Closing.