Overclocking
# WORK IN PROGRESS, HELP IF YOU WANT
Contents[hide] |
Warnings
- Overclocking WILL VOID YOUR WARRANTY
- The lifetime of your device will get reduced
- You could lose the data in your device (file system corruption)
- Every device is an individual, what is stable for others might not be for you
- If you encounter ANY unusual problems, lower your clock frequency
- You do it at your own responsibility. No whining afterwards. If you're unsure, don't do it.
Necessary links
talk.maemo.org: Overclock the N900?
talk.maemo.org: Compiling custom kernels for P1.1 (with fiasco-gen)
# ADD IMPORTANT POSTS FROM THE TOPICS
latest version of the community kernel
stable community kernel in extras-testing the package
problems and workarounds
- 125MHz issue
- phone call issue1
- phone call issue2
- phone call reset workaround
- safe pmconfig configuration
- pmconfig bug
Useful stuff
Show current CPU frequency
awk '{print $1/1000" MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
Set maximum CPU frequency
From root terminal:
echo $((600*1000)) > /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
Replace 600 with desired maximum frequency. The list of available frequencies on your device/kernel can be obtained with command:
awk '{print $1/1000" MHz,",$2/1000" MHz,",$3/1000" MHz,",$4/1000" MHz,",$5/1000" MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
If the last value returned is 0 MHz, this means that you have only 4 available frequencies.
Analyzing time_in_state
This script generates readable output (percentage) of states used. It is designed for 5 available states. If you have 4 available frequencies (stock kernel) simply remove 7th line and lower "head -n 4" to "head -n 3" in 3rd line.
#!/bin/sh awk '{print "\nCurrent frequency: "$1/1000" MHz\n"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq sum=`awk '{SUM += $2} END {print SUM}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state` sum2=`cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | head -n 4 | awk '{SUM += $2} END {print SUM}'` cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | head -n 1 | awk '{printf (($1/1000)" MHz: overall "); printf ("%.1f",($2 * 100)/"'"$sum"'"); printf ("'" %%, when not idle "'"); printf ("%.1f %\n",($2 * 100)/"'"$sum2"'")}' cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | head -n 2 | tail -n 1 | awk '{printf (($1/1000)" MHz: overall "); printf ("%.1f",($2 * 100)/"'"$sum"'"); printf ("'" %%, when not idle "'"); printf ("%.1f %\n",($2 * 100)/"'"$sum2"'")}' cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | head -n 3 | tail -n 1 | awk '{printf (($1/1000)" MHz: overall "); printf ("%.1f",($2 * 100)/"'"$sum"'"); printf ("'" %%, when not idle "'"); printf ("%.1f %\n",($2 * 100)/"'"$sum2"'")}' cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | head -n 4 | tail -n 1 | awk '{printf (($1/1000)" MHz: overall "); printf ("%.1f",($2 * 100)/"'"$sum"'"); printf ("'" %%, when not idle "'"); printf ("%.1f %\n",($2 * 100)/"'"$sum2"'")}' cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | tail -n 1 | awk '{printf (($1/1000)" MHz: overall "); printf ("%.1f %\n\n",($2 * 100)/"'"$sum"'")}'
Output example:
Current frequency: 125 MHz 800 MHz: overall 5.0 %, when not idle 70.0 % 550 MHz: overall 0.2 %, when not idle 2.0 % 500 MHz: overall 2.0 %, when not idle 25.0 % 250 MHz: overall 0.3 %, when not idle 3.0 % 125 MHz: overall 92.5 %
Changing the Kernel
Installing a modified Kernel
Flashing using PC
1. Power off the N900 completely.
2. Hold "u" on the N900's keyboard, while holding, connect it to the PC via USB cable.
3. You will see usb icon on top right of white Nokia screen.
4. Now you can let go of "u" on the keyboard.
5. Now use flasher utility with the kernel file located in the same directory.
flasher-3.5 -k image_file_name -f -R
6. It should take about 1-2 seconds then it'll say Done.
7. Now your N900 will show white Nokia screen. (reboot)
8. At this time, you can pull out the USB cable.
9. N900 should finish booting up if all goes well.
10. Test out your phone as usual. (Apps, browser, camera, phone etc etc)
11. If any abnormal events occur frequently (crash, hang, screen corruption etc), turn it off, flash it to a slower kernel and test again. note: For Windows7 64bit users, you may need to use WindowsXP mode. (Youtube Tutorial)
Flashing from N900 xterminal
- do a backup, have a pc nearby and know you are able to flash the n900 with flasher-3.5 - just in case
0. Launch xterminal app then type sudo gainroot (need rootsh installed)
1. type
softupd -vv -s --local
(thats double v)
2. open new terminal
3. type
flasher --local -f -k <kernel_zimage_file_with_path>
4. you see the flashing (takes some time)
5. type "sync" to save changes
6. type "reboot" and enter to restart
7. Test out your phone as usual. (Apps, browser, camera, phone etc etc)
8. If any abnormal events occur frequently (crash, hang, screen corruption etc), turn it off, flash it to a slower kernel and test again.
You are fully responsible for any damage caused by overclocking. Not anyone else.
Reverting to the Original Kernel
If you want to revert to the original kernel, execute:
apt-get install --reinstall kernel kernel-flasher