The solution pretty surely lies in /etc/X11/xorg.conf which configures your X11 server. I myself have faced problems where changing resolution to a value that should work leads to X restart. It may be up to the display driver used, but I doubt..maybe you could start off with a blind hit by commenting out the line in xorg.conf section where it says something about option DPMS. Should be only one line. Write a # in front of the line, save, exit and restart your X (ctrl+alt+backscape), see if that helped. Also make sure that there is your desired resolution 1024x768 in the resolution lines presented in the file (one line per one colour depth, so it makes several lines). If it's missing, add it - it should be there already, though.
If commenting out the DPMS option line does not help, then take the # off from the beginning of the line so you're back where you started (so no further problems arise). This is just a though, nothing sure.