iMac G5 frequency switching

Markus Demleitner msdemlei at
Fri Sep 9 21:43:11 EST 2005


I've figured out how to switch frequencies of the iMac G5 CPU (at
least for my 1600 MHz models) and at that opportunity found that OF
puts the machine into half speed on boot, and that's what Linux got,

This is bad news for the solution of the riddle how Apple keeps the
fans that quiet while I need to run them, since clearly it's not
because they run the machine at half speed most of the time.  Running
the machine at full speed under Linux has the fans roaring even on an
idle machine, at least when you've got about 30 degrees outside
temperature.  OS X keeps the thing quiet, even though not drawing
considerably less power.

I've written the cpufreq driver as an external module for now, since
there's no "platforms" subdir in arch/ppc64 yet (which is where the
pmac_cpufreq driver resides in ppc).  Here's the code:

I don't do any voltage stuff myself, mainly because OF doesn't
either.  If anyone knows if I should, please let me know.

Apart from the functions that actually do the switch this is
completely untested, because compiling cpufreq itself into the kernel
(I've simply hacked arch/ppc64/Kconfig to source the Kconfig) yields
a kernel that locks up.  I figure I could spend weeks trying to find
out why, so here's my plea to the ppc64 gods: Could anyone have a
look at why cpufreq without any cpu drivers loaded would lock the
machine at boot time?

Two somewhat related notes:

(a) I've set up a page with hints on running linux on the iMac G5.
If this is a duplicate effort, let me know and I'll pull the page.

(b) On that page, I link to benh's first SMU patch as the one to
apply (from
In the meantime, benh has put out a newer SMU patch -- however, that
one won't compile with vanilla 2.6.13 (it's lacking struct of_match,
OF_ANY_MATCH and some others, and I gave up on it after fiddling for
a while), whereas the one I used does.  That's an excuse to benh for
having ignored the second patch.

And then a last question:

The nap/doze stuff the G5 can do sounds nifty and might be part of
the explanation for the thermal trouble.  It's G5 generic and thus
I'm wondering if anyone has given putting it into Linux any thought

Thanks all,


More information about the Linuxppc64-dev mailing list