Saturday, 11 August 2018

Powerbook G4 - part 1 - IDE converter fun

Since, by now, about six months, I am the proud owner of an original 2004 Apple PowerBook G4 1.5 15" (Al). I got this one for cheap together with some other bits that I will talk about in another post.


After spending some time with the thing I pronounced it to be in good health generally, with exceptions for the harddrive, the battery and some minor cosmetic issues. As is to be expected, the battery did no longer keep a charge and there are some minor scratches and spots on the case. The harddrive however, had died completely. All it did at boot was making some rattling noises at boot. It was not detected by the firmware nor the operating system.

To be able to test the machine beyond the boot error, I dug up an old 2.5" 40G Toshiba PATA ("IDE") drive from my pile-of-parts, to replace the broken one. Together with the laptop, I got a DVD with MacOS Leopard, so I installed that first, and gave it a try. This OS worked fine, and reported all hardware, battery excepted, to be in working order. I could even burn a DVD!

My end-goal was to install Linux on it. Unfortunately, while most current distributions still support PowerPC, all of them are working on ending support for the 32-bit variant. The only distro that still seems to be committed is Gentoo. And as I had read, and confirmed, that there are some problems with video support, I figured Gentoo would be a nice thing to try. Its source-based nature should make debugging easier.

For installing this, a faster hard would be nice, so I looked at using an SSD. As the Powerbook lacks a SATA interface, the SSD  needs to fit a PATA interface. While these exist, they are expensive, and I did not want to invest more money than necessary in this endeavour.  The obvious alternative would be a SATA SSD together with a SATA-PATA converter. So I went looking for such a converter on EBay, and found and ordered an 2.5" converter that should work. Next step was for a cheap ~120Gb  SSD. As luck would have it, I found a cheap deal on a Kingspec Q180 180GB SSD on a webshop in the Netherlands.

While I was waiting 3 weeks for the converter to arrive, I ordered 2Gb of Samsung DDR ram via Aliexpress (8 euros delivered!) to max out the system, and this worked perfectly. And taking the Aliexpress experience even a bit further, I also spent 17 euros for a replacement battery. I have no idea what the original battery was capable of, but the replacement gives me a few hours before I need to find a wall socket, and that is good enough for my purposes.

When the converter arrived, I set out to fit everything into the machine. As the SSD is the same physical size as a normal harddrive, there was no room left for the PATA-SATA converter. But at least for small capacity SSDs, the PCB inside the housing is much smaller than the housing itself.

So I took the PCB out, plugged it into the converter, plugged the converter into the PowerBook's PATA port, and ...success! That is to say, everything worked. But because the connectors on the converter were perpendicular to the board, it did not really fit well in the chassis, and I could not screw things down. All that was securing the SSD to the converter was the friction in the SATA connector, and both were dangling on the little flex-cable that connected to the PowerBook PCB.

The SATA-PATA converter, with the perpendicular connectors. The SATA connector is visible, but the PATA one is on the other side.
Not happy about this, I made another search on EBay, and found basically the same converter, but with different connectors that were oriented parallel to the PCB. So I splashed out another 3 euros and ordered one.

Another 3 weeks later, the next converter arrived. Determined to make everything fit nicely this time, I modified the SSD housing to move the original PCB and make room for the converter. Physically, this went really well, but it turned out that with the new converter, the SSD was not working reliable. Both with Linux and MacOS, the SSD would drop of the IDE bus after some time, and would not recover.
Fitting everything inside the original SSD housing.
As I could not see an obvious flaw in the converter, and, except for the connectors, also no difference with the working original one, I concluded that some component was malfunctioning, and that the easiest solution was to order yet another one from a different supplier.

My SATA SSD pretending to be a PATA disk.
Another 3 weeks later the new converter ("#3") arrived. By then I had setup an Intel Atom system that has a 2.5" PATA connector so I could test things outside of the PowerBook, to eliminate the system itself as a cause of problems. Putting the SSD and new converter in this system allowed me to verify that it was working. I could read the entire SSD multiple times without problem, while the #2 converter would never reach more than about 12GB.

Feeling happy and confident, I put the SSD and new converter into the PowerBook and went to work.

For a while...

Until the SSD stopped working again!

And now putting it back into the Atom system also exhibited the same problems. So by then I had three 3 2.5" SATA-PATA converters: #1 - working, but with the wrong connector orientation. #2 - not working, but with the right connectors. And #3 - until recently working, and with the right connectors. My solution to this was to remove the connectors from #1, and replace them with the ones of #2. This took some challenging soldering, but in the end I got it to work.

Almost...

Again, the SSD stopped working, just less frequently than before. Strangely enough, I could not reproduce the problem on my Atom system, so it seemed specific to the PowerBook.

The only thing I could imagine was that the G4's power supply somehow was not stable enough. This could explain the difference between the Atom and the PowerBook. However, this did not explain why the old 40G drive worked fine, as that one should need even more power than my SSD. Also, while the computer supplies 5V, it is immediately regulated down to 3.3V and 1.8V, the voltages that are actually used by the SSD chips. So a slight voltage drop on the 5V supply should probably not be this fatal. In fact, the AMS1117 regulator claims to work with a voltage difference down to 1V, so even if my supply would drop all the way to 4.3V, it should still be okay.

Clutching at straws however, I soldered a 220 μF capacitor between the 5V and ground, to see if that would help. Unsurprisingly, it did not.

Then I took another look at my connector soldering, and noticed that the SATA data connector could use a bit more solder on one side of the converter board. Unfortunately I did not take a picture at the time, but about 120° of the solder-pad around the hole did not connect to the pin of the connector. The other 240° looked fine, but I added some solder just in case.

To make a long story short: after fixing this, the problem was gone, and so far I've not encountered any drive trouble anymore. More interestingly, a closer look revealed that converter #3 has some similar shoddy solder joints (from "factory"!), so on my to-do list is cleaning these up as well, and seeing what improvement that brings.

Finally everything fits nicely in the PowerBook. And works!!!
With a reliable storage device as a basis, I was able to install a dual-boot configuration of MacOS Leopard and Gentoo Linux. As reported above, the latter is not entirely stable in graphics mode. Digging into this will be the subject of a next post.



No comments: