Wednesday, July 29, 2015

Pimp My Quicksilver - Part IV:B CPU

As promised, this particular post will be short and sweet. First off, I have had to drop the upgraded CPU clock speed back down to 1.33 GHz as so far it seems to be offering the most stability with both operating systems. Research in that department continues.

However, I was still allowed to move forward with the jump to a 32-bit SMP kernel within Debian.  What follows is basically the 2 steps I had to take in order to do so.  Even then it is nothing outrageous.

1. Run the following command to search for the most current and appropriate 32-bit SMP PPC kernel within the Debian repositories.

sudo apt-cache search linux-image

This should return a list of about 3 different kernel image packages as well as the corresponding meta-packages and headers for each of them.  Look for the SMP image called linux-image-[insert version here]-powerpc-smp.  You do NOT want the powerpc64 version as no G4 PowerMac or CPU upgrade for it was ever 64-bit capable.  I have left the kernel image version out as it may vary over time.

2.  Install the SMP linux image.  Right now the current version on my Debian Jessie install is 3.16.0-4.

sudo apt-get install linux-image-3.16.0-4-powerpc-smp

After installing this image, I had no need to manually update my yaboot.conf file as that was done so automatically.  Would not hurt to double check though to make sure the default kernel is now your SMP one.

3.  Reboot

Reboot your machine to allow it to boot using the newly installed multiprocessor capable kernel.  Once you are logged in, there are multiple ways you can verify your system is now taking advantage of multiple CPUs, but I will cover the ones I am more familiar with.  The first command you can run will help you verify that your system is seeing both CPUs.

cat /proc/cpuinfo.

Here are the results of mine:


Okay.  Both CPUs are recognized, but are both being utilized by the running system? This is where the command line tool top can come in and provide this information.  In a terminal, simply type top and you should see a great deal of information and usage statistics about your running system.  You can type the 'h' key for help on different options you have at your disposal for arranging the layout of the information provided by top as well as what information is displayed.  We want to hit the '1' key to provide usage statistics on separate CPUs as can be seen from this screenshot:


Since both CPUs appear here with a % of use, we can be assured that both CPUs are being fully utilized by Debian.  Great.  How about we take it even one step further by looking at which CPU a particular process is running on?  That would provide even more assurance and give us an idea of how and what work is divided up amongst the two CPUs.  To do this, will need to use the ps command line tool.  This tool basically provides a snapshot of your system's running processes. Again, while in a terminal, type the following and hit Enter:

ps -eF

Look for the PSR column, which stands for processor.  In our case, the resulting number will either be a 0 or a 1 since we only have 2 CPUs and numbering always starts at 0 in computer science. Here is a screenshot hightlighting the command running on the QS.


If you are curious, the -e flag tells the system to include all processes and the -F flag stands for full format, which adds in some additional information to each listed process including the aforementioned PSR column.

That is it for this post.  I barely scratched the surface of what the ps and top tools are capable of, so I would encourage to explore them further.  All sorts of neat things are possible. The next (and last) post on the CPU upgrade will take a more in depth look at performance improvements in the system with more everyday tasks put to the test and some CPU spec comparisons.

Tuesday, July 21, 2015

Pimp My Quicksilver - Part IV:A CPU

Welcome to part IV of the series on upgrading a G4 Quicksilver (QS).  If you have stuck around this long, I think you will find that we will start to see some more substantial improvements in terms of overall performance with some of these next few upgrades.  For this particular post, I will be focusing on upgrading the CPU. In fact, I will be breaking it down even further than that due to the fact that this particular upgrade has become quite a bit more work than I had originally anticipated.  Needless to say, I have learned quite a bit along the way about jumpers, dip switches, voltage, etc.

I was excited about this upgrade as I knew it would do wonders for the QS and upfront I will state I was not disappointed, but more on that in a later post. The stock 7447 G4 Motorola CPU running at 800 MHz was just not cutting it even for tasks as simple as installing updates via apt-get in Debian.  As I stated in an earlier post, I was lucky enough to locate a dual 1.4 GHz Giga Designs 7457 CPU upgrade on eBay for quite cheap. In fact, I have been tracking a large number of single and dual CPU upgrades for G4 PowerMacs on eBay these past couple of months, so if you are on the hunt for one, definitely take advantage of this fact as they can sometimes sell quick!  Not only that, but these upgrade gems are becoming harder and harder to come by.

Consider this post the first of 3 regarding the upgrade and the processes and procedures it involved.  Part IV:A will cover that actual hardware side of the upgrade including the steps taken to swap out the CPU and the different voltages/jumper and dip switch settings I needed to set.  Part IV:B will cover the upgrades needed to jump from a single CPU PowerPC kernel to a 32-bit SMP PowerPC kernel within Debian and how to verify it was successful afterwards.  And finally, Part IV:C will cover some basic benchmarks from OS X and Debian both to provide a bit of an idea of just how much faster the machine has become.

So onto the upgrade.  The easiest part of this whole process was the steps to take out the old stock CPU and swap in the M5D-1214U Giga Designs dual 1.4 GHz 7457 CPU, which happened to be the first thing I did not really knowing what I was up against.  I followed the steps from iFixit's website for swapping out the CPU here.  The new dual processor CPU also has the luxury of having dual fans built on top of it for cooling, so I was able to permanently remove the small 60mm fan that resided behind the old CPU.  I would be able to leave it there with the new one, but I will closely monitor  temperatures with and without it.  This particular upgrade does not require all 4 of the screws you removed from the old CPU, but only 2 of them, but keep the other ones handy just in case.  Once I successfully swapped out the CPU and plugged in power to its fans, I closed the G4 up and tried to boot the machine.  Sadly, nothing.  No boot up chime, bong, whatever you want to call it.  I probably pushed the power button 6 or 7 times just hoping it would take off, but that would be too easy.

Long story short, my system needed a particular firmware upgrade that would add support for the 7457 CPU series.  Finding this particular upgrade version proved to be incredibly difficult to find as well figuring out which particular version I needed.  I first posted to Apple's discussion forums asking anybody if they had any version of the installer laying around they could email me.  A user did respond with a link to the Mac Driver Museum that is hosted over at Yahoo that held a few different Giga Designs pieces of software and upgrades under the folder appropriately named CPU Upgrades.  You will need a Yahoo account to access these files, which is a bit of a pain in my mind, but I ponied up and created an account. At the time, the only firmware updater version available was 2.0.1.  Looking back on things now I see the description says it adds support for 7447A CPUs, which was not was I was upgrading to, but that small tidbit did not click with me at the time.

I downloaded the disk image, extracted it, and copied the files to a separate folder for safe keeping.  The firmware update utility, Giga Designs 7447A Updater, was straightforward enough. Here is a screenshot of the main screen you will see during the upgrade.


The default selection of "Install 7447A Firmware Update" is what you would want if you were actually needing this particular upgrade.  When you are ready, hit the Continue button and let the software do its magic as I did.

After running this firmware upgrade and rebooting, I again swapped out the CPU, but still no sign of any life.  I did some more research online and decided it might be because I needed firmware installer version 3.0.1. I mentioned this in the same Apple Support community discussion I had already started and the same individual who commented previously pointed me to a discussion thread at MacGurus.com where somebody asked for version 3.0.1 as well, which I learned added support for the 7457 CPU upgrades.  Bingo!

I responded to the thread asking if anybody would be able to provide me with the same firmware update and within 48 hours I received a personal email from one of the moderators with the update utility included as an attachment.  Before I did anything with this version of the updater, I uploaded this piece of software to the Mac Driver Museum file repository for anybody else ever needing it in the future.

To run this particular upgrade, you can simply extract the files from the .sit archive and run the lone Giga Designs Updater 3.0.1 package.  Here is a quick screenshot of the installer.  As straightforward as can be, so I will not cover it step-by-step.


Unfortunately, and frustratingly, still no signs of life after booting up the machine with the Giga Designs CPU in place and freshly installed firmware update.  However, I remembered reading a bit more from that same MacGurus thread about different voltage settings you could set on the CPU.  Here is a table summarizing those different voltages and how to obtain them.


I thought perhaps the voltage was not set correctly and sure enough, the current setup I had for J6 - J10 was not in the table above. I decided to start with a voltage of 1.55 as 1.6 and 1.65 seemed a bit extreme for a noob like myself.  This is where I realized and learned there are also dip switches for J1 - J5 that controlled the CPU's clock frequency. So this meant I would have to also play around with those as well to see which combination of the 5 would give me 1.4 GHz.  After scouring the web for some time, I gave up the search for any sort of table showing possible combinations and resulting frequencies.  If anybody reading this has this information available, please (I cannot say it enough) share!

Since I was not able to obtain this information, I decided to starting building a list of tables with this information myself. There are still many missing results and a lot of unanswered questions I have, but it is a worthy start.  Knowing that each of the 5 dip switches had 2 possible states (either on or off) I could easily calculate the total number of possibilities as 2^5 or 32.  Yes, that is basically binary numbers and mathematics at its finest.  And with 7 different voltages to work with, I could theoretically have up to 224 possible combinations of states between J1 - J10 that could provide me with a working system and CPU.  For now, I have only included my results for 1.55v, but eventually, I will link to a PDF showing results for all voltages along with notes regarding missing values, etc. I I have read that some frequency results may not be readable by OS X, but require an additional program called GigaMeter, which is available at the Mac Driver Museum as well, to show you what your CPU's clock speed is.


As you can see from the table above I have figured out what combination provides the full 1.4 GHz, but this was one of the results that required the GigaMeter KEXT to be installed otherwise the speed was reported as 0 MHz in OS X. On the other hand, Debian still reports 0 for clock speed, but neither OS has crashed on me yet so the stability is there.  I will see if I can find anything online on to correct it within Linux. Some results produced kernel panics with both OS X and Debian and these are marked with an asterisk.  Also marked with an asterisk are combinations that successfully produced a start-up chime but would not boot any further.  And finally, as you probably have guessed, the blanks are combinations that produced nothing at all (i.e. no startup chime, boot up, etc).

Part of me wonders if I even needed the firmware upgrade for my QS, which was also mentioned by a moderator in the MacGuru's thread linked above. Either way, the CPU is still in place and running wonderfully at least on OS X Leopard.  This conclusion will bring us to my next post in this series where I upgrade my Debian install to use a symmetric multiprocessing (SMP) kernel so it takes advantage of both CPUs for even better performance.  Do not fret, this next post will be a hell of a lot shorter. :)

P.S.  If you have any other additional info you can provide regarding the Giga Designs upgrades, feel free to leave comments below or shoot me a private email and I can add it to this post.  I would love to make this process much simpler for those in the future.  The Giga Designs company is now defunct, their website is gone, and the Way Back Machine could not help me locate the information I needed most as the necessary information used to be hosted in PDF form on their site.