From MEPIS Documentation Wiki
If all normal attempts to configure your video have failed, you can use a tool that will examine your system and provide a new basic configuration file. There is no user input or choice of screen resolution.
You must be out of X to run this. Hit Ctrl-Alt-F1 to drop you out of X desktop to a command line prompt, or from the KDM login screen choose: Menu > Console Login:
Log in at the resulting prompt as root (you may first have to log in as user), then type:
If it works without error or failure, it will report that it has written a new configuration file:
You can then test that by entering into your root terminal:
X -config /root/xorg.conf.new
If all goes well, a black and grey grid and an X mouse cursor will appear. <Ctrl><Alt><Backspace> to kill the test X server then backup your existing xorg.conf in case you need to use any custom sections - like Synaptics touchpad for example:
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old
then copy the newly generated file to /etc/X11/xorg.conf, overwriting the one that does not work:
cp /root/xorg.conf.new /etc/X11/xorg.conf
Then you can fine-tune it for the specifics of your monitor (frequency, resolution, etc.).
Note: Using this method to correct your monitor resolution config completely removes the custom Mepis xorg.conf and all it's touchpad, tablet, keyboard etc. entries. You may need to copy relevant sections from one conf file to the other, paying close attention to the Server Layout entries and referencing them explicitly. This is mostly relevant to laptop users, those using unusual peripherals etc. Some of the Mepis Assistants may no longer work correctly after changing the default Mepis xorg.conf.