# [solved] frozen at shutdown

## majoron

Hi,

I have recently bought a Dell xps m1330 and, of course, installed gentoo on it. But not all is nice. I got several annoying issues that I'd like to solve.

One of the problems has to do with shutdown. When I try to shutdown the system, it gets frozen after printing:

```
Unmounting filesystems...   [ok]
```

The logs doesn't say anything, which is expected because syslog-ng stop message comes before the system freezes.

Interestingly the system is able to reboot...

I have been looking for the answer in google + the forums, but everything I find is related with network file systems, which is not my case.

I would say it has to do with the kernel; it must be missconfigured, but I don't know what can be the problem. If there is a kernel guru around willing to help, I would be grateful.

Regards

----------

## bunder

are you using vmware?  one of its init scripts is broken and it tries to unmount something twice at the same time, causing a hang.

https://bugs.gentoo.org/show_bug.cgi?id=228269

----------

## majoron

 *bunder wrote:*   

> are you using vmware?  one of its init scripts is broken and it tries to unmount something twice at the same time, causing a hang.
> 
> https://bugs.gentoo.org/show_bug.cgi?id=228269

 

No vmware yet.

Thank you for the reply though.

----------

## NathanZachary

It doesn't get to the line "System Halted..." and then pause?  It sounds like a problem with ACPI not being able to halt the system.  I had a similar problem where a machine wouldn't power down, but would restart.  Check to make sure that you have all the ACPI kernel components enabled.

----------

## majoron

Thank you, kalos, for the reply.

 *kalos wrote:*   

> It doesn't get to the line "System Halted..." and then pause?

 

No, at least I cannot see it: I must add that the system is not stable yet (there is something else wrong with the X server I believe) and sometimes the system crashes. When that happens X stops working and I see the usual terminal screen, BUT there is a displacement so I cannot directly see where the cursor is: I only see what I write it after hitting enter a few times. I don't think that this is the case now, but I cannot be sure that both problems are not related...

 *kalos wrote:*   

> It sounds like a problem with ACPI not being able to halt the system.  I had a similar problem where a machine wouldn't power down, but would restart.  Check to make sure that you have all the ACPI kernel components enabled.

 

What do you mean by "all the ACPI kernel components"? I have turned on all the options in ACPI section that do not claim to be unstable...

Maybe I have many options enabled?

BTW, my kernel is 2.6.26-gentoo-r4; I'm using AMD64 (core2 duo T9500)

The options related with ACPI:

```
$ grep ACPI /usr/src/linux/.config

CONFIG_X86_64_ACPI_NUMA=y

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_PROCFS=y

CONFIG_ACPI_PROCFS_POWER=y

CONFIG_ACPI_SYSFS_POWER=y

CONFIG_ACPI_PROC_EVENT=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_DOCK=y

CONFIG_ACPI_BAY=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_HOTPLUG_CPU=y

CONFIG_ACPI_THERMAL=y

CONFIG_ACPI_NUMA=y

# CONFIG_ACPI_WMI is not set

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_TOSHIBA is not set

# CONFIG_ACPI_CUSTOM_DSDT is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_SYSTEM=y

CONFIG_ACPI_CONTAINER=y

# CONFIG_ACPI_SBS is not set

CONFIG_X86_ACPI_CPUFREQ=y

CONFIG_X86_POWERNOW_K8_ACPI=y

CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y

CONFIG_PNPACPI=y

# CONFIG_THINKPAD_ACPI is not set

CONFIG_BLK_DEV_IDEACPI=y

CONFIG_ATA_ACPI=y

# CONFIG_PATA_ACPI is not set

```

Again, thanks, and BR.

----------

## IanPo

I've got the same problem having updated from 2.6.26-r3 to -r4.

To turn off my PC i use command "sudo poweroff".

On -r3 it's always been working well.

On -r4 it stopped working.

Now i'm on -r7 and system halts (hard disk stops) after unmounting, the writing "Power down" don't appear.

But if i type "sudo poweroff" after login, it turns off correctly.

I made no changes in kernel when updated from -r3 to -r4.

AMD64 nomultilib.

Intel Core2 Duo E8500

4 Gb DDR-2

GA-G33M-DS2R

----------

## majoron

 *IanPo wrote:*   

> I've got the same problem having updated from 2.6.26-r3 to -r4.
> 
> To turn off my PC i use command "sudo poweroff".
> 
> On -r3 it's always been working well.
> ...

 

Yes!

Thank you, IanPo for the idea. I synced my portage tree and there was a new kernel. I copied the ".config" file, compiled the new kernel with exactly the same options, and shutdown works now.

The version I have now is 2.6.27-gentoo-r7.

Again, thank you.

Best regards.

----------

## IanPo

 *majoron wrote:*   

> 
> 
> I copied the ".config" file, compiled the new kernel with exactly the same options, and shutdown works now.
> 
> The version I have now is 2.6.27-gentoo-r7.
> ...

 

You're welcome =)

But does it always work?

As i found out today, poweroff may halt occasionally  :Sad: 

Could you post some statistics here later?

----------

## majoron

 *IanPo wrote:*   

>  *majoron wrote:*   
> 
> I copied the ".config" file, compiled the new kernel with exactly the same options, and shutdown works now.
> 
> The version I have now is 2.6.27-gentoo-r7.
> ...

 

You cursed me! It happened two times in a row after I read your post!

Indeed, it doesn't work perfect. I didn't make many tests, but I'd say that the system fails to halt 1 time every 4 trials, to say something.

I edited my initial post because the problem is not solved yet, but I hope there will be a definite solution when a new kernel version is unmasked.

BTW, now that I have been thinking in this problem for a while, I remember that my old notebook (vaio also running gentoo) didn't always shutdown properly. I'd say this happens only 1 every 200 times or so in this other system, though...

BR

PS I was kidding about the curse, of course!

----------

## IanPo

1 pass / 1 fail since yesterday.

I found several similar topics in this forum:

https://forums.gentoo.org/viewtopic-t-717906-highlight-poweroff.html

https://forums.gentoo.org/viewtopic-t-718850-highlight-poweroff.html

https://forums.gentoo.org/viewtopic-t-722405-highlight-shutdown.html

https://forums.gentoo.org/viewtopic-t-695280-highlight-poweroff.html

----------

## srbamber

have you tried upgrading to the 2.6.28 kernel?

i could not get my PC to shutdown at all using 2.6.27-gentoo-r7, been fine with all previous versions and upgrading to the (currently unstable) 2.6.28-gentoo restored normal operations

guess someone broke acpi support in 2.6.26/27  :Sad: 

----------

## mobileagent

 *srbamber wrote:*   

> have you tried upgrading to the 2.6.28 kernel?
> 
> i could not get my PC to shutdown at all using 2.6.27-gentoo-r7, been fine with all previous versions and upgrading to the (currently unstable) 2.6.28-gentoo restored normal operations
> 
> guess someone broke acpi support in 2.6.26/27 

 heh, shutdown -h worked great for me UNTIL I upgraded to 2.6.28-gentoo, so...don't know what to tell you there.

----------

## sj.gentoo

did you turn off APM in Power management options -> APM (Avanced power management) BIOS Support. ???

That worked for me.

I read somewhere that, if you have acpi and apm enabled at the same time, i can cause freeze at shutdown.

Try that.   :Very Happy: 

Hope it works for you.

----------

## majoron

With kernel 2.6.28-gentoo-r5 and the same kernel options as before there is no more problem. I mark it as solved.

Regards

----------

