What To Do When X11 Hangs Forever

Hi all,
I'm using FreeBSD on my laptop, but once in a while, some X11 application causes the system to hang forever (at least seemingly) and irresponsive to any mouse or keyboard event. I've tried Ctrl+Alt+F1 to switch back to console, but that didn't help. windows movie
So, what can I do when in such cases (besides powering down) and how to identify the process causing the hang?
Last edited: