• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Zapping PRAM

jmacz

Well-known member
I think we all know the routine -- something's behaving weird, try zapping PRAM, reboot and hold down option-command-p-r, wait for it to chime/reboot itself, and do this three times in a row before letting go of the keys and letting it boot.

But why does this work, when it does? It is supposed to restore the PRAM to factory settings, thus clearing out any corruption or bad values. But why and how does it get corrupted?

Just curious. I've had two recent issues with my Mac. My IIci was having issues with its DayStar FastCache card (crashing on boot, crashing shortly after boot, crashing when screen saver activates). Removing the card resolved it so I know it's related to the card. But today I put the card back in, decided to zap the PRAM three times (I guess that's the recommended procedure now) and mysteriously no more crashes after that (knock on wood). I was reproducing around 7 out of every 10 attempts and now I can't reproduce at all. Likewise, I had an issue with my Quadra 700 where after playing with VRAM modules and/or switching the disk device, I would get odd crashes, lock ups, etc. But after zapping the PRAM three times in a row, it hasn't locked up in days. And on both machines, almost every time I change the hardware (change VRAM configuration, add the cache card, change the SCSI device -- ie switch Zulu devices), I get the crashes until I zap the PRAM.

Do you need to zap after every hardware change? Is that a thing?

Anyone have any more color on this?
 

MrFahrenheit

Well-known member
To really make you wonder, sometimes zapping PRAM only has the needed effect when holding down for 3 successful chime cycles. One sometimes isn't enough.

To add to that, I was told by Apple engineers back in the 90s that sometimes, very rarely, you need to hold it down for 10 successful chime cycles, one and three aren't enough. Figure those out...
 

jmacz

Well-known member
Mind boggling.

But I had been told...

First hold down option, command, P and R ..... then shalt thou count to three, no more, no less. Three shall be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out.
 

joshc

Well-known member
To really make you wonder, sometimes zapping PRAM only has the needed effect when holding down for 3 successful chime cycles. One sometimes isn't enough.

To add to that, I was told by Apple engineers back in the 90s that sometimes, very rarely, you need to hold it down for 10 successful chime cycles, one and three aren't enough. Figure those out...
I know you're very confident that this is accurate information as I've seen you mention it multiple times, based on your own memory and also Apple engineers telling you about this, but I still don't believe it. Why? Because it makes no sense at all. As long as the PRAM keys are held down, and a reboot has happened, then the PRAM has been cleared. That's what Apple's own developer documentation for Parameter RAM says: https://developer.apple.com/library...Operating_System_Utilities/PRAM_Utilities.pdf

In System 7, a user can clear the current settings in the parameter RAM and restore the
default values by holding down the x -Option-P-R keys at system startup. When system
software detects this key combination, it resets parameter RAM to the default values and
then restarts the computer again. Clearing the current settings in the parameter RAM
also causes system software to change other settings not stored in parameter RAM to
default values. These settings include the desktop pattern and the color depth of the
default monitor.

As for how/why settings become corrupted or why the settings cause problems, I think the most reasonable explanation is that some software manipulates the PRAM in ways that it probably shouldn't. This is mentioned in the developer notes.

Because the organization of parameter RAM is subject to change, you should not use
the WriteParam function to change the values in parameter RAM. Instead use the
appropriate Toolbox routines to modify values in parameter RAM.

Note
If you accidentally use WriteParam to write incorrect values into
parameter RAM, the user can clear the current settings in the parameter
RAM and restore the default values by holding down the x-Option-P-R
keys at system startup
So my theory is that some developers ignored this advice, and sometimes the organisation of the PRAM is disturbed hence requiring the PRAM to be cleared to reset the organisation how it should be.
 

Phipli

Well-known member
Some 3rd party info is stored in PRAM too, I believe SuperMac and others stored graphics card settings in an area for them to use? Perhaps I misunderstood.

The way to check if multiple zaps makes a difference is to check the ROM disassembly I guess? Anyone got a commented copy for some kind of Mac II?

I... am on the side that it is superstition. Rebooting a computer 10 times might have the same impact. I mean, sometimes these machines break and won't boot until you come back to them a week later (looking at you 8600, and B&W G3).
 

joshc

Well-known member
Some 3rd party info is stored in PRAM too, I believe SuperMac and others stored graphics card settings in an area for them to use? Perhaps I misunderstood.
This is correct, some graphics cards store settings in PRAM.
 

jmacz

Well-known member
So is it a bug in Apples PRAM reset routine where given third party vendors can write to PRAM as well, their logic takes multiple runs to find and clear all changes? You would think it’s a full wipe and rewrite, similar to how you don’t have to factory reset your mobile phone more than once to get the job done. It’s just strange that it seems more like a physical cleaning where you wipe it down multiple times to remove a stain, as opposed to a software mechanism to erase and rewrite.
 

MrFahrenheit

Well-known member
So is it a bug in Apples PRAM reset routine where given third party vendors can write to PRAM as well, their logic takes multiple runs to find and clear all changes? You would think it’s a full wipe and rewrite, similar to how you don’t have to factory reset your mobile phone more than once to get the job done. It’s just strange that it seems more like a physical cleaning where you wipe it down multiple times to remove a stain, as opposed to a software mechanism to erase and rewrite.

My guess is that a single wipe only clears SOME settings, and 3 cycles clears all settings (similar to removing the battery for a day).
 

ironborn65

Well-known member
Since it seems a recurring issue with some Mac, why not hacking the battery holder and adding a switch, accessibile from outside, that disconnects the battery?
 

Phipli

Well-known member
Since it seems a recurring issue with some Mac, why not hacking the battery holder and adding a switch, accessibile from outside, that disconnects the battery?
Because they still self discharge with time. So that slows, but doesn't stop the problem :(
 
Top