My Thinkpad T400s kept shutting down when it was busy doing CPU intensive work. It turns out that the fan did not speed up to a high enough level to cool down the CPU, and I’d find messages in /var/log/messages stating that the CPU was dangerously hot.
The first thing I did was to make it possible to manually control the fan speed. In order for this to work, the thinkpad_acpi kernel module needs to be loaded with a specific parameter. This can be