LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-29-2010, 09:42 AM   #1
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 12-02-2010, 02:53 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
I have the exact same problem -- with a Radeon based laptop. Im going to try this as well. Thank you.
 
Old 12-03-2010, 06:19 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 12-08-2010, 05:33 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 12-09-2010, 05:25 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Nope, this doesn't work either.

I'm open to suggestions ... or if you need more info.
 
Old 12-10-2010, 01:20 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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
 
Old 12-10-2010, 02:23 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Good luck; it sounds like a difficult problem to deal with.
 
Old 12-10-2010, 10:00 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 02-25-2011, 07:11 AM   #9
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 04-11-2011, 11:11 PM   #10
beethoven57
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 0
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.
 
Old 04-12-2011, 10:47 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
My desktop never goes into sleep/standby, because I have it disabled. Only the screen blanks, that's all.
 
Old 05-02-2011, 05:19 AM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 05-18-2011, 04:47 AM   #13
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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 !
 
Old 05-20-2011, 03:43 AM   #14
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 05-28-2011, 08:41 AM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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 ?
 
  


Reply

Tags
acpi, button, msi, poweroff, shutdown


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make the power button work properly without ACPI Lord Estraven *BSD 3 01-01-2010 10:17 PM
Keyboard Power Button to shutdown my computer stringZ Linux - Software 8 10-16-2009 05:23 AM
Power Button for Shutdown gokul Linux - Hardware 4 01-24-2004 12:40 PM
ACPI: shutdown computer by pushing power button... elluva Mandriva 10 12-15-2003 03:57 AM
Shutdown with power button hriosm Linux - Hardware 4 06-06-2003 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration