Trouble CPU frequency and battery on macbook

Hello List,I recently got a new Macbook and while tryning to install debian on it I have some trouble getting the cpu frequency scalling and the battery status working.I followed the tutorials on:
http://wiki.debian.org/MacBook#head-7271d26c7c6e311218ca20422f7eb86e76a6d5e3andhttp://gentoo-wiki.com/HARDWARE_Apple_MacBookHere are the action I did exactly:
- Following these tutorials, I got a 2.6.22 kernel from kernel.org- I pachted them with the mactel sources for this kernel version- I recompiled the kernel using the configuration file provided by the gentoo wiki and set all cpu frequency scalling options to modules (powersave, ondemand, ...) and the default governor to userspace
- Once recompiled, I installed cpufreqdOn the Gnome desktop, the battery applet tells me that there is no battery present, as if ACPI was not configured correctly and cpu frequency scalling applets tells me that my CPU's are running at 100% (although default governor is userspace).
CPU frequency scalling works with the command line:cpufreq-set -c 0 -d 1GHz, so I tried to make an init script with this, but this does not seem to work. In fact, the script seems never to be executed.To do this, I followed the tutorial on:
http://www.debian-administration.org/articles/28I thought CPU frquency and battery management were governed by the same features.Does anybody know why I don't get my battery status to work? Did I for forgot a module in the kernel?
How come that I can't get my CPU frequency to run on minimum although userspace is set?Finally, how come that my script is not executed although the symblic links in te different runlevel were created?
Thanks for your help.Regards,Alex P.S In case it helps, here is an output of lsmod:# lsmodModule                  Size  Used byhci_usb                17500  2 rfcomm                 40408  0
l2cap                  24768  5 rfcommbluetooth              55524  7 hci_usb,rfcomm,l2capbutton                  7824  0 ac                      5124  0 battery                 9924  0 cpufreq_powersave       1728  0
cpufreq_performance     1984  0 cpufreq_ondemand        8268  1 cpufreq_conservative     7048  0 acpi_cpufreq            9240  0 sbp2                   23304  0 snd_hda_intel         261080  2
snd_pcm_oss            43488  0 snd_mixer_oss          16704  1 snd_pcm_ossappletouch             10048  0 snd_pcm                79876  2 snd_hda_intel,snd_pcm_osssnd_timer              23428  1 snd_pcm
snd                    55140  9 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timersoundcore               8160  1 sndsnd_page_alloc          9992  2 snd_hda_intel,snd_pcmohci1394               35504  0
ieee1394               95480  2 sbp2,ohci1394thermal                13320  0 processor              30652  2 acpi_cpufreq,thermalfan                     4740  0

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Trouble CPU frequency and battery on macbook

Hello everybody,I got news on this problem, perhaps this will help fixing my problem. I got the speedstep working by adding some lines to the /etc/rc.local script, as described in the debian wiki for the macbook.
But, I still don't have my battery recognized. So I installed an ubuntu feisty as dual boot on my macbook since the ubuntu documentation says that the battery of the macbook is recognized without problem and without having to compile a custom kernel.
But, after installing and updating the ubuntu (I installed from the live CD) it happens to have the same behavior as on debian --> The battery is not recognized (gnome applet says no battery is present).So, I suppose that the kernel parameters are not the cause of this; did I forgot something (a daemon, a program, a module)?
Thanks a lotRegards,Alex2007/7/29, Alexandre Neubert <alexandre.neubert@gmail.com>:
Hello List,I recently got a new Macbook and while tryning to install debian on it I have some trouble getting the cpu frequency scalling and the battery status working.I followed the tutorials on:

http://wiki.debian.org/MacBook#head-7271d26c7c6e311218ca20422f7eb86e76a6d5e3andhttp://gentoo-wiki.com/HARDWARE_Apple_MacBook
Here are the action I did exactly:
- Following these tutorials, I got a 2.6.22 kernel from kernel.org- I pachted them with the mactel sources for this kernel version
- I recompiled the kernel using the configuration file provided by the gentoo wiki and set all cpu frequency scalling options to modules (powersave, ondemand, ...) and the default governor to userspace
- Once recompiled, I installed cpufreqdOn the Gnome desktop, the battery applet tells me that there is no battery present, as if ACPI was not configured correctly and cpu frequency scalling applets tells me that my CPU's are running at 100% (although default governor is userspace).
CPU frequency scalling works with the command line:cpufreq-set -c 0 -d 1GHz, so I tried to make an init script with this, but this does not seem to work. In fact, the script seems never to be executed.To do this, I followed the tutorial on:
http://www.debian-administration.org/articles/28I thought CPU frquency and battery management were governed by the same features.
Does anybody know why I don't get my battery status to work? Did I for forgot a module in the kernel?
How come that I can't get my CPU frequency to run on minimum although userspace is set?Finally, how come that my script is not executed although the symblic links in te different runlevel were created?

Thanks for your help.Regards,Alex P.S In case it helps, here is an output of lsmod:# lsmodModule                  Size  Used byhci_usb                17500  2 rfcomm                 40408  0
l2cap                  24768  5 rfcommbluetooth              55524  7 hci_usb,rfcomm,l2capbutton                  7824  0 ac                      5124  0 battery                 9924  0 cpufreq_powersave       1728  0
cpufreq_performance     1984  0 cpufreq_ondemand        8268  1 cpufreq_conservative     7048  0 acpi_cpufreq            9240  0 sbp2                   23304  0 snd_hda_intel         261080  2

snd_pcm_oss            43488  0 snd_mixer_oss          16704  1 snd_pcm_ossappletouch             10048  0 snd_pcm                79876  2 snd_hda_intel,snd_pcm_osssnd_timer              23428  1 snd_pcm

snd                    55140  9 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timersoundcore               8160  1 sndsnd_page_alloc          9992  2 snd_hda_intel,snd_pcmohci1394               35504  0
ieee1394               95480  2 sbp2,ohci1394thermal                13320  0 processor              30652  2 acpi_cpufreq,thermalfan                     4740  0

Trouble CPU frequency and battery on macbook

On 8/6/07, Alexandre Neubert <alexandre.neubert@gmail.com> wrote:
Hello everybody,I got news on this problem, perhaps this will help fixing my problem. I got the speedstep working by adding some lines to the /etc/rc.local script, as described in the debian wiki for the macbook.
But, I still don't have my battery recognized. So I installed an ubuntu feisty as dual boot on my macbook since the ubuntu documentation says that the battery of the macbook is recognized without problem and without having to compile a custom kernel.
But, after installing and updating the ubuntu (I installed from the live CD) it happens to have the same behavior as on debian --> The battery is not recognized (gnome applet says no battery is present).So, I suppose that the kernel parameters are not the cause of this; did I forgot something (a daemon, a program, a module)?
Thanks a lotRegards,Alex
 
 
I also have a MacBook, so I'll share my experience.  Anyway, what I'd recommend is two things.  First, add the source (not the binary) repositories for Debian Unstable to your sources.list.  This can be done by editing said file (/etc/apt/sources.list) or using Synaptic.  Then, rebuild the
2.6.22 kernel from Debian's source using the following instructions:
 
http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
 
Follow the instructions to build a stock kernel only for your subarchitecture (do a uname -r to find out what this is - it's 686 on i386 Debian, but I dunno with amd64 Debian).  Install the resulting debs - you may need to download a few dependencies from unstable (just get them from the Debian site).  You will now have a
2.6.22, Debianized kernel - which works pretty well for power management.
 
After doing this, try to install "powertop".  For this, you want to add the unstable binary repositories to your sources.list and pin them to a low priority (google "apt pinning" for info on how to do this).  Then, do an "apt-get -t unstable install powertop".  Run powertop as root, and follow the suggestions it gives you.  You should notice a difference, though you will need to add some of the suggested commands it gives you to a script that runs at boot for them to be retained after rebooting.

 
With that said, this is all quite tricky, and I've found that it may be much simpler - and work better - to simply run the testing (lenny) distribution on a MacBook.  The power management seems to automatically function that way.  You may need to install the
2.6.22 kernel from unstable, though, using apt-pinning (no need to build from source on testing).
 
Tim

Trouble CPU frequency and battery on macbook

ok, I'll try that this evening. That is to say, I already run an unstable debian, so I don't know if your procedure is still necessary (sorry, I forgot to tell that I run a debian sid in my previous mails).
On sid, you don't have to do any of the kernel recompilation.  Things should "just work". 
I already did this. This is a nice little program and I followed all suggestions (most of them forced me to recompile my kernel), but this didn't change anything.
Did Powertop show any frequency scaling going on, or was your system permanently running at its full frequency? You may want to try it with the Debian kernel again - it never asked me to recompile my kernel, and it did manage to find that frequency scaling was turned off.
Is this still to test since I run a debian sid? Can it be that the power management works well on testing and not with sid?
Btw, I tried the 2.6.22 precompiled kernel from sid too, but it did not work better.No, sid should work as well as (if not better than) testing.  I'm wondering if this is just an issue with the very newest MacBooks (I have a first-generation one, and it works fine). You shouldn't have to recompile the kernel in any case with
2.6.22.Where can I go from there?
One thing you could try is adding acpi_cpufreq and cpufreq_ondemand to /etc/modules.  That may enable frequency scaling if its disabled.  Also, make sure all the ACPI-related packages are installed by running "tasksel" and making sure "Laptop" is selected.
Tim 

Trouble CPU frequency and battery on macbook

Hi Tim, Thanks for your help.2007/8/7, Tim Hull <thully@umich.edu>:
ok, I'll try that this evening. That is to say, I already run an unstable debian, so I don't know if your procedure is still necessary (sorry, I forgot to tell that I run a debian sid in my previous mails).
On sid, you don't have to do any of the kernel recompilation.  Things should "just work". Unfortunately, it doesn't ;).

I already did this. This is a nice little program and I followed all suggestions (most of them forced me to recompile my kernel), but this didn't change anything.
Did Powertop show any frequency scaling going on, or was your system permanently running at its full frequency? You may want to try it with the Debian kernel again - it never asked me to recompile my kernel, and it did manage to find that frequency scaling was turned off.
All what Powertop says is to configure some properties to scal down the processor wake-ups; which I did. An info message also says on top of the powertop window that no power management information is available.
The system is scalable though; I managed to scal down the processor's speed as I wish; but no battery detection.What is wiered is that the power management applet detects whether or not the system runs on battery or not; but no time left estimation and no power management of the battery is available; it simply says battery or not battery.
I think, I should work and I forgot either to load an acpi module (which would surprise me; acpi_cpufreq, ac and battery are loaded as well as governors) or the power management program I use is not able to manage this type of battery (I tried cpufreqd, powersaved, powernowd and powertweakd).
What do you think?
Is this still to test since I run a debian sid? Can it be that the power management works well on testing and not with sid?
Btw, I tried the 2.6.22 precompiled kernel from sid too, but it did not work better.No, sid should work as well as (if not better than) testing.  I'm wondering if this is just an issue with the very newest MacBooks (I have a first-generation one, and it works fine). You shouldn't have to recompile the kernel in any case with
2.6.22.Yes, perhaps; mine is a second-generation macbook. Perhaps I'll have to wait.
Where can I go from there?
One thing you could try is adding acpi_cpufreq and cpufreq_ondemand to /etc/modules.This was already the case
 That may enable frequency scaling if its disabled.  Also, make sure all the ACPI-related packages are installed by running "tasksel" and making sure "Laptop" is selected.
This was already done at install time.AlexTim
 

Trouble CPU frequency and battery on macbook

I think, I should work and I forgot either to load an acpi module (which would surprise me; acpi_cpufreq, ac and battery are loaded as well as governors) or the power management program I use is not able to manage this type of battery (I tried cpufreqd, powersaved, powernowd and powertweakd).
What do you think? Honestly, I have no clue - this all seems quite weird, as I've never seen a situation where it doesn't detect the battery. Something might be messed up with your particular install, as I haven't heard of such an issue even with the Core 2 Duo MacBooks. You could try reinstalling - also, you may want to try the amd64 architecture Debian if you're running the i386 one now (the Core 2 Duo will run either) - and you could try i386 if you've been running amd64. 
I only have a Core Duo (i386-only) MacBook, though, so I don't know much about Core 2 Duo quirks.Tim

Re: Trouble CPU frequency and battery on macbook

Hello,
I was able to solve this trouble - not on Mac, but on HP Compaq notebook - only by compiling all the ACPI settings not as modules but as a solid parts - I mean all the "y" possinilities.
Still also depends on kernel - it seems. It works for me on 2.6.25, 2.6.25.9, but not on 2.6.18. Configuration is the same in all the kernels concerning this issue.
Milan

Syndicate content