Announcement

Collapse
No announcement yet.

HOWTO : Repairing xorg.conf

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HOWTO : Repairing xorg.conf

    a.k.a HOWTO : Disaster Recovery and xorg.conf


    As said in the /etc/X11/xorg.conf. Xorg.conf is xorg X Window System server configuration file.


    If xorg.conf is screwed then

    - All you get is text screen.
    or
    - You are in log-in loop.
    or
    - You get empty screen.
    or
    - Display looks weird (you tried to edit xorg.conf).

    Don't Panic


    BEFORE REPAIRING XORG - If it's Not Broken, Don't Fix it !

    Disk Full
    Topic: Booting till X-windows' black screen - no KDE, not responding
    http://kubuntuforums.net/forums/inde...opic=3085948.0
    The problem was actually lack of memory of the partition where /home/user was.
    Deleting some very large back-up files/dirs gave me enough space.
    Disk space usage in text mode/konsole:
    Code:
    :~$ df
    DF(1) User Commands DF(1)

    NAME
    df - report file system disk space usage

    SYNOPSIS
    df [OPTION]... [FILE]...

    DESCRIPTION
    This manual page documents the GNU version of df. df displays the
    amount of disk space available on the file system containing each file
    name argument. If no file name is given, the space available on all
    currently mounted file systems is shown.

    Nvidia driver problem -
    Topic: [Solved] Kubuntu wont start any more
    http://kubuntuforums.net/forums/inde...opic=3086707.0

    klerfayt says:
    for manual install remove "nvidia-kernel-common" with --purge option in adept
    then see if the file /lib/linux-restricted-modules/.nvidia_new_installed is there and then:
    sudo rm /lib/linux-restricted-modules/.nvidia_new_installed

    also see if:
    * libc6-dev is installed
    * development tools like make and gcc are installed
    * the linux-headers package matching the installed Linux kernel is installed
    * the pkg-config and xserver-xorg-dev packages are installed
    * the files /etc/init.d/nvidia-glx and /etc/init.d/nvidia-kernel do not exist

    Text console log in

    Press Ctrl + Alt + F1 (or F2...6). This should start virtual console.

    From Virtual console
    a virtual console (VC, sometimes virtual terminal, VT) is a conceptual combination of the keyboard and the display for a user interface. The concrete combination is the system console of the computer, where the user can switch between the virtual consoles to access multiple unrelated user interfaces. Usually in Linux, the first six virtual consoles provide a text terminal with a login prompt to a unix shell. The graphical X Window System starts in the seventh virtual console.

    It is a good idea to backup first

    Creating backupfile:
    Code:
    :~$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_my_backup_001
    Using backup:
    Code:
    :~$ sudo cp /etc/X11/xorg.conf_my_backup_001 /etc/X11/xorg.conf

    Repairing xorg.conf

    Check what is wrong:
    Xorg.0.log is log file for X Windowing Server. It is in /var/log/.

    In text mode:
    Code:
    :~$ nano /var/log/Xorg.0.log
    "nano is a small, free and friendly editor".

    Markers in the Xorg.0.log
    Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    Just looking errors:
    Code:
    :~$ grep "(EE)" /var/log/Xorg.0.log
    Just looking warnings:
    Code:
    :~$ grep "(WW)" /var/log/Xorg.0.log
    With nano you can edit xorg.conf without gui:
    Code:
    :~$ sudo nano /etc/X11/xorg.conf
    These may help:
    Editing basics for the xorg.conf file
    http://www.linux.com/feature/118108

    Xorg.conf manual page
    http://www.x.org/archive/X11R6.8.0/doc/xorg.conf.5.html


    New xorg.conf with default options a.k.a the easiest way
    As said in the xorg.conf:
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    # sudo dpkg-reconfigure -phigh xserver-xorg
    So sudo dpkg-reconfigure -phigh xserver-xorg makes nice new xorg.conf

    Example:
    Code:
    :~$ sudo dpkg-reconfigure -phigh xserver-xorg
    Password:
    xserver-xorg postinst warning: overwriting possibly-customised configuration
      file; backup in /etc/X11/xorg.conf.20070503184018

    You know something about hardware
    Code:
    :~$ sudo dpkg-reconfigure xserver-xorg
    This reconfigures xorg (ask questions - what you want to do) and makes backup.

    Starts like this:
    Accept this option if you would like to attempt to autodetect the
    recommended X server and driver module for your video card. If
    autodetection fails, you will be asked to specify the desired X server
    and/or driver module. If autodetection succeeds, further debconf
    questions about your video hardware will be pre-answered

    If you would rather select the X server and driver module yourself
    decline this option. You will not be asked to select the X server if
    there is only one available.

    Attempt to autodetect video hardware? Yes/No


    For the X Window System graphical user interface to operate correctly,
    it is necessary to select a video card driver for the X server.

    Drivers are typically named for the video card or chipset manufacturer,
    or for a specific model or family of chipsets.

    Select the desired X server driver.


    The X server configuration file associates your video card with a name
    that you may provide. This is usually the vendor or brand name followed
    by the model name, e.g., "Intel i915", "ATI RADEON X800", or "NVIDIA
    GeForce 6600".

    Enter an identifier for your video card.

    Here is good page of sudo dpkg-reconfigure xserver-xorg:
    http://users.bigpond.net.au/hermanzone/p7.html


    Removing xorg.conf
    You could try to rename/remove xorg.conf and start without xorg.conf.

    This is for Feisty (Kubuntu 7.04) and newer versions.
    From Xorg release 7.2
    Autoconfiguration: The X server can now start without an xorg.conf file in most cases.
    Note that is says: "in most cases" .


    Start/Restart kdm from virtual console
    (kdm is the KDE Display Manager)

    Code:
    sudo /etc/init.d/kdm start
    Other options:
    Code:
    :~$ /etc/init.d/kdm -help
    Usage: /etc/init.d/kdm {start|stop|restart|reload|force-reload}

    Shutdown/Reboot from virtual console
    NAME
    shutdown - bring the system down

    SYNOPSIS
    /sbin/shutdown [-t sec] [-arkhncfFHP] time [warning-message]

    DESCRIPTION
    shutdown brings the system down in a secure way. All logged-in users
    are notified that the system is going down, and login(1) is blocked.
    Reboot:
    Code:
    :~$ sudo /sbin/shutdown -r now
    -r Reboot after shutdown.
    Shutdown:
    Code:
    :~$ sudo /sbin/shutdown -h now
    -h Halt or poweroff after shutdown.

    Automatic backupfiles
    Some programs make backupfiles automatically:
    • dpkg-reconfigure: xorg.conf -> xorg.conf.20070503184018
      (year month day hour minute second)
    • text editor kate: xorg.conf -> xorg.conf~
    • K > System Settings > Display: xorg.conf -> xorg.conf.1 (xorg.conf.2...)



    Point and Click

    xorg-edit: GUI for editing xorg.conf
    http://ubuntuforums.org/showthread.php?t=156243
    Because I found it very complex to manually edit the X-Server config file (xorg.conf in Ubuntu) to add my monitor refresh rates
    fglrxKonf
    http://www.kde-apps.org/content/show.php?content=43612
    Description:
    This is a Kommander frontend for ATI fglrx video card driver utility "aticonfig".
    kX Generator
    http://www.kde-apps.org/content/show.php?content=39085
    Description:
    kX Generator is a utilitty to configure the X server by modyfying X configuration file (xorg.conf).
    X.org Setup
    http://www.kde-apps.org/content/show...?content=56982
    Description:
    X.org Setup is a visual X.org 7.x setup utility that can detect video cards, monitors, etc.

    Links

    Main page
    Illustrated Dual Boot Site Home Page
    http://users.bigpond.net.au/hermanzone/

    Sub page
    sudo dpkg-reconfigure xserver-xorg
    http://users.bigpond.net.au/hermanzone/p7.html

    Editing basics for the xorg.conf file
    http://www.linux.com/feature/118108

    Setting up X Windows in debian
    http://home.comcast.net/~srvffl/linuxstuff/X_howto.html

    Troubleshooting X
    http://www.psychocats.net/ubuntu/nox

    xorg.conf(5x) manual page
    http://xorg.freedesktop.org/archive/...rg.conf.5.html

    I'm running without xorg.conf!
    http://ubuntuforums.org/showthread.php?p=2428898

    LinuxLogFiles
    https://help.ubuntu.com/community/LinuxLogFiles

    HOWTO: change resolution/refresh rate in Xorg
    http://ubuntuforums.org/showthread.php?t=83973

    Topic: Kubuntu fails to give an out of memory warning
    http://kubuntuforums.net/forums/inde...opic=3086089.0

    How to get started with no GUI
    http://kubuntuforums.net/forums/inde...opic=3085112.0

    Boot Options
    https://help.ubuntu.com/community/BootOptions

    FAQ: Links - How to Install AMD(Ati) Proprietary Linux Display Driver (fglrx)
    http://kubuntuforums.net/forums/inde...opic=3085652.0
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    #2
    Re: HOWTO : Repairing xorg.conf

    Just to add my 2.579 cents ( ) :

    - If you find yourself without a GUI (Graphical User Interface) and need to get back on your feet quickly, you can run the following set of commands after logging in to the console:
    Code:
    sudo /etc/init.d/kdm stop
    (Makes sure KDM isn't running in the background)

    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
    (Backs-up your current Xorg config [NOTE: the "X" in "X11" is capitalized])

    Code:
    sudo Xorg -configure
    (Creates a workable Xorg config - labeled "xorg.conf.new" - in your /home/[username] directory)

    Code:
    sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
    (Replaces your current Xorg config with the generated one -> don't worry, your old config is still intact as /etc/X11/xorg.conf.bak)

    Code:
    sudo /etc/init.d/kdm start
    (Restarts KDM with your new xorg.conf; it may not be pretty, but should work until you can make the necessary changes )

    Edit: Removed a kinda' confusing set of commands
    Asus G1S-X3:
    Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )

    Comment

    Working...
    X