Jump to content

Chameleon RC5 mode with mem detection enabled and automatic P-States & C-States generation for native power managment


  • Please log in to reply
1213 replies to this topic

#1
kozlek

kozlek

    InsanelyMac Sage

  • Developers
  • 331 posts
  • Gender:Male
  • Location:Israel
If you experienced a problem patching your DSDT/SSDT to enable Mac OS X native power management, or you don't know how to do this - the new bootloader is for you! Should work on most modern systems/processors.

Bootloader based on latest Chameleon RC5 rev184. Mem detection is enabled and slightly modified: fixed system profiler returns error while reading memory info in some cases. P-States & C-States are exported to the system via additional SSDTs, so if you have native SSDTs with _CST methods you should use "DropSSDT" = "Yes" option in boot.plist. If you have modded DSDT with _CST methods you should remove them or it'll be kernel panic on system start. The bootloader also supports multiple SSDT loading (names should be SSDT.aml, SSDT-1.aml ... SSDT-29.aml). Bootloader also supports latest graphic cards (code was obtained from here)

To enable native power management you should use proper mac model + HPET enabled. To enable C-States you must have LPC working on your system. It could be enabled via DSDT mod or injector.

To activate P-States generation add "GeneratePStates"="Yes" option into boot.plist. To activate C-States generation add "GenerateCStates"="Yes" option into boot.plist. Those features are not activated by default!

Sources available here.
P-States generation algo based on original superhai's algo from VoodooPower project.

P-States generation for newer motherboards with Core ix processors now supported.

#2
Smith@@™

Smith@@™

    InsanelyMac LOL

  • Retired
  • 2,928 posts
  • Gender:Male
  • Location:Somewhere over the rainbow...ITALIA!
  • Interests:Dark matter and dark energy. E basta. HD3000. E basta.
I felt this days ago, when we talked on the other topic .. and it works amazing on my q9300 (only on this i have try for now). I have remove ss code in dsdt,, great! :(

Thanks for this.

#3
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,083 posts
  • Gender:Male
  • Location:UK
I've been hearing the buzz about this.. and have just downloaded the source. I'll build it tonight and test with it when I get home to my hack. But great job Mojodojo :)

#4
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male
I have already native speedstep with my MSi board but have to add _CST data to DSDT.
Will give this a go tonight.

Really glad to see this implemented to Chameleon.
Nice one mojodojo :)

D

#5
kangaro_o

kangaro_o

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
Mojodojo, explain please, how to install cham? I can't find any ".pkg"

#6
valv

valv

    InsanelyMac Architect

  • Members
  • PipPipPipPipPipPipPip
  • 910 posts
  • Gender:Male
  • Location:Unrevealed Area
  • Interests:Operating Systems<br />Networking<br />Security
great work.

#7
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,083 posts
  • Gender:Male
  • Location:UK

I've been hearing the buzz about this.. and have just downloaded the source. I'll build it tonight and test with it when I get home to my hack. But great job Mojodojo :(

Well after many trials I can't seem to get it to work.

I can have native power management when using either Cartri's modified Gigabyte BIOS, or standard Gigabyte BIOS with my DSDT patched with _PSS / _CST info. But not with this modded chameleon bootloader, using standard Gigabyte BIOS and DSDT without _PSS / _CST info.

AppleLPC loads by default on my board and doesn't need to be patched.

If I manually add patched SSDT tables to /Extra then I can see in VoodooMonitor my Multiplier changing and the CPU temps come down, but voltage doesn't change. But I am missing PerformanceStateArray from ioreg.
Attached File  ioreg.jpg   71.09KB   2188 downloads

So am I right in saying the P-States and C-States aren't working automatically for me with this bootloader mod, but manually adding correct SSDT tables to /Extra enables C-States?

If it helps, I have attached the SSDT tables I am manually adding to get the C-states, as well as the SSDT tables extracted from the running system when just using the modded bootloader without the manually added SSDT tables.

Attached Files



#8
kozlek

kozlek

    InsanelyMac Sage

  • Developers
  • 331 posts
  • Gender:Male
  • Location:Israel
blackosx, the problem could be in your patched DSDT, if it has different CPU names from CPU0, CPU1 ... CPUn. The fix almost complete, need to back to home to finish it.

P.S. And you have already SSDTs with _CST, this is a problem. You need to DropSSDT or not to use GenerateCStates feature.

#9
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,083 posts
  • Gender:Male
  • Location:UK
Thanks for the quick reply mozodojo.

blackosx, the problem could be in your patched DSDT, if it has different CPU names from CPU0, CPU1 ... CPUn. The fix almost complete, need to back to home to finish it.

I think that must be it!.. As thinking about it, I quickly removed the _PSS / _CST info last night from my patched DSDT and must have missed adding back the default CPU declarations.

I am at work now and will have a look at it again this evening and report back. I did play with the DropSSDT option last night and I'll remember to double check the setting again tonight.

Thanks for the help :(

#10
dan chip5

dan chip5

    InsanelyMac Protégé

  • Members
  • Pip
  • 10 posts
Any love for AMD cool-n-quiet in this bootloader?


PS. wheres the boot file? <---- Noob question

#11
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male
Hi mojodojo

Not having too much luck here either.
I have tried with original scope _pr, with and without CPU alias removed (actually no KP now with CPU alias, which is great!) and have tried both, with and without DropSSDT=Yes

Either way I get _cst evaluation errors again and significantly higher temps.

ApplePLC is loading.

EDIT: - Using iMac9,1 and Speedstep continues to work, but works naively anyway.

Thanks again for the hard work.

Rgds
D

#12
scrax

scrax

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,704 posts
  • Gender:Male

Hi mojodojo

Not having too much luck here either.
I have tried with original scope _pr, with and without CPU alias removed (actually no KP now with CPU alias, which is great!) and have tried both, with and without DropSSDT=Yes

Either way I get _cst evaluation errors again and significantly higher temps.

ApplePLC is loading.

same for me. cst error if I don't inject them

#13
kozlek

kozlek

    InsanelyMac Sage

  • Developers
  • 331 posts
  • Gender:Male
  • Location:Israel
Try the new version from SVN

#14
kellis

kellis

    InsanelyMac Protégé

  • Members
  • PipPip
  • 93 posts
  • Gender:Male
  • Location:Austin, tx
sorry for the noob question,
how does one know if this is working, or if it is needed, where to check, is there a test?
thank you

#15
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany

Try the new version from SVN

Thanks.
I attached screenshoot of changes (up to SVN Version 350)

Attached Files



#16
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,083 posts
  • Gender:Male
  • Location:UK
Hi Mozodojo

Sorry to report but I still don't have success. If you get time, I have attached some files for you to look at to hopefully see what's going on. The files are:

• DSDT file I use for power management when using normal Chameleon
• DSDT file i am using when booting your modified Chameleon
• Extracted ACPI tables from my system booted with r346 using both DropSSDT and not.
• Extracted ACPI tables from my system booted with r350 using both DropSSDT and not.
• Screenshots of ioreg showing LPC and APCI SMC PlatformPlugin
• kernel log when booting from r350 without DropSST

If there's anything else I can supply then let me know.
Thanks

Attached Files



#17
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,880 posts
  • Gender:Male
  • Location:Stuttgart / Germany
I am not sure how the new Pstate/C-State generator works.
But the Adress of the Control Register is on some mainbaords 0x4xx and some 0x8xx (400,410,415, 416 like my EP35 vs 800,810,815,816). Maybe here is the problem ? (patched DSDT works, chameleon PStates gen not).

#18
zef

zef

    InsanelyMac Geek

  • Retired Developers
  • 152 posts
Hi mozodojo!

Grats for your nice changes! :thumbsup_anim: Just merged back your rev 351 changes to our trunk.

Many thanks!

Bye,
zef

#19
Smith@@™

Smith@@™

    InsanelyMac LOL

  • Retired
  • 2,928 posts
  • Gender:Male
  • Location:Somewhere over the rainbow...ITALIA!
  • Interests:Dark matter and dark energy. E basta. HD3000. E basta.
Now the mod is in the official trunk i've see. Thanks zef

#20
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 4,636 posts
  • Gender:Male
  • Location:Canary Islands
Hi all!

thx mozodojo!

I compiled the rev351

my kernl.log

Jul 22 01 _linenums:23'>[size=1]Jul 22 01:23:02 localhost kernel[0]: npvhash=4095Jul 22 01:23:02 localhost kernel[0]: Darwin Kernel Version 10.4.0: Fri Apr 23 18:27:12 PDT 2010; root:xnu-1504.7.4~1/RELEASE_X86_64Jul 22 01:23:02 localhost kernel[0]: vm_page_bootstrap: 1474045 free pages and 98819 wired pagesJul 22 01:23:02 localhost kernel[0]: kext submap [0xffffff7f80600000 - 0xffffff8000000000], kernel text [0xffffff8000200000 - 0xffffff8000600000]Jul 22 01:23:02 localhost kernel[0]: standard timeslicing quantum is 10000 usJul 22 01:23:02 localhost kernel[0]: mig_table_max_displ = 73Jul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=1 LocalApicId=0 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=2 LocalApicId=2 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=3 LocalApicId=4 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=4 LocalApicId=6 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=5 LocalApicId=1 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=6 LocalApicId=3 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=7 LocalApicId=5 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=8 LocalApicId=7 EnabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=9 LocalApicId=136 DisabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=10 LocalApicId=137 DisabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=11 LocalApicId=138 DisabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=12 LocalApicId=139 DisabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=13 LocalApicId=140 DisabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=14 LocalApicId=141 DisabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=15 LocalApicId=142 DisabledJul 22 01:23:02 localhost kernel[0]: AppleACPICPU: ProcessorId=16 LocalApicId=143 DisabledJul 22 01:23:02 localhost kernel[0]: calling mpo_policy_init for QuarantineJul 22 01:23:02 localhost kernel[0]: Security policy loaded: Quarantine policy (Quarantine)Jul 22 01:23:02 localhost kernel[0]: calling mpo_policy_init for SandboxJul 22 01:23:02 localhost kernel[0]: Security policy loaded: Seatbelt sandbox policy (Sandbox)Jul 22 01:23:02 localhost kernel[0]: calling mpo_policy_init for TMSafetyNetJul 22 01:23:02 localhost kernel[0]: Security policy loaded: Safety net for Time Machine (TMSafetyNet)Jul 22 01:23:02 localhost kernel[0]: Copyright © 1982, 1986, 1989, 1991, 1993Jul 22 01:23:02 localhost kernel[0]: The Regents of the University of California. All rights reserved.Jul 22 01:23:02 localhost kernel[0]: MAC Framework successfully initializedJul 22 01:23:02 localhost kernel[0]: using 16384 buffer headers and 4096 cluster IO buffer headersJul 22 01:23:02 localhost kernel[0]: IOAPIC: Version 0x20 Vectors 64:87IOAPIC: Version 0x20 Vectors 88:111Jul 22 01:23:02 localhost kernel[0]: ACPI: System State [S0 S3 S4 S5] (S3)Jul 22 01:23:02 localhost kernel[0]: RTC: Only single RAM bank (128 bytes)Jul 22 01:23:02 localhost kernel[0]: AppleIntelCPUPowerManagement: Turbo Ratios 1112Jul 22 01:23:02 localhost kernel[0]: AppleIntelCPUPowerManagement: initialization completeJul 22 01:23:02 localhost kernel[0]: mbinit: done (64 MB memory set for mbuf pool)Jul 22 01:23:02 localhost kernel[0]: From path: "uuid", Jul 22 01:23:02 localhost kernel[0]: Waiting for boot volume with UUID 35ED5B00-AAA3-3059-AD87-F458E4B85284Jul 22 01:23:02 localhost kernel[0]: Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>Jul 22 01:23:02 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib kmod startJul 22 01:23:02 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib load succeededJul 22 01:23:02 localhost kernel[0]: AppleIntelCPUPowerManagementClient: readyJul 22 01:23:02 localhost kernel[0]: Got boot device = IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/SATA@1F,2/AppleAHCI/PRT0@0/IOAHCIDevice@0/AppleAHCIDiskDriver/IOAHCIBlockStorageDevice/IOBlockStorageDriver/ST3500412AS Media/IOGUIDPartitionScheme/Buono@2Jul 22 01:23:02 localhost kernel[0]: BSD root: disk0s2, major 14, minor 2Jul 22 01:23:02 localhost kernel[0]: FireWire (OHCI) VendorID 1106 ID 3044 built-in now active, GUID fedcba9876543210; max speed s400.Jul 22 01:23:02 localhost kernel[0]: Kernel is LP64Jul 22 01:23:02 localhost kernel[0]: Bluetooth: Adaptive Frequency Hopping is not supported.Jul 22 01:23:05 localhost kernel[0]: NVDANV50HAL loaded and registered.Jul 22 01:23:11 localhost kernel[0]: AppleYukon2: Marvell Yukon Gigabit Adapter 88E8056 Singleport Copper  SAJul 22 01:23:11 localhost kernel[0]: AppleYukon2: Marvell Yukon Gigabit Adapter 88E8056 Singleport Copper  SAJul 22 01:23:11 localhost kernel[0]: AppleYukon2: RxRingSize <= 1024, TxRingSize 256, RX_MAX_LE 1024, TX_MAX_LE 768, ST_MAX_LE 3328Jul 22 01:23:15 localhost kernel[0]: AppleYukon2: RxRingSize <= 1024, TxRingSize 256, RX_MAX_LE 1024, TX_MAX_LE 768, ST_MAX_LE 3328Jul 22 01:23:14 localhost kernel[0]: Waiting for DSMOS...Jul 22 01:23:14 localhost kernel[0]: systemShutdown falseJul 22 01:23:15 localhost kernel[0]: FakeSMC: Opensource SMC device emulator by netkas © 2009Jul 22 01:23:15 localhost kernel[0]: FakeSMC: Monitoring plugins support by mozodojo © 2010Jul 22 01:23:15 localhost kernel[0]: FakeSMC: Original idea of plugins and code sample by usr-sse2 © 2010Jul 22 01:23:15 Fabios-Mac-Pro kernel[0]: Previous Shutdown Cause: 0Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU family 0x6, model 0x1a, stepping 0x4Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: Found 4 cores 8 threadsJul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#0 Tjmax 100Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#1 Tjmax 100Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#2 Tjmax 100Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: IntelThermal: CPU#3 Tjmax 100Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: DSMOS has arrivedJul 22 01:23:24 Fabios-Mac-Pro kernel[0]: PTKawainVi: startedJul 22 01:23:24 Fabios-Mac-Pro kernel[0]: Vendor ID: 10de, Device ID: 19dJul 22 01:23:24 Fabios-Mac-Pro kernel[0]: Architecture: 20000Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: G80 [Quadro FX 5600]Jul 22 01:23:24 Fabios-Mac-Pro kernel[0]: yukon: Ethernet address 00:xx:xx:xx:xx:xxJul 22 01:23:24 Fabios-Mac-Pro kernel[0]: yukon: Ethernet address 00:xx:xx:xx:xx:xxJul 22 01:23:24 Fabios-Mac-Pro kernel[0]: RT2573USBWirelessDriver: Ethernet address 00:xx:xx:xx:xx:xxJul 22 01:23:25 Fabios-Mac-Pro kernel[0]: AppleTyMCEDriver::start coreVIDPID = 0xffffffff Number of packages = 1 Number of cpus = 8 memory monitor trough MCA[/size]

My CPU section & LPCB in DSDT
After rename the CPU1, CPU2, CPUn ecc to P001,P002,P00n the error relate to _CST is gone :D

[size=1]Jul 22 01:07:33 Fabios-Mac-Pro kernel[0]: ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed

:D
3A188086))
}
...

[/size] _linenums:0'>[size=1] Scope (_PR) { Processor (P001, 0x01, 0x00000810, 0x06) {} Processor (P002, 0x02, 0x00000810, 0x06) {} Processor (P003, 0x03, 0x00000810, 0x06) {} Processor (P004, 0x04, 0x00000810, 0x06) {} Processor (P005, 0x05, 0x00000810, 0x06) {} Processor (P006, 0x06, 0x00000810, 0x06) {} Processor (P007, 0x07, 0x00000810, 0x06) {} Processor (P008, 0x08, 0x00000810, 0x06) {} }//-----*****-----// Device (LPCB) { Name (_ADR, 0x001F0000) Method (_DSM, 4, NotSerialized) { Return (MCID (Arg2, 0x<strong class='bbc'>3A18</strong>8086)) }...[/size]

Fabio





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy