Help - Search - Members - Calendar
Full Version: HowTo - SSE3 Kernel with Sleep + SpeedStep
InsanelyMac Forum > OSx86 Project > Tutorials (The Genius Bar)
Pages: 1, 2, 3, 4, 5, 6, 7
paulicat
just get the 310 meg combo update from Apple and follow the guides! Its easy and you'll learn something smile.gif
Russ-ST24
Hi Paulicat,
Thanks for the reply, when I pick the Sleep option from the apple menu the machine sleeps quickly and appears to be sleeping fine.
When I wake it up I get the Lenovo logo as if I had never slept the laptop and it then appears on the screen.

"ERROR
0192: System Security - Embedded Security Hardware tamper detected."

I had a similar sleep issue without the message above with Ubuntu 6.10, this was fixed by going to 7.02 beta. (It would appear to sleep but wake up and boot clean)

Trying to get the 10.4.9 upgrade but dont have demonoid account. Once I get it I still need your modded kernel right?

Thanks again for the help.

Russ


QUOTE(paulicat @ Apr 19 2007, 01:49 PM) *
Heh kiko, yup you got me, my bad wink.gif
If you get the cpu detection working, please pass the source over. I know it took me a while to hand my speedstep source over but you did get it right? wink.gif

As for sse2 sources, I don't have them, and I can't say I care either, I don't have any sse2 to test against.

As for sleep Russ-ST24, give some details to your particular sleep problem.
I can say that sleep works 100% for me after the code change I added to this 10.4.9 kernel I just released.
Before, it wouldn't wake up from sleep properly, now, its back up in a matter of seconds.

Paulicat.



I will go and look for the guides now while I download the update.

Thanks

Russ
PascalW
QUOTE(paulicat @ Apr 19 2007, 04:54 AM) *
http://www.hostclip.com/dl/e1f5facfa6fc0e90f00c48538c3fbecb

10.4.9 kernel for SSE3, hpet with speedstep. Oh, and I changed code for wake from sleep, had to make an hpet call to wake properly. Now I can sleep it for hours and it wakes in about 5 seconds.

Beat ya kiko wink.gif


Still Intel only? And if so, are you going to make AMD sleep work too?
Russ-ST24
Sorry another question, The Kernel above sounds like the one I need. Once I have completed the 10.4.9 upgrade where exactly do I put this Kernel?
I am just building a clean 10.4.8 JaS install on a spare HD for my laptop so I can perform the upgrade in safetly before I try it on my live install.

Thanks

Russ
paulicat
Sorry AMD people, I have no plans to work on AMD.

Russ, just put it in the root /
The guides should tell you this also, be sure to follow the guides closely.
rob42
Hey paulicat,

Your kernel has done the impossible — my laptop (Core2/1gb/intel945) now awakes from sleep, however it has a few issues which I don't get with other kernels:

- Touchpad doesn't work after waking (keyboard is fine)
- Flaky USB support (it only seems to work with devices that were plugged in when the machine first booted). After waking, only one USB device seems to work?
- Displaying my CPU as Core 2 Solo (1 core)
Russ-ST24
Hi Paulicat,
Thanks for all the advice. I did the update using your 10.4.8 guide and it worked fine using your latest Kernel.
Still cant sleep? I used the speedstep.pkg that was posted in the thread and also then replaced the kext with the one later in the thread.
It took a lot longer this time to go to sleep but still the same when it woke up. Just booted BIOS then ERROR - Tampering etc.
I checked system log just before I left work and the throttler seems to show only one CPU0 and errors on CPU1? I will post the system logs tomorrow when I get back.
Also the system seemed unstable as everytime I shutdown it would Panic. Tested so quick I think the initial 10.4.9 upgrade was stable and the speedstep made it unstable.

Thanks again for all the help, will post more tomorrow.

Russ
paulicat
Sorry guys, the random hardware issues are above my knowledge, these things all work on my laptop so I can't say much more than its hardware specific.

As for the core solo part, both Kiko and I have older patches which it would seem don't have good cpu detection wink.gif
Rest assured, both cores are working, just not reporting as such.

Paulicat.
iQQ
I am using NetKas kernel.

Kernel from NetKas on March 26, can sleep very quick, can wake up. However, usb mouse and keyboard need to be replug in for working.

Kernel from Netkas on April 19, can sleep, but can not wake up.

I am trying different, certainly, will try this one and let you know the result.

QUOTE(Kiko @ Apr 19 2007, 03:38 AM) *
paulicat, actually i beat you tongue.gif look at this thread
http://forum.insanelymac.com/index.php?s=&...st&p=349271

and both me and you are stuck on the cpu thing lol my core 2 duo shows up as core 2 solo x-D. fix that tonight
kernel available on #kernel irc.moofspeak.net, NoHPET/HPET, NX disabled, auto-fsb, sleep working (for me), SSE3


Tired the one from IRC, it can sleep and can wake up, but USB devices do not work.
Kiko
Yeah, iQQ i have that problem as well Usb dont wake up unless i re-plug them sad.gif
trexplorer
Hi Guys,

Anyone get dual cores and sleep working yet on a Dell 6400 w GMA 950 graphics ... ?

cheers ...
fabioxx
hi all, maybe my question is OT, but can I sleep my desktop with these patches? It would be a great thing for me.
Kiko
It has made sleep (S3) work on some pc's, it works for me
Kiko
Patched loginwindow to show current cpu speed in About This Mac (I know you wanted this for a while Paulicat tongue.gif, so heres my gift to you)

http://www.mediafire.com/?5wkkj2uqmyj

(this is the security update loginwindow, if that didnt work for you, this wont. Post that you neeed a 10.4.8 one and i'll make one)
(this has nothing to do with prasys or the hackint0sh irc network)
d4vide
I don't find the link to download this patch to wake the laptop from sleep...
Running osx 10.4.8 from jas dvd, going to upgrade to 10.4.9 tonight...

Can anybody post the link in here?
Will the patch resolve also power managemnt issues? My laptop thinks it's always on battery also when the power cable is plugged in... (Lenovo 3000 N100... everything works fine except for audio, wifi, webcam and sleep, by now...)

thanks everybody!
davide
rparker
Thanks Kiko and Paulicat for your work. I have sleep working, only issue now is that I have to replug all my usb devices (mouse/keyboard). How may I go about helping you fix the issue, or fixing the issue myself?
sebus
I upgraded to 10.4.9 from Jas, then done kernel update from irc, sleep does not work, instead it restarts on trying to wake up

Dell Inpiron 5160

sebus
Prasys
Moderators , you can bring this thread down and use my new thread @ http://forum.insanelymac.com/index.php?showtopic=51209
macyeah
I installed is OK, but second boot and launch "DCPUManager" system make crash. before installing, my system is 10.4.9 + koolkal kernel (may-11-07). I am a Chinese. I hope you can read it:)))
thanks everybody)))
an4rew
QUOTE(Kiko @ Apr 25 2007, 08:10 AM) *
Patched loginwindow to show current cpu speed in About This Mac (I know you wanted this for a while Paulicat tongue.gif , so heres my gift to you)

http://www.mediafire.com/?5wkkj2uqmyj

(this is the security update loginwindow, if that didnt work for you, this wont. Post that you neeed a 10.4.8 one and i'll make one)
(this has nothing to do with prasys or the hackint0sh irc network)


how do i install this its not a package?
Kaspers
Drop it in /System/Library/Coreservices/
an4rew
thanks you!
hailey5566
very helpful advice, thx a lot.

DVD Software
http://www.hotdvdtools.com
SteveNZ
The updated kernels (or something in the installer anyway) break ich8 support. Causes "device blocking bus" for my AHCI interface. The SSE3 kernels from the IRC site (osx86.hu) work fine though (still report the blocking, but they do it later in the boot sequence and they recover and work fine afterwards). Although sleep is a bit dubious. (Doesn't awaken).
rnx69
Is there any update to these kernels that include correct C2D processor recognizing? That Core 2 Solo bug is not a big deal, but I just prefer to see a real processor type.
quasar_x
I have a 1.73 Ghz Core Duo and was wondering why my CPU-freq would display 2167 Mhz on high load.

"kern.cpu_maxfreq: 2167" seems to be the problem (see below):

CODE
sudo sysctl -a | grep freq
kern.exec: unknown type returned
hw.busfrequency = 532000000
hw.cpufrequency = 1730000000
hw.tbfrequency = 1000000000
kern.cputhrottle_curfreq: 800
kern.cputhrottle_freqs: 800 1067 1333 1733
kern.cpu_currentfreq: 1000
kern.cpu_minfreq: 1000
kern.cpu_maxfreq: 2167
hw.busfrequency: 532000000
hw.busfrequency_min: 532000000
hw.busfrequency_max: 532000000
hw.cpufrequency: 1730000000
hw.cpufrequency_min: 1800000000
hw.cpufrequency_max: 1800000000
hw.tbfrequency: 1000000000


But when I try to change it by typing

"sudo sysctl -w kern.cpu_maxfreq=1733"

I always get:

"sysctl: oid 'kern.cpu_maxfreq' is read only"

I know this might be a dumb question, but how do I write to the various kern.cpu entries?
quasar_x
QUOTE(carterj @ Apr 17 2007, 04:08 PM) *
on manual switching with sysctl -w kern.cputhrottle_curfreq=xxx where xxx = 600,800,1000,1200,1700 the throttle will sometimes succeed and other times not.


How did you manage to write to the variable?

Everytime I am trying to modify either "kern.cputhrottle_curfreq" or "kern.cpu_maxfreq" I get:

"sysctl: oid 'kern.cpu_*' is read only"

Any ideas?
delish
quasar_x: login as root in terminal maybe? (sudo su)
quasar_x
QUOTE(delish @ Jul 7 2007, 10:23 PM) *
quasar_x: login as root in terminal maybe? (sudo su)


Hehe, nope, that was of course the first thing that I tried.
bishoy Hanna
How can I see if speedstep is working?
quasar_x
QUOTE(bishoy Hanna @ Jul 12 2007, 11:15 PM) *
How can I see if speedstep is working?


Paste your
CODE
sudo sysctl -a | grep freq

output
bishoy Hanna
QUOTE(quasar_x @ Jul 13 2007, 12:45 PM) *
Paste your
CODE
sudo sysctl -a | grep freq

output



I don't even know what that means.
josftx
QUOTE(paulicat @ Apr 19 2007, 02:54 AM) *
http://www.hostclip.com/dl/e1f5facfa6fc0e90f00c48538c3fbecb

10.4.9 kernel for SSE3, hpet with speedstep. Oh, and I changed code for wake from sleep, had to make an hpet call to wake properly. Now I can sleep it for hours and it wakes in about 5 seconds.

Beat ya kiko wink.gif


The link doesn't work sad.gif,,,
teong85
Dead Link? any idea?
paulicat
I'll repost a new link for the kernel download later tonight.
Satyr
When no kern.cputhrottle instances show up in dmesg output does that mean that:

1. Kernel speedstep failed
or
2. AppleIntelCPUPowermanagement.kext failed in recognizing available CPU frequencies?

Of course, ACPICPUThrottle.kext fails to load as well because of 1 or 2.
Console log says SpeedStep kernel extension failed to load (AppleIntelCPU....kext?)

I also have Core Duo 1.73 GHz.

sysctl -a | grep freq
Password:
kern.exec: unknown type returned
hw.busfrequency = 532000000
hw.cpufrequency = 1730000000
hw.tbfrequency = 1000000000
hw.busfrequency: 532000000
hw.busfrequency_min: 532000000
hw.busfrequency_max: 532000000
hw.cpufrequency: 1730000000
hw.cpufrequency_min: 1730000000
hw.cpufrequency_max: 1730000000
hw.tbfrequency: 1000000000

paulicat
http://www.hostclip.com/dl/7d6b719485feb7050f3fff956f19f77d

This is 10.4.9 mach_kernel and the associated ACPICPUThrottle files.

Unzip this and you will get 1 file and 1 folder.
Move mach_kernel to /
Unzip the ACPICPUThrottle.zip and move the resulting folder to /Library/StartupItems
Reboot.
You'll get a prompt to repair permissions for the ACPICPUThrottle StartupItem.
Click the Fix button and reboot once more.
Upon the next login, run sysctl -a | grep throttle and look for lines such as:
kern.cputhrottle_curfreq: 800
kern.cputhrottle_verbose: 0
kern.cputhrottle_freqs: 800 1067 1333 1600 1867
If these lines don't show up, the ACPICPUThrottle.kext didn't load for some reason.

One thing to try is to turn OFF any speedstep related items in your bios.
Sometimes this causes OSX to not be able to throttle the cpu.

As far as I know, AppleIntelCPUPowermanagement.kext has no impact on Speedstep.
For the record though, this kext is loaded up on my laptop.

Good luck.
Paulicat.
Satyr
Thanks paulicat, I'm gonna try this tomorrow.

paulicat
No problem, hope it works for ya.

Paulicat.
Satyr
Nope, it didn't work because of BIOS being "braindead"

I was trying to figure out this for the whole day and this is what I learned:
If BIOS doesn't report correct power states to ACPI or fails to do so, ACPICPUThrottle.kext fails to load. If BIOS doesn't reports correct powerstates to ACPI, that means that Windows are using magic tricks to throttle cpu. Not really. There is the other way to control powerstates on Enhanced SpeedStep CPUs (Pentium M, Core Duo, Core 2 Duo etc) and it's already implemented in ACPICPUThrottle.kext but it doesn't work because it pulls available powerstates from ACPI, which BIOS "forgot" to report. Since many laptops have this "braindead" BIOS, no wonder why so many people have this problem.
There is solution though.

Quick explanation:
QUOTE
"Intel Pentium M processors have circuitry for changing their clock frequency and input voltage on-the-fly. In addition to providing a large range of frequencies -- typically between 5 and 7, in contrast to earlier processors from Intel, which only had "fast" and "slow" speeds -- this "Enhanced SpeedStep" is easier to control, requiring only that a MSR (model-specific register) be manipulated, unlike earlier versions which required BIOS support." (c/p from http://www.daemonology.net/freebsd-est/ )


Edit: AMDs support this "direct drive" throttling too

It is possible (it's possible on windows and freebsd, I don't see a reason why
this wouldn't work on OS X...) to supply ACPICPUThrottle.kext with pre-defined CPU table with their characteristics -
available frequencies, just like this: .

Experts, what do you think?
paulicat
Kiko posted a direct drive kext attempt earlier in this thread, did you try that one?

Paulicat
Satyr
QUOTE
ACPICPUThrottle: No valid CPUs returned by ACPI! It's possible your BIOS does not think your system should be throttled and therefore did not return any available power states, or maybe your CPU only supports one other power state than maximum which is below 1Ghz!


There is solution on the way though

fiery.gif
paulicat
what solution?
If that error about one state below 1Ghz is from my kext then ignore it. I removed that artificial limitation a long time ago, but I probably forgot to remove that text.
What CPU do you have again??

Paulicat

EDIT, I just tried Kikos direct drive kext, it still has the fake 1ghz barrier in it.
Also, my kext has acpi code in it, but for kernels 10.4.8 and up, it will fail on acpi, but will procede to use DirectDrive also.
I'm not entirely sure of what Kiko put in his kext though.
Here's a copy/paste of dmesg after my kext is loaded on a core solo 1.87ghz:
ACPICPUThrottle: Adding CPU0
---> P0, 1867Mhz, 31000mW, 10us, 10us (ctrl=0xe2c, status=0xe2c)
---> P1, 1600Mhz, 26000mW, 10us, 10us (ctrl=0xc26, status=0xc26)
---> P2, 1333Mhz, 22000mW, 10us, 10us (ctrl=0xa20, status=0xa20)
---> P3, 1067Mhz, 17000mW, 10us, 10us (ctrl=0x81a, status=0x81a)
---> P4, 800Mhz, 13000mW, 10us, 10us (ctrl=0x613, status=0x613)
ACPICPUThrottle: Using direct drive of Intel throttling
Satyr
Aug 19 16:23:55 s-computer kernel[0]: ACPICPUThrottle: Adding CPU1
Aug 19 16:23:55 s-computer kernel[0]: ACPICPUThrottle: Adding CPU2
Aug 19 16:23:55 s-computer kernel[0]: ACPICPUThrottle: No valid CPUs returned by ACPI! It's...

No throttle in dmesg output...

I have Core Duo T2250 @ 1.73 GHz. Correct me if I'm wrong but from your dmesg output it's clear that kext is using ACPI to get powerstates

From Intel® 64 and IA-32 Architectures
Software Developer’s Manual
Volume 3A:
System Programming Guide, Part 1

QUOTE
The Advanced Configuration and Power Interface (ACPI) defines performance states
(P-state) that are used facilitate system software’s ability to manage processor
power consumption. Different P-state correspond to different performance levels
that are applied while the processor is actively executing instructions. Enhanced Intel
SpeedStep Technology supports P-state by providing software interfaces that control
the operating frequency and voltage of a processor.


This is probable cause of my problem:

QUOTE
A BIOS (following ACPI 3.0 specification) can choose to expose P-state as dependent
and hardware-coordinated to OS power management (OSPM) policy.


Which my BIOS obvioulsy don't


paulicat
Actually no, from my paste, the last line tells you that its using DirectDrive to control the cpu states.
As of 10.4.8 there is 0 support for acpi throttle states. It will always use DirectDrive.

I've attached a debug build of my kext.
Please post the dmesg from: "ACPI CPU Throttle loaded"

What laptop do you have by the way?

Paulicat.
Satyr
Asus F3jc

ACPICPUThrottle: Adding CPU1
ACPICPUThrottle: Failed with code -536870212
ACPICPUThrottle: Adding CPU2
ACPICPUThrottle: Failed with code -536870212
ACPICPUThrottle: No valid CPUs returned by ACPI! It's possible.......

Edit: Is it possible that BIOS disables IA32_MISC_ENABLE MSR ?
paulicat
It shouldn't but I suppose you never know.
What power related options does your bios have?

Paulicat.
Satyr
None. BIOS is stripped and locked down completely.
paulicat
Oh that sucks sad.gif
I don't think there's a whole I can do to help you bud.
Something is definately blocking the kext from getting access to read out the cpu states.
Sorry.

Paulicat.
Satyr
Oh well..., thanks a bunch anyway!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.