About power management (SpeedStep, sleep)

About power management (SpeedStep, sleep)

Postby artur-pt » 30 Jul 2012, 18:47

Updated: for Haswell laptops with early reboot problem, use this kernel patch
Show
10.10
Code: Select all
perl -pi -e 's|\xe2\x00\x00\x00\x02\x00\x00\x00|\x00\x00\x00\x00\x02\x00\x00\x00|g' kernel
perl -pi -e 's|\xe2\x00\x00\x00\x4c\x00\x00\x00|\x00\x00\x00\x00\x4c\x00\x00\x00|g' kernel
perl -pi -e 's|\xe2\x00\x00\x00\x90\x01\x00\x00|\x00\x00\x00\x00\x90\x01\x00\x00|g' kernel

10.9.x
Code: Select all
perl -pi -e 's|\x74\x6c(\x48\x83\xc7\x28\x90\x8b\x05..\x5e\x00\x85\x47\xdc)\x74\x54(\x8b\x4f\xd8\x45\x85\xc0\x74\x08\x44\x39\xc1\x44\x89\xc1)\x75\x44(\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x57\xf8\x48\x8b\x47\xe8\x48\x85\xc0\x74\x06\x48\xf7\xd0\x48\x21\xc2\x48\x0b\x57\xf0\x49\x89\xd1\x49\xc1\xe9\x20\x89\xd0\x8b\x4f\xd8\x4c\x89\xca)(\x0f\x30\x8b\x4f\xd8\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x17\x48\x83\xc7\x30\xff\xce)\x75\x99(\x5d\xc3)\x90{7}|\x74\x73${1}\x74\x5b${2}\x75\x4b${3}\x66\x81\xf9\xe2\x00\x74\x02${4}\x75\x92${5}|g' mach_kernel

10.8.5
Code: Select all
perl -pi -e 's|\x74\x69(\x48\x83\xc7\x28\x90\x8b\x05\xfe\xce\x5f\x00\x85\x47\xdc)\x74\x51(\x8b\x4f\xd8\x45\x85\xc0\x74\x05\x44\x39\xc1)\x75\x44(\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x57\xf8\x48\x8b\x47\xe8\x48\x85\xc0\x74\x06\x48\xf7\xd0\x48\x21\xc2\x48\x0b\x57\xf0\x49\x89\xd1\x49\xc1\xe9\x20\x89\xd0\x8b\x4f\xd8\x4c\x89\xca)(\x0f\x30\x8b\x4f\xd8\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x17\x48\x83\xc7\x30\xff\xce)\x75\x9c(\x5d\xc3)\x90{7}(\x90{3})|\x74\x70${1}\x74\x58${2}\x75\x4b${3}\x66\x81\xf9\xe2\x00\x74\x02${4}\x75\x95${5}${6}|g' mach_kernel

Source
http://racerrehabman.wordpress.com/2013 ... ly-reboot/


Updated: Clover boot loader can generate SSDTs for all CPUs, including Ivy Bridge
viewtopic.php?f=28&t=3198
Show
Code: Select all
   <key>ACPI</key>
   <dict>
      <key>SSDT</key>
      <dict>
         <key>DropOem</key>
         <true/>
         <key>Generate</key>
         <dict>
            <key>CStates</key>
            <true/>
            <key>PStates</key>
            <true/>
         </dict>
      </dict>
   </dict>


Updated: for Sandy and Ivy Bridge CPUs, Chameleon GeneratePStates is not working since 10.7.4 update, you can use this script to generate an SSDT with P and C states
Show
Run the commands in terminal
Code: Select all
curl -o ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/master/ssdtPRGen.sh
chmod +x ssdtPRGen.sh
./ssdtPRGen.sh

Put SSDT.aml in Extra folder, enable the option DropSSDT, disable GeneratePStates and GenerateCStates
Code: Select all
   <key>DropSSDT</key>
   <string>Yes</string>
   <key>GenerateCStates</key>
   <string>No</string>
   <key>GeneratePStates</key>
   <string>No</string>


Updated: several PCs (desktop and laptop) with Sandy and Ivy Bridge chipset need AppleIntelCPUPowerManagement to be patched
viewtopic.php?f=9&t=1003

Updated: Chameleon boot loader can generate SSDTs with P and C states automatically, simply enable the options GeneratePStates and GenerateCStates
Show
Code: Select all
   <key>GeneratePStates</key>
   <string>Yes</string>
   <key>GenerateCStates</key>
   <string>Yes</string>

You still need to make sure that the kext AppleLPC is loaded. If it's not, adjust ID of device LPC with DSDT patch
viewtopic.php?f=19&t=634

What SMBIOS use for your hardware
viewtopic.php?f=2&t=1302

Application to monitor temperature, frequency and voltage of the processor: HWMonitor
http://sourceforge.net/projects/hwsensors/files/
FakeSMC plugins:
CPUSensors - monitor processor
GPUSensors - monitor video card
LPCSensors - monitor motherboard (Super I/O)
ACPISensors - other not supported by LPCSensors (only works with DSDT edits, install only if you make those changes)

The value reported by the CPU is not the actual temperature, but the difference to Tjmax, which is the temperature the CPU would turn itself off to avoid damage. The Tjmax is calculated automatically, but may be incorrect, causing the temperature shown in degrees Celsius to be also wrong. In this case you can set the value manually by editing the key Tjmax in the file Info.plist of CPUSensors kext.

How to edit Info.plist
viewtopic.php?f=18&t=1704

The original kext responsible for power management is AppleIntelCPUPowerManagement, but few motherboards work with this kext without any adjustment, so the installation guides suggest using some kext that disables AppleIntelCPUPowerManagement to avoid kernel panic or overheating of the processor.
http://olarila.com/files/10.6/PM/NullCP ... t.kext.zip

Since Leopard 10.5.8 sleep only works if the AppleIntelCPUPowerManagement is running, using a disabler kext breaks the sleep. To solve the problem the kext SleepEnabler was created, it enables AppleIntelCPUPowerManagement when the computer is going to sleep.
http://code.google.com/p/xnu-sleep-enab ... loads/list
PB Easy Note TM 86 - i5 430 M - H55M - Ram - 6 GB - Alc272 - Radeon HD 5470 512 QE/CI
Lenovo G500 - i5 3230m - HM77 - Ram - 8 GB - Conexant audio - HD 4000
My OS X Files - join me at irc.freenode.net/##olarila
User avatar
artur-pt
Staff
 
Posts: 4967
Joined: 24 May 2011, 12:04

Re: About power management (SpeedStep, sleep)

Postby CruseRocks » 15 Aug 2012, 19:49

I was trying to create my SSDT file, but getting this error in terminal.

My CPU:
Intel® Core™ i5-2400 Processor (6M Cache, up to 3.40 GHz)
Max Turbo Frequency 3.4 GHz
Max TDP 95 W

In Terminal i get this message:
Last login: Wed Aug 15 20:02:19 on console
Macintoshs-Mac-Pro:~ Macintosh$ sudo ./ssdtPRGen.sh 95 3400
Password:
sudo: ./ssdtPRGen.sh: command not found
Macintoshs-Mac-Pro:~ Macintosh$

Any suggestion?
CruseRocks
 
Posts: 59
Joined: 01 Jul 2012, 17:19

Re: About power management (SpeedStep, sleep)

Postby oldnapalm » 15 Aug 2012, 19:54

Put ssdtPRGen.sh in your user's home folder, or cd to the folder where you put the script before running it.

Example
Code: Select all
cd Downloads
sudo ./ssdtPRGen.sh 95 3400
User avatar
oldnapalm
Staff
 
Posts: 1219
Joined: 05 Dec 2010, 21:49

Re: About power management (SpeedStep, sleep)

Postby CruseRocks » 15 Aug 2012, 22:38

I put SSDT in Extra Folder.

Added Stings in org.chameleon.Boot.plist as below:
<key>DropSSDT</key>
<string>Yes</string>
<key>GeneratePStates</key>
<string>Yes</string>
<key>GenerateCStates</key>
<string>Yes</string>

Is that correct? In the tutorial it says: Enable the option DropSSDT, disable GeneratePStates and GenerateCStates. Disable from where?
CruseRocks
 
Posts: 59
Joined: 01 Jul 2012, 17:19

Re: About power management (SpeedStep, sleep)

Postby oldnapalm » 15 Aug 2012, 22:57

No, it's wrong.

Disable means set
Code: Select all
   <key>GeneratePStates</key>
   <string>No</string>
   <key>GenerateCStates</key>
   <string>No</string>

or just remove those keys, since their default value is No.
User avatar
oldnapalm
Staff
 
Posts: 1219
Joined: 05 Dec 2010, 21:49

Re: About power management (SpeedStep, sleep)

Postby CruseRocks » 16 Aug 2012, 00:14

No AppleLPC loaded in terminal, i used "kextstat" command.


I already followed that process even AppleLPC not loaded.Bro i have downloaded LPC SANDY BRIDGE from patches section and patched with DSDT EDIT.

Note: I opened again SSDT.aml with DSDT Edit and try LPC SANDYBRIDGE patch.
CruseRocks
 
Posts: 59
Joined: 01 Jul 2012, 17:19

Re: About power management (SpeedStep, sleep)

Postby oldnapalm » 16 Aug 2012, 04:00

Man, pay attention, apply LPC patch in DSDT, not SSDT.

Isn't there a complete patch for your mobo in packs.php ?
User avatar
oldnapalm
Staff
 
Posts: 1219
Joined: 05 Dec 2010, 21:49

Re: About power management (SpeedStep, sleep)

Postby CruseRocks » 16 Aug 2012, 14:40

oldnapalm wrote:Man, pay attention, apply LPC patch in DSDT, not SSDT.

Isn't there a complete patch for your mobo in http://olarila.com/forum/packs.php ?


Brother i have been searching DSDT for my mobo, before i start installation OS X. But i could not able to find it. I have checked DSDT patched section before. There is only G1.Sniper but you may know there are three version of Gigabyte G1.Sniper like Sniper 1, Sniper 2, Sniper 3 and Sniper M3. I believe in DSDT patch section there is G1. Sniper for 1366 socket, not sure.

My mobo is Sniper M3 Socket 1155 Z77 Chipset. Till now i am not using any DSDT, NullCPUManagment or Any Patches for AppleIntelPowerManagment. But i would like to build my Hackintosh which will work OOB from all corners with Olarila Forum help, all though i am new and lack of knowledge in Hackintosh.

What i should do now, I am looking forward helpful hand from you all in future as i am getting now.

Thanks.
CruseRocks
 
Posts: 59
Joined: 01 Jul 2012, 17:19

Re: About power management (SpeedStep, sleep)

Postby oldnapalm » 16 Aug 2012, 15:33

Read this topic, watch the video to learn how to apply a patch in DSDT, and apply the patches you need, starting with LPC for desktop Sandy Bridge.

viewtopic.php?f=19&t=634
User avatar
oldnapalm
Staff
 
Posts: 1219
Joined: 05 Dec 2010, 21:49

Re: About power management (SpeedStep, sleep)

Postby CruseRocks » 16 Aug 2012, 20:35

oldnapalm wrote:Read this topic, watch the video to learn how to apply a patch in DSDT, and apply the patches you need, starting with LPC for desktop Sandy Bridge.

http://olarila.com/forum/viewtopic.php?f=19&t=634


Sure. Bro I would like to do step by step not like use all the patches then compile, can i? Use DSDT Edit to Extract from ACPI Table. Use Desktop LPC Sandy Bridge patch+Compile+Save on Desktop. If it goes fine without error then the next patch. I think it will be easy like not mass with all together.
CruseRocks
 
Posts: 59
Joined: 01 Jul 2012, 17:19

Next

Return to Guides and tutorials

Who is online

Users browsing this forum: No registered users and 1 guest