Another way to deal with X freezing.
Use acpi to set your power button to switch you to console. Just edit your /etc/acpi/power.sh and change it to...
#/bin/sh
/bin/chvt 1
The acpi system is separate from the X/keyboard interface and still works. So this way you can switch to the console even if your keyboard is locked.Note you can use other keys as well. On my laptop I use my "thinkvantage" key for this. Any key that has an associated acpi event will work.