Jump to content

Shutdown/Poweroff Fix


ovof
 Share

81 posts in this topic

Recommended Posts

Q6600 on GAP35DS3R -> No poweroff/shutdown (hang @ black screen)

 

In fact, this is a bug with more than 2 cores and ACPI.

 

Here's the fix

 

Short tuto :

1) compile the file onecore.c with CHUD framework

 

It will give you an executable which disable all cores but one. After this, shutdown/poweroff works well on vanilla and Q6600

 

2) manually launch this executable at shutdown, or make a startupitem to make this automatic (like i have)

 

It's great because you don't need any special binaries

 

Bye

 

 

Link to comment
Share on other sites

  • 2 months later...

hey thanks for the guide.

 

Could you add a tutorial on how to compile it (or attach the executable) and how to add it to the startup to boot automatically (im guessing you have to add it to /Library/StartupItems)? A lot of people have no idea how :rolleyes:

Link to comment
Share on other sites

ok i looked into the source code and it apears that if there are more than one processors (as in core 2 duo or quad core) it changes the total number of processors to 1... i am unable to compile as i have never used chud framework

 

so this isnt something you want starting up with your computer but a script to run right before you shutdown\reboot?

Link to comment
Share on other sites

so this isnt something you want starting up with your computer but a script to run right before you shutdown\reboot?

 

yeah i guess. i would suggest that you use cpus=1 rather than using this script in the start. however it may be used right before you decide to restart/shutdown. guys i am not mac guru so i may be wrong... this is what i perceived from the code.

Link to comment
Share on other sites

EDITED 25-feb-2008

XCODE was installed... before trying all of this, ONLY USED THE INSTALLER

 

noticed on a different machine that it is not working 'lack of XCODEtools', so trying with CHUD installer package right now...

 

 

 

 

SOMEONE COMPILED it ;)

 

Can't read the BLOG, but downloading the zip and running the installer was enough

http://cobranail.blogspot.com/

http://cobranail.googlepages.com/poweroff_fix.zip

 

don't know how it works, but seems to install some code in background...

 

tested on q6600 but for sofar DIRECT results :D !!!

 

SHUTDOWN after SLEEP even WORKS :D

Restarts after SLEEP didn't work, but shutdown does...

 

 

thx cobranail

Link to comment
Share on other sites

Does it run constantly (so you only have 1 core everytime) or just activate before shutdown ? Please check if you 2 cores are still "working" in Activity Monitor (if % are used for BOTH of them)

 

EDIT : I have taken a look on the script and it seems it only runs when you shutdown your computer (so it's good), but it doesn't seem to run when restarting. But I guess you can just edit the script (shutdownfix) so after RestartService, it runs /sbin/poweroff_fix too !

Link to comment
Share on other sites

Thanks for the script but it doesn't work for me ;)

 

I installed the scripts and executed the power off fix.

 

The first problem I noticed that the script executed with no errors,

but it still registered that I had 2 of 2 CPUs active. This was worrying because according to the code, the CPU should either throw an Exception trying to shutdown one of the CPU cores, or it should set the CPU count to 1.

 

Mine seemed to neither throw an exception, nor change shutdown a CPU core.

 

So I changed to one core in the BIOS, and tried again, and this time I got a different behavior

After running the poweroff_fix, sleep leads to a reboot :P

And Shutdown/restart lead to a kernel panic error concerning AppleHDA

 

Am I missing something? My configuration below...

 

 

com.apple.driver.AppleHDAController (1.2.4a21) <78 17 6 5 4 2>

com.apple.driver.AppleHDA (1.2.4a21) <78 70 6 5 4 2>

com.apple.iokit.IOUSBFamily (2.7.5) <7 6 5 4>

com.apple.driver.AppleUSBUHCI (2.7.5) <31 17 6 5 4>

com.apple.driver.AppleUSBEHCI (2.7.5) <31 17 6 5 4>

com.apple.iokit.IOUSBUserClient (2.7.6) <31 12>

com.apple.driver.AppleUSBHub (2.7.5) <31 12>

com.apple.driver.AppleUSBComposite (2.7.5) <31 12>

com.apple.iokit.IONVRAMFamily (9.1.0)

com.apple.NVDAResman (5.2.4) <61 60 17 12 6 5 4 2>

 

 

iAtkos i1.0 1.5.1 on Dell m1530

Link to comment
Share on other sites

You need to install CHUD.pkg from Xcode too, else it won't work.

 

It only disables one core when shutdowning, NOT everytime.

 

You need to edit the script in /Library/StartupItems/shutdownfix/shutdownfix with Textedit so it does the same thing when running "RestartService()" else it only runs when you shutdown the computer.

Link to comment
Share on other sites

Worked for me, be sure to install CHUD.pkg in Xcode from Leopard DVD (or apple developper site).

 

Ovof, you rock !!! I can reboot (after editing the script so it runs after reboot to) and shutdown after sleep now !!!

 

can you please link us to where to download chud.pkg, I googled and cannot find it (and its not on my dvd). Also can you please upload an updated script so reboot works?

 

Thanks

Link to comment
Share on other sites

for CHUD.pkg, it's -again- INCLUDED with Xcode, so just dl/ Xcode from Apple (google is your friend) or get it from retail Leopard DVD. And install CHUD.pkg.

 

Then install the http://cobranail.googlepages.com/poweroff_fix.zip script from that chinese guy (that uses ovof source, so thanks ovof) and put my edited script in /Library/StartupItems/shutdownfix/ so you have restart working too.

 

It's included in this post.

 

After, just reboot so it takes effect, and it'll work !

 

EDIT : after further tests, I decided to remove the edited script : I guess I was lucky, since it actually doesn't enable the script when rebooting so.... Weird since it should be as it's "RestartService()".. If someone manages to fix that, it'd be great

Link to comment
Share on other sites

for CHUD.pkg, it's -again- INCLUDED with Xcode, so just dl/ Xcode from Apple (google is your friend) or get it from retail Leopard DVD. And install CHUD.pkg.

 

Then install the http://cobranail.googlepages.com/poweroff_fix.zip script from that chinese guy (that uses ovof source, so thanks ovof) and put my edited script in /Library/StartupItems/shutdownfix/ so you have restart working too.

 

It's included in this post.

 

After, just reboot so it takes effect, and it'll work !

 

 

 

Thanks to ALL!!

 

Works like a charm....

 

 

Will this work on a system that shutdown stops working after the 10.5.2 update?

 

Cheers

Link to comment
Share on other sites

so after i get it to work do i need to keep chud on my computer...and have it take up 1.1 gb
you dont need to install the whole Xcode package...just install the CHUD.pkg located it the packages folder of the DMG

 

EDIT:this fix didn't work for me...i followed the directions exactly but i still have the same problem

 

EDIT 2: now at shutdown, when i look in the console, i have this : Cpus 1 of 2, but shutdown still doesnt work

Link to comment
Share on other sites

Weird. Well I guess your problem is coming from somewhere else.

 

Anyway after further investigation, disabling manually ONE CORE didn't fix it when REBOOTING after sleep.

 

So even fixing the script won't change anything.

 

Oh well, I guess it's better than nothing :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...