LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Poweroff failure to shutdown computer (ACPI ?) = must use power button, solved ? (http://www.linuxquestions.org/questions/linux-general-1/poweroff-failure-to-shutdown-computer-acpi-%3D-must-use-power-button-solved-847236/)

H_TeXMeX_H 11-29-2010 09:42 AM

Poweroff failure to shutdown computer (ACPI ?) = must use power button, solved ?
 
First, I would like to say that this problem has bugged me almost ever since I started using Linux, so I'm really hoping that this is the solution, because I've had enough of it.

The problem is:

The desktop/laptop will sometimes or always not power down after being told to shutdown or poweroff forcing one to use the power button or causing the laptop to overheat inside a carrying bag.

I have recently got the problem again and tried to solve it by compiling newer kernels, and actually it was partly successful at one point. I installed a new kernel, compiled a new nvidia driver and I didn't have any problems for almost a month, but then it started again.

I have noticed that it has something to do with the nvidia driver, because at one point the problem was not present, but then after installed a new nvidia driver, the problem suddenly re-appeared.

Note that the problem is sporadic in that it happens somewhere between 20-80 % of the time (currently). I had a laptop that did it 100% of the time.

Today I have tried the 'pci=nomsi' option and it seems to work ... until further notice.

I was thinking, I know the nvidia driver is often unstable, I know that it uses MSI, so maybe this is indeed the solution ... or to just get rid of nvidia.

With my laptop it stopped happening after only using the 'nv' driver ... that's another clue that leads me to believe this. Somehow the nvidia driver is preventing a proper shutdown through its misuse of MSI. Since I only have one PCI (express) card, it seems ok to disable MSI completely.

I want more input on this, anyone else have this problem ? do you have an nvidia card + nvidia driver ? does 'pci=nomsi' solve it ?

I'm sick of this issue, but this may be the solution ... I'll post after a few weeks of testing if it still seems to be the solution.

szboardstretcher 12-02-2010 02:53 PM

I have the exact same problem -- with a Radeon based laptop. Im going to try this as well. Thank you.

H_TeXMeX_H 12-03-2010 06:19 AM

Unfortunately, although 'pci=nomsi' seemed to work well for the past week, just yesterday it did it again, it wouldn't shutdown properly :(

Have no clue why.

It still seems that pci=nomsi reduces the chance of this.

H_TeXMeX_H 12-08-2010 05:33 AM

It did it again with pci=nomsi, so this is not a solution. Instead I have done this, and it works so far:

I enabled msi and made nvidia use it
Code:

echo 'options nvidia NVreg_EnableMSI=1' > /etc/modprobe.d/nvidia.conf
In the BIOS: I have disabled firewire (as I never use it), correctly set the PCI latency timer to 64 (was 32), turned off speedstep (never use it).

In the kernel and lilo I have disabled any framebuffer or boot splash (I read an ubuntu thread saying this may be the cause), and I added to the append line: "clocksource=hpet acpi=strict".

I don't think the clocksource has anything to do with it, but acpi might.

This is the current output of 'cat /proc/interrupts'

Code:

bash-4.1$ cat /proc/interrupts
          CPU0      CPU1      CPU2      CPU3     
  0:        132          5        10        11  IO-APIC-edge      timer
  1:          0          1          0          1  IO-APIC-edge      i8042
  8:        12        12        11        12  IO-APIC-edge      rtc0
  9:          0          0          0          0  IO-APIC-fasteoi  acpi
 12:          2          0          2          0  IO-APIC-edge      i8042
 17:          1          1          1          0  IO-APIC-fasteoi  ehci_hcd:usb1, uhci_hcd:usb5
 18:      2332      2324      2300      2294  IO-APIC-fasteoi  uhci_hcd:usb3, uhci_hcd:usb8
 19:          0          0          0          0  IO-APIC-fasteoi  uhci_hcd:usb7
 21:      49815      49773      49930      49843  IO-APIC-fasteoi  uhci_hcd:usb4
 23:          0          0          0          0  IO-APIC-fasteoi  ehci_hcd:usb2, uhci_hcd:usb6
 40:      24200      24241      24177      24218  PCI-MSI-edge      ahci
 41:      9221      9218      9209      9252  PCI-MSI-edge      eth0
 42:        49        49        53        52  PCI-MSI-edge      hda_intel
 43:      3952      3972      3905      3914  PCI-MSI-edge      nvidia
NMI:          0          0          0          0  Non-maskable interrupts
LOC:    682776    719248    413540    423869  Local timer interrupts
SPU:          0          0          0          0  Spurious interrupts
PMI:          0          0          0          0  Performance monitoring interrupts
PND:          0          0          0          0  Performance pending work
RES:      4199      4549      3851      4739  Rescheduling interrupts
CAL:      14629      14532      5729      7095  Function call interrupts
TLB:      11975      13338      8744      9646  TLB shootdowns
TRM:          0          0          0          0  Thermal event interrupts
THR:          0          0          0          0  Threshold APIC interrupts
MCE:          0          0          0          0  Machine check exceptions
MCP:        38        38        38        38  Machine check polls
ERR:          3
MIS:          0
bash-4.1$

I'll post back if this doesn't solve it.

H_TeXMeX_H 12-09-2010 05:25 AM

Nope, this doesn't work either.

I'm open to suggestions ... or if you need more info.

H_TeXMeX_H 12-10-2010 01:20 AM

I found some possible boot parameters, I guess I'll try them in order and see if they help. Even now, it will often shutdown properly, but sometimes it hangs.
http://www.brighthub.com/computing/l...les/39504.aspx

catkin 12-10-2010 02:23 AM

Good luck; it sounds like a difficult problem to deal with.

H_TeXMeX_H 12-10-2010 10:00 AM

It is actually very difficult because it doesn't happen all the time. I mean I make some modifications, work for a while, shutdown, repeat, and I think it's gone. Then, 2 days later it happens again !

I still suspect the nvidia driver, because there is absolutely no clue in any of the logs.

H_TeXMeX_H 02-25-2011 07:11 AM

Some recent observations:

It still happens randomly and relatively rarely, but during the latest such hang on shutdown there was something particular. On the next boot I got, for the first time ever, an nvidia splash screen ... which surprised me, because I didn't change anything related to nvidia anytime recently, not drivers, not config, not anything. This leads me to believe that this driver may be the cause, maybe I'll post in the nvidia forums, or switch to nouveau soon.

beethoven57 04-11-2011 11:11 PM

I had this same problem with my Dell E6400 (nvidia quadro nvs 160m) over a year ago when nouveau first came out. The problem occurs whenever the laptop/desktop has been in standby/sleep mode and is then woken up. If you then try to shutdown/restart, it will hang. However, if the laptop/desktop was never in standby mode since booting up, then it shuts down just fine. (That's why it appears to happen occasionally.)

I stopped using the nouveau drivers because I couldn't stand this bug... switched back just now and saw that the bug still exists. Sigh.

H_TeXMeX_H 04-12-2011 10:47 AM

My desktop never goes into sleep/standby, because I have it disabled. Only the screen blanks, that's all.

H_TeXMeX_H 05-02-2011 05:19 AM

I can confirm the problem still exists in the recently release Slackware 13.37. I notice Pat V mentions this in the changes and hints:

Quote:

If you have an older machine (with a BIOS released prior to 2001) and it will
not power off on shutdown, try adding this to your kernel's lilo stanza:
append = "acpi=force"
I have done this and now it does shutdown, but not always / reliably. Sometimes it just hangs at Power Off, just like before. This happened even with the nouveau driver, so I can't really blame nvidia. I have no clue why this happens. My BIOS is newer than 2001.

H_TeXMeX_H 05-18-2011 04:47 AM

I think I may have found the solution, I mean so far it has not done this this week.

The solution seems to be to disable the 'CONFIG_CPU_IDLE' driver. However, in order to do this the processor (CONFIG_ACPI_PROCESSOR) and thermal modules must be disabled. This may be dangerous on laptops or other systems that require them. My system doesn't require these, so I can do it.

I can't find where I got the following (maybe gmane somewhere), but:
I heard that this module has a bug that causes Intel Core 2 processors to not be able to halt on poweroff, sometimes.

I will post here if it does it again, but if it doesn't I will remove 'acpi=force', check again, and then maybe this is the solution !

H_TeXMeX_H 05-20-2011 03:43 AM

Ok, I think I understand now.

With CPU_IDLE disabled and acpi=force it always shuts down properly.
With CPU_IDLE disabled and no acpi=force it never shuts down properly.
With CPU_IDLE enabled it sometimes does not shut down properly (random).

So acpi=force is needed, and disabling CPU_IDLE has a stabilizing effect on this issue.

I think I can mark this solved now. However, I'm not sure why acpi=force is now needed, when in the past it was not.

H_TeXMeX_H 05-28-2011 08:41 AM

It did it again just yesterday :( Have to mark it unsolved. Nothing different in the logs again, it's the same as any other day when it would shut down properly.

Any hints on what to do ? Just keep messing with kernel acpi options ?


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