If your laptop tends to overheat, it will often suffer problems such as freezing up and rendering graphics slowly, among signs that the hardware isn't working correctly. When your computer gets too hot, the fan should start and run until the computer cools off sufficiently. Ubuntu users can download tools for some computers to correct and manage laptop fans that don't kick in on time.
BIOS Fan Controls
Some laptops are configured by the manufacturer to control their fans through the basic input/output system, the process that tells your computer how to load system devices when it boots up. If your laptop controls the fan through the BIOS, you will not be able to control it through Ubuntu. The only way to know is to check the BIOS itself. On most laptops, check the BIOS by pressing a particular key at boot when you see the manufacturer's splash screen. The key changes depending on the manufacturer, common keys include F1, F2, ESC and DEL. After entering your BIOS, if you see a section labelled "Fan Control" or "Fan," set your fan options there.
For laptops in which you can control the fan through the operating system, you can get the appropriate packages from Ubuntu, but they are not included in the standard Ubuntu release. The packages you need are "lm-sensor" and "fancontrol." Install both in the terminal with "sudo apt-get install." Reboot after installing to start the sensors.
Running the Controls
You can manually configure fan controls, including setting the minimum temperature at which the fan turns on, and the temperature at which the fan will respond by spinning at maximum speed. However, the easiest way to set up fan controls is to run "pwmconfig" at the command line. This opens a script that you can edit to the settings of your choice. Read what each option does in the script, and set the option directly. For example, where you see "maxtemp=value" add a numeric value to the end of line for the temperature at which you want the fan to switch to maximum speed. The script will tell you in comments what each value does.
On most laptops you should never need to manually configure how the fan operates. The manufacturer has set the ideal controls for the computer. However, if your computer gets dirty, the fan can get clogged and not work as well. Take your laptop apart carefully and clean it with compressed air. If you don't want to risk not being able to put the laptop back together again, place a low-powered vacuum hose against the fan's vents and run it to clear out whatever dust and debris has accumulated.
Finally, older laptops may not be designed to run the latest computer graphics. Switch to Ubuntu's 2D desktop option if you want to run graphics particularly designed not to overpower your older system.