Boot into Open Firmware
Testing the fans
The PowerBook G4 (Model 5,3) has a device ‘fan’ with multiple ‘methods’. To see these enter the following commands:
You can call a method by structuring a command like the example below:
" fan" open-dev constant fan-ih- You only need to do this once.
" fans-on" fan-ih $call-method
This should turn both fans on for your machine (at full speed). Run the
fans-offmethod to turn them off again.
Setting a fan speed
You can set a constant fan speed that will persist as long as your machine is connected to a power source (power adapter/charged battery). To do this you need to add the required Open Firmware commands to the NVRAM.
- Open the NVRAM editor by running
- Add the command to open the fan device:
" fan" open-dev constant fan-ih
- Call the
set-speedsmethod with the speed of ‘340’:
1 340 " set-speeds" fan-ih $call-method
- Press Control + C on the keyboard to exit the NVRAM editor
- Run the command
nvrunto execute the contents of the NVRAM
Here’s what this should look like on your screen:
> nvedit > " fan" open-dev constant fan-ih > 1 340 " set-speeds" fan-ih $call-method > nvrun
On my PowerBook ‘340’ is a moderate speed. Open the NVRAM editor again to adjust this number to find your desired fan speed. Press the down arrow key to navigate the different commands in the NVRAM. Make small adjustments such as ‘340’, ‘350’, ‘360’. You will find that there is a small window in which the fans operate.
If you have found a speed that you are happy with, run the following commands to store this information in the NVRAM:
nvstore setenv use-nvramrc? true reset-all
Your machine will reboot and these values will persist as long as it’s powered (power adapter, plugged into the wall, or with a charged battery). As soon as your machine loses power the contents of the NVRAM are lost. To reduce the amount of typing after a power loss, you can write an Open Firmware script. If you have a script called ‘bootscript’, you will just need to enter the following into Open Firmware after a power loss:
setenv boot-device hd:\bootscript mac-boot
Writing a script
Scripts can be written with the Mac OS 9 application ‘SimpleText’. Open SimpleText and add the following to your new document. Alter the speed if necessary.
This script tells all fans to run at the specified speed.
\ comment cr " fan" open-dev constant fan-ih 1 340 " set-speeds" fan-ih $call-method boot hd:,\\:tbxi
This script tells both Fan 1 and Fan 2 to run at the specified speeds.
\ comment cr " fan" open-dev constant fan-ih 1 356 " set-speed" fan-ih $call-method 2 356 " set-speed" fan-ih $call-method boot hd:,\\:tbxi
The first line of the script must contain an Open Firmware comment, followed by a carriage return (‘cr’).
The last line sets the boot device to the default HD so the machine continues to boot after running the script.
Save the file to the root of your hard drive and call it ‘bootscript’.
Running the script
Restart your machine into Open Firmware and run the following command:
setenv boot-device hd:\bootscript
Is there a better method?
If you have found a better method, or a way to add variable speeds please get in touch.