.java

musings on java and object oriented software development

Thursday, October 19, 2006

PowerBook narcolepsy issue hack

A few months ago, when doing some photo editing, I noticed that my 1-year-old PowerBook G4 1.67 was a bit sluggish. So I had a look at the available RAM on the machine and sure enough the maximum RAM reported was 512MB, rather than the 1GB that I had installed. I had a look at the memory slots in the System Profiler and one of the memory banks indicated that it was empty.

After a bit of research I found that this was a fairly common problem and Apple were repairing the problem free of charge. So I sent it to a local shop and got it fixed. ( The fix, it turns out, is to replace the Logic Board).

About a week later, my laptop suddenly went to sleep with out warning. It would wake, when you hit the keys, then go back to sleep soon after. Eventually the only way to get it awake was to pull out the battery and power cord. After this cold reboot (which was irritating because you had to reset the clock all the time), it would work fine for an hour or so then the pattern would repeat it self.

I searched about the issue and found that it is a problem with the Trackpad temperature sensor on the PowerBook. The sensor would sporadically display 100+ degrees C, causing the system to think it will melt if it doesn't shut down. The system.log will show a message "Power Management received emergency overtemp signal." prior to it going to sleep.

Very frusted, I searched on the net and tried various remedies which involved removing Kernel Extensions that monitor the temperature of the trackpad. I don't think these extensions actually stop anything, just allow third-party apps to read the temperature sensors, because the fixes didn't make any difference.

After trying all of the fixes, I thought I'd take matters into my own hands (a hardware repair was out of the question because the laptop is out of warranty), so I downloaded the mach kernel source, found the block of code that sleeps after displaying the "emergency overtemp signal" message and commented it out. After rebuilding the kernel, I pointed Open Firmware to the new kernel and rebooted.

I wouldn't recommend anybody doing this because it is potentially very dangerous!. You might ignore real overtemp signals, your PowerBook could catch on fire!

Several minutes after the restart I got the dreaded "emergency overtemp signal" message twice within seconds of each other, while watching the temperature of the trackpad with the very handy app "Temperature Monitor". Because I had commented out the sleep code, the system did not sleep. The temperature of the trackpad temporarily went to 102.5 C, then back to a cool 37 C.

Problem solved ! In future I will change the code so that it is safer, i.e. keep a history of the fluctuation so that random 100+ degress C temperatures can be put in some perspective and only ignoring overtemp signals coming from the Trackpad.

45 Comments:

At 12:52 AM, Anonymous Anonymous said...

Cool - I thought you were just installing a newer kernel but you were apparently patching it.
Not that this story adds much value to your "buy a mac" conversion campaign :)

 
At 2:59 PM, Anonymous Anonymous said...

would you mind describing exactly how you did that? I am not a programer but I'm sure i can do it. i just need it explained for dummies. I've tried everything else published on the blogs and nothing seems to work for me.

thanks!

 
At 3:13 PM, Anonymous Anonymous said...

would you mind describing exactly how you did that? I am not a programer but I'm sure i can do it. i just need it explained for dummies. I've tried everything else published on the blogs and nothing seems to work for me.

thanks!

 
At 7:34 AM, Anonymous Anonymous said...

hi,

could you give any more information about your fix, because i have the exact same problem whith the same story with the ram not being detected. The problems began after the repair from apple..
It is driving me mad!

Greets Nico
nico.potvin@skynet.be

 
At 7:38 AM, Anonymous Anonymous said...

Hi,

Could you post some more info about your fix?
I had the exact same problem with the exact same machine. The problems started after it was in for replacing the motherboard for the RAM issue, they did this 2 times already, and we all know the logic board isn't the problem.
it is driving me mad!

Greets
Nico
Nico.potvin@skynet.be

 
At 5:04 AM, Blogger Eric Hansen said...

This problem is driving me crazy, please post how to do what you did to the kernel source.

 
At 6:14 AM, Anonymous Anonymous said...

Interesting information. Thanks for sharing the results of your efforts. Allow me to add a couple observations from my own experience with this problem.
When Temperature Monitor is left running with the History window open, wild Trackpad temperature fluctuations are observed (-135 to 220 degrees F) but no automatic shutdown occurs. It would seem that in the process of monitoring sensor data, TM itself interferes with the shutdown process to a sufficient extent that it reduces the number of shutdowns significantly by at least 80 percent (a subjective estimate).
Have you seen such effects?
Thanks again.

 
At 8:42 PM, Anonymous Anonymous said...

A more detailed explaination of your solution would be wonderful! I've got the same issues. I'm assuming the kernal source you are refering to is "xnu-792.12.6" found here: http://www.opensource.apple.com/darwinsource/10.4.8.ppc/

Correct?

Could you give some pointers to the code block in question/details on getting open firmware to boot from the now-modified kernel? (not all of us are kernel developers, y'know).

My email address is rudi0026@umn.edu

 
At 9:50 AM, Anonymous Anonymous said...

Very interesting information as I have the same symptoms/ploblem/message with my 15" 1.5Ghz PowerBook

But I am not in level to do the manipulation you did about the kernel change! What can I do?

Thanks for your experience

Georges

 
At 8:37 AM, Blogger Brad said...

This is good and bad news... good because I finally have an answer to this vexing problem that has plagued me for the last several weeks.

My 15" PB 1.67 is out of warranty, too, and everything else I've read was people guessing the logic board was the culprit. I don't feel comfy doing these hacks though, and I don't have Applecare to cover this dumb problem.

This stinks - thanks for posting the fix, regardless!!

 
At 11:59 AM, Anonymous Anonymous said...

hey,
i'm interested in trying this, none of the other so called "fixes" have worked for me.any chance you could point me in the right direction ? i can get the source code and know how to edit it but where is the line that disables the overtemp response ? my e-mail is donner (at) netti (dot) fi, thanks in advance.

ps. sorry for the bad english :)

 
At 2:29 PM, Anonymous Anonymous said...

Very interested by your solution to this spurious trackpad overtemp that puts my PB G4 1.5Ghz to sleep too.
But I am not in level to rebuild a kernel!
No way to get information how you did it?

Regards

 
At 9:54 AM, Anonymous Anonymous said...

Is there a download for this file anywhere?

 
At 9:53 AM, Anonymous Anonymous said...

Hey im sitting on a narcoleptic powerbook right now is there anyway you can email the way you did it ive tried to kernel extensions and it still comes up and sleeps a lot.if you could i'd really appreciate it.

ryanr14@gmail.com

 
At 1:03 PM, Anonymous Anonymous said...

Hi! I have exactly the same problem without the solution. How do I block my system to ignore this overtemp signal (by recoding kernel or something..? step by step instruction plz) and to be able to use my powerbook normally. Thanks for your help!!

 
At 8:58 PM, Anonymous Anonymous said...

Thanks for the info on this. My 17" has worked flawlessly. I have never had issues with any of my Macs, so, I skipped applecare on this one. It is 13 months old, and just yesterday it started sleeping spontaneously. I used temperature monitor, and saw that the trackpad sensor was jumping all around, I moved the IOI2CLM7x.kext out of the extensions folder, and that seemed to work, for about 2 hours. Then it went to sleep again.

My next thought is to remove the IOI2CControllerPMU.kext....

What would you recommend as a next step? Also, do your modifications to the kernel disable all of the sensors, or just the trackpad?

Thanks!

 
At 8:59 AM, Anonymous Anonymous said...

Hi

Is this fix still working for your machine? I'm having the same problem with my Power Book, and have not yet found a fix (out of warranty of course!)


"After trying all of the fixes, I thought I'd take matters into my own hands (a hardware repair was out of the question because the laptop is out of warranty), so I downloaded the mach kernel source, found the block of code that sleeps after displaying the "emergency overtemp signal" message and commented it out. After rebuilding the kernel, I pointed Open Firmware to the new kernel and rebooted."

would you be able to post a run through of this procedure?

 
At 7:45 AM, Anonymous Anonymous said...

As this is a common problem (I have the same problem), it would be useful if you could give more details baout modifying the "kernel source" to comment the "block of code that sleeps after displaying the emergency overtemp signal" message and commented it out. I promised not to complain about results! My PB 15" G4 1.5GHz is out of warranty but more than useful.

 
At 1:15 PM, Anonymous Anonymous said...

Could you tell me in which file the offending source code is located? I am having the same problem as you and I already had a repair for this last year (replaced logic board and other stuff) and I don't want to turn my powerbook in again!

 
At 9:48 PM, Anonymous Anonymous said...

Hi, I have the same narcolepsy problem and I have come to the conclusion that your solution may be the only way to fix this once and for all for my machine. I'm interested in attempting what you have done but I could use a little guidance - specifically in where to get the source code and then how to compile it and set it as my new kernel. I am a CS student so most of this will not be very foreign to me but I would like to make sure I do this correctly so as to not render my PowerBook completely useless. If you would like to help me out (and I would be very thankful if you would) please email me at tshortli [at] gmail.com

 
At 2:14 AM, Anonymous Anonymous said...

Hey there. I have been having the same problem with my powerbook g4 1.67mhz 15" since mid-December. I have tried removing the kernel extensions but the problem persists. I wonder if you could pass me the hacked kernel - I am far from home right now and on very limited computing resources. Here's hoping! rachel at ravenhead dot org ....

 
At 9:09 AM, Anonymous Anonymous said...

I am having the same issue, I am not as technical as you, is there a way to dumb down what you did so I can try it? This issue is killing me it is so painful and I can not go without my computer long enough to send away for repairs. Your help would be appreciated. Thanks

 
At 1:11 PM, Blogger Patrick said...

Thanks for posting this, it's comforting to know a) I'm not alone and b) there *is* a solution. Like you my PowerBook (a last-but-one model 1.67ghz G4) succumbed to the RAM slot failure but happily mine was within warranty and easily fixed. Just this week though it's developed the same narcolepsy issue and after several days of scouring the net for help and trying every remedy I can find I'm still left with an otherwise great machine rendered completely unusable due to faulty sensor data.

Nothing I've tried (PMU resets, deleted/moved extensions etc) seems to work so I was wondering if there's any chance of getting an idiot's guide to performing this particular piece of kernel surgery? I'm sure I'm not the only other person suffering here and until Apple recognise there's a fault it'd be nice to have a reliably working computer again.

 
At 3:31 PM, Anonymous Anonymous said...

Hi,

Can you explain in a more detailed manner how you solved the narcolepsy problem? Your solution seems so useful and promising, but unfortunately I lack the technical expertise to understand it.

Thank you so much!
belle

 
At 2:38 AM, Anonymous Anonymous said...

It seems that disabling the ApplePMU stops the sleeping, but of course causes other problems. Disabling the other extensions suggested does not seem to work for me.

Can you make you revised kernal available, please?

Thanks

John

 
At 2:12 PM, Anonymous Anonymous said...

So what´s the hack ???

 
At 7:22 PM, Blogger Unknown said...

It seems i have a similar problem here, however maybe with the processor sensors. The readings are certaily way below. Which sensor actually sends the PowerBook to sleep is is difficult to say with "Temperature Monitor" because the reading seems to jump. I wonder if you could give some more information on how to compile the kernel and point the firmware on it. Thank you.

 
At 1:35 PM, Blogger explorer said...

Any additional details you can provide on exactly how to make this fix work?

 
At 2:03 AM, Blogger FZCube42 said...

I've been plagued by the same issue, mine also being a May 2005 Powerbook G4 17" 1.67GHz. Is there a way I can have the modified kernel you mention? I'm not a Unix expert, but if guided I can do things in Terminal. Thank you.

 
At 12:59 AM, Blogger Unknown said...

Hi, my name is Harren. I've experienced the same problem as your mac. My powerbook automatically sleeps because of overtemp. Could you please send me your edited ApplePMU.kext which you have done. I hope to replaced my PMU.kext with the one you have done. Thanks very much for your help.

 
At 1:00 AM, Blogger Unknown said...

Could you please teach me how to edit my ApplePMU.kext to disable the overtemp sleeping. Thank you very much.

 
At 11:09 AM, Blogger Unknown said...

I'm having the exact same problem that you had. Would you be willing to provide me with some slightly more detailed instructions on how you obtained, modified and compiled the kernel source to make that fix?

crossglitch at gmail

Thanks

 
At 10:07 AM, Anonymous Anonymous said...

wich i have to recompile?

 
At 10:08 AM, Anonymous Anonymous said...

wich kernel i have to recompile?

 
At 1:19 AM, Blogger Rk said...

HI

I also have the same issue. I tried with OS X boot disk to do the hardware check, it failed when it was in Logic Board. Are you sure, modifying the kerneal or resetting the nvram will solve my sleeping problem or its costly hardware issue.

Regards,
Rk

 
At 4:21 AM, Anonymous Anonymous said...

I have a Ti PB which displays the same symptoms which you described. Can you tell me exactly how to get the PB to ignore the code that is causing it to sleep because of the Emergency Overtemp condition. In the Ti PB the temp sensors are on the MB(two) and I cannot find the wiring trace to defeat the temp monitor function. I have not yet tried disabling the .kext modules that has been suggested elsewhere.
I am currently running OS 10.2.8 and the Open Firmware has the version which has a fan alias listed in devalias.
Tom; email to tnmacman@mac.com

 
At 12:17 PM, Anonymous Anonymous said...

Hi ! i've got a PowerBook (May 2005) that is doing the same thing you are describing, by looking up the internet i've stumbled upon your website which had a link on another one telling about the same issues. I would like to know if you would be kind enough to post the changes in the files you've done in order to fix this trackpad temp mess ! Iwas almost ready to cut the wires of this damn trackpad but would rather try all "soft" methods !! So far i've disabled some extensions : AppleLM7x.kext
IOI2CControllerPMU.kext
IOI2CLM6x.kext
IOI2CLM7x.kext
IOI2CLM8x.kext
AppleThermal.kext
AppleCPUThermo.kext
But would really like to try your fix !
Thanks in advance and forgive my bad english (i'm French)

 
At 1:32 AM, Anonymous Anonymous said...

Hi. Would you mind sending the hack to redhotsili@yahoo.com? This narcolepsy problem is driving me crazy! I would really, really appreciate your help. Thanks!

 
At 12:04 PM, Blogger Zenji Agamotto said...

Okay people! it seems there are a lot of narcoleptic macs out there, lets put our heads together and create a place to work out the details of this fix, im under the impression that the original poster isnt supplying the details. ill post with further developments.....

 
At 9:45 AM, Anonymous Anonymous said...

Here's what you do, and I have no idea what it'll do to you. I did and I haven't gotten an overtemp signal yet, but I have gotten one (1) kernel panic, so use at your own risk:

https://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/build/chapter_18_section_3.html

BEFORE making the xnu kernel, look into xnu-792.21.3/iokit/Kernel/IOPMrootDomain.cpp and look for a line like:

if (msg & kIOPMOverTemp)
IOLog("Power Management received emergency overtemp signal. Going to sleep.");
(void) sleepSystem ();

Change the last line to
//(void) sleepSystem ();

run the make exporthdrs and make all commands, then make install.

That should do it. Good luck. I'll post to this blog again, and anyone can email me with questions at ash dot furrow at gmail dot com.

 
At 9:42 PM, Anonymous Anonymous said...

The problem I have noticed from my own 'Powerbook Narcolepsy' experiences is that sleeps occur most after long durations of use and the laptop appears to be warm. I think the heat generated from other areas of the laptop, cause the faulty trackpad sensor to spike. My logic is... if you keep the entire system cool, the faulty senor will not spike.

To do so I have bought a laptop pad. There are many laptop pads out there that essentially raise the laptop off of your lap/desktop to allow air to pass under and allow the aluminum case to act as intended by apple and dissipate the internal heat. The variety of laptop pad that I have purchased from CoolerMaster has two usb powered fans to add in cooling. Thus far I have had no Narcolepsy issues.

The flaw in this 'fix' is that the thin powerbook is no longer thin or as portable. But in the end, a US$35 fix beats dealing with Apple for me.

 
At 5:58 AM, Anonymous Anonymous said...

... maybe because it doesn´t work anymore?

 
At 1:11 PM, Anonymous Anonymous said...

i hope this helps somebody...i followed the procedure mentioned here http://people.aero.und.edu/~spoonk/powerbook.html
Then for the coup de grâce i installed insomniaX. no more napping now mr powerbook. the best part about insomniax is you can assign a hot key and turn it on and off as needed. so when you say its ok it can rest.

 
At 1:26 AM, Anonymous Anonymous said...

http://www.macintoshguru.com can do the fix for you.

 
At 4:08 PM, Anonymous Anonymous said...

2t3k5

thanks. insomnia seems a solution.

 

Post a Comment

<< Home