From MEPIS Documentation Wiki
Sometimes it may be necessary to use a more advanced method to change the configuration of one or more aspects of your X-server setup - for example: when having difficulty in getting the correct monitor display resolution of frequency, or using unusual keyboard or mouse type. This is yet another, more advanced, method of configuring your /etc/X11/xorg.conf (or /etc/X11/XF86config-4) X-server file. While using the Mepis OS Centre is the easiest method of making X-server config changes - sometimes a little more control is needed - using this method it is possible to set up exactly the right parameters for your GPU (graphics card), monitor, keyboard and mouse - without having to manually edit (possibly erroneously!) any .conf files. You can also use this method to recover your graphical environment if you get stuck at the command prompt if the X-server fails to start after a driver update/config change for example.
dpkg-reconfigure xserver-xorg and dpkg-reconfigure xserver-xfree86 are command line scripts to be run from any command line environment as root user and use the whiptail/ncurses graphical dialog interface - similar to some common Debian installer type interfaces (commonly called wizards). Navigate through the dialogs by using:
- Tab key to toggle between the buttons
- SpaceBar to toggle check boxes on or off
- Return to accept/next/ok
- Arrow Keys for Up/Down in lists
- Left/Right to tab between boxes
You will be prompted at the end of the processes whether you want to save changes or not.
dpkg-reconfigure xserver-xorg will also save the existing xorg.conf file in /etc/X11 as a dated backup file when it writes the new file once the config process is completed. You can restore the old version by renaming it if the need arrises. It is also pretty quick to make a small change to one aspect of the config as the app will have the current settings pre-selected in the dialog. If the first attempt to configure X isn't successful/satisfactory - run it again until satisfactory result is obtained.
To use this tool you will need to do a little preparation to ensure you have the info needed by dpkg-reconfigure xserver-xorg as you will be asked a series of questions about your setup and hardware - read carefully these questions - often it is ok to leave the answer box blank (where it is suggested) or choose auto.
- Graphics Card - ensure you have the correct drivers installed for your hardware before using this tool. Generic vesa/nv type drivers have limited capabillities and cannot do openGL/3D graphics
- Your Keyboard type - often PC104
- Mouse port connection - commonly /dev/psaux
- Server Modules to load - when using the official nvidia driver "nvidia" it is important to not load the module/section "Dri"
- Monitor Display Resolutions to be used
- Horizontal and Vertical Resolutions (-if you select Advanced when prompted in monitor setup section) - search the web if you don't have the manual/spec of your monitor
- Colour Bit Depth to use - 24 bit for most newer hardware
To see the changes made you will need to restart the X-server:
- Log out from your desktop manager (KDE/Gnome/other)
- Hit 'Ctrl Alt Backspace' to kill and restart the X server. If the server fails to start you can re-run the dpkg-reconfigure tool again to see if you can correct any errors or try a different config.
- MEPIS (=> 6.0) uses a custom xorg.conf configuration by default which contains entries for non-standard input devices such as Appletouch touchpads, Wacom tablets and pens as well as configurations needed for compositing window managers (Compiz/Beryl etc). Using dpkg-reconfigure will remove these custom entries, so it may be a good idea to copy the relevant monitor sections written by the dpkg-reconfigure dialogue and paste that into the monitor/device section of the auto-backed up copy of the original xorg.conf file (saved in /etc/X11/), then re-instate this file:
cp /etc/X11/xorg.conf200812230910 /etc/X11/xorg.conf
That way you can keep the MEPIS original custom configs and specify exact monitor resolution entries as well.
Xorg (not Xfree86) will attempt to detect your monitors capabilities by trying to read the connected monitors EDID (Extended display identification data) tag. If found - X will ignore the horizontal/vertical frequencies in the xorg.conf file and use the detected specs instead - this means that for Xorg it isn't strictly necessary to specify frequencies (as it is in Xfree86) - but older monitors may not have EDID, so it won't do any harm to specify them.
If you have added other custom sections to your X config file for things such as - multi-head display, multi-button mouse, touchscreen etc., you will probably need to add these sections again manually after using the dpkg-reconfigure method.