Saturday, July 11, 2009

A venture into the depths of the Macbook's sleeping habits

I have a problem with my sleeping habits, you see, so I decided to put a magnet on the reed switch attached to my battery cable. Wait, what?

Correction: my Macbook has problems, and they're even graver than mine. First of all it's missing a pretty major part if you happen to be a laptop, and that's its screen. Second of all the trackpad isn't working and a key is loose (a key I happen to use quite often, too). That's okay though, all I have to do is use an external monitor and mouse, right? Right.

As I found out the other day the developers over at Apple, in a flash of genius, decided to disagree with me when they made the OS X 10.5 Leopard installer. If you unplug or break the Macbook display the computer doesn't realize that the screen isn't there and tries to use it, but you can just connect an external monitor and use as main display and it's all fine. That is, as long as you can put up with the broken/unplugged display being on either side of your external display without you being able to see it (I set it to a low resolution and put it in the middle of the left side - so I won't go to it if I try to use the hot corners). The installer unfortunately doesn't have the luxury of being able to mirror or using an external display as the main display, even if the built-in one is broken or unplugged.

There is a solution, however, I realized while searching the web for any possible keyboard shortcuts or other keys to press at boot (there aren't any, by the way). The solution is to make the computer sleep and keep the switch that makes the computer sleep on while waking it up with an external keyboard. Anyone who has used a Mac laptop with its lid closed can attest to the fact that you can use it while closed if you've got an external keyboard, mouse and display, and Apple confirms it on their site.

I've removed the display part entirely, however, so how do I make it sleep? Well, I figured I might as well try to find out what kind of switch does the magic and after some googling I found the name "reed switch." A reed switch is a switch activated by magnets, so I figured I'd just run a magnet all around and try to find it (since there are pretty strong magnets in the display pretty close to the hard drive already I figured it'd be okay, was a bit anxious at first but it passed ;)).

Nothing happened. I tried googling again and after a lot of different queries and reading I managed to find a page that sold a battery connector spare part. With a reed switch attached to it? I tried running the magnet around the area where it should have been, but got no result. Ah, what the heck, I've been in there before so why not again.


At this point my Macbook had about 30 screws lose. ;)


The guts of a Macbook, just in case you haven't seen such gory pictures before. :)

I opened it up and located the PCB where the reed switch is supposed to be. I disconnected it and put it back in and after moving it around a bit I managed to get it to work and voilá, it went to sleep!

A strong magnet (from the screen part of the Macbook, actually), wrapped in paper tape, on top of the reed switch.

All I had to do now was boot up the installer with the computer in "fake sleep mode" and to my amazement the installer showed up on the external monitor! On a side note you don't actually need an external keyboard, all you need is a keyboard. Normally you need an external one because you can't reach the built-in one, the obvious reason being that the display is in the way. If you haven't got a display the built-in keyboard works just fine, though.


The OS X 10.5 Leopard installer on an external display. :)

In the end it installed just fine, and now I run it in "sleep" mode all the time to get rid of the internal non-existing display. I taped the magnet to the side of the computer after making sure the magnetism affected the switch enough from where it was.


It looks quite neat being taped to the side like that, it's even got a similar color. :)

Though completely unrelated to what I do for a living, I thought it was interesting enough to put in a blog. I hope this will help someone else with a similar problem (there seemed to be quite a few judging from my google searches). :)

I'll end this post with a picture of where this took place - my working desk. There is no better place than in front of a sturdy, worn-down desk surrounded by computers and various parts and electronics. And knives. That's an essential tool when disassembling computers, trust me.


3 comments:

  1. From some days he is suffering with some problems.As he has to work all the night along through his computer so for this he can hardly sleep in a day.



    Combo TV

    ReplyDelete
  2. Now it's time to put the internals to the test. This is Apple's fastest notebook offering so my expectations were sky high. First thing I wanted to have a look at is the battery.Click here

    ReplyDelete
  3. 최고의 메이져 먹튀검증 이곳에서 즐기세요

    ReplyDelete