Tip: when X hangs, press Ctrl-Alt-F1 or F2 to switch to console mode, then Ctrl-Alt-F7 (or F8 on some distros) to go back to X. While in terminal mode you can investigate which process is reponsible for the X issue (high CPU? memory? disk I/O?) If that does not fix it, Ctrl-Alt-Backspace will kill X and every X application and you won't have to reboot.