If your desktop is freezing from time to time, and you have an Nvidia graphics, card, try this.
Open the terminal and do this command:
xfconf-query -c xfwm4 -p /general/vblank_mode -s glx
Check if GLX was enabled by doing another command:
xfconf-query -c xfwm4 -p /general/vblank_mode
Done. Should work now!