个人工具

UbuntuHelp:XORGHardy

来自Ubuntu中文

跳转至: 导航, 搜索
  1. title Xorg in Ubuntu 8.04

The purpose of this guide is to help people who are unaware or not sure how to handle Xorg's dynamic regonition of the users video / input hardware. Within the Xorg 7.1 releases there was a concious effort to try to deal with users Xorg setup requirements better. Dynamic hardware configuration was introduced and has been getting better and better. The current Ubuntu (8.04 Hardy Heron) release utilises this technology to a greater extent than ever before. Instead of having a long /etc/X11/xorg.conf file with lots of complex and hard to grasp information, the 8.04 release /etc/X11/xorg.conf file looks something more like this.

Example


# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by debconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# 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

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "gb"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
EndSection

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "HorizEdgeScroll"       "0"
EndSection

Section "Device"
        Identifier      "Configured Video Device"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Synaptics Touchpad"
EndSection


As you can see from this example the information held in /etc/X11/xorg.conf file has been very much reduced, this is because on Xserver startup, Xorg detects your hardware and makes its best possible configuration available to you. This configuration is dynamic so it is held in the X servers memory, that way if you shutdown, change your hardware, on the next start up Xorg will re-detect your hardware and recreate your config in memory. There are still senarios, where manual editing of the /etc/X11/xorg.conf file would be required or a better option than allowing Xorg to detect and configure these for you. Possible reasons could be

  • Xorg incorrectly identified and selected your video card or monitor
  • You wish to use advanced features such as xinerama, TV out
  • You wish to use Advanced driver customisation such as Nvidia's Twinview, or "logo" options.
  • You are having issues and want to trouble shoot, or you are tying to improve your configuration in more granular detail.

A point worth noting is just because the options you are looking for are no longer visible in the /etc/X11/xorg.conf configuration file, doesn't not mean they are

  1. Not in use
  2. Not available any more for use

Reconfiguration & Troubleshooting

The following section of this page is to help assist with common reconfiguration issues requested on a regular basis from Ubuntu support resources.

Video Card Drivers

Previous versions of Xorg contained within Ubuntu releases contained the driver information you where using in the /etc/X11/xorg.conf file.

Example Legacy Xorg Driver Section


Section "Device"
  Identifier  "Card0"
  BoardName   "intel-mobile-video"
  VendorName  "Generic Computer Shop"	
  Driver      "i810"
EndSection

This short example, only actually provides a small hunk of relevant information for reconfiguring your Hardy Xorg configuration file.

  • Boardname: This information is not needed in the 8.04 Hardy /etc/X11/xorg.conf file, but it is useful to either identify multiple video cards in one system, or to serve as a reminder for the driver we should be using.
  • Driver: This line is the key. This line tells Xorg what driver module to load and use for your card. By default this line is blank in your 8.04 Hardy /etc/X11/xorg.conf file, as xorg will try to select the best driver for you. You can manually override this by forcing the Xorg to use the driver you want it to. In this example, I'm going to change the legacy Intel driver i810 to the more experimental driver called Intel. To force this in Ubuntu 8.04's Xorg configuration I will add the missing lines to my Ubuntu 8.04 Hardy /etc/X11/xorg.conf file. It would look like this, which as you can see is close to the legacy /etc/X11/xorg.conf file from earlier releases.

Example Ubuntu 8.04 Xorg Driver Section


Section "Device"
  Identifier  "Card0"
  BoardName   "intel-mobile-video"
  Driver      "Intel"
EndSection

Video Card Driver Options

Every driver with Xorg has more advanced set of driver options, these can range from displaying a vendor logo, to disabling monitor EDID information retrieval. Ubuntu 8.04 Hardy release /etc/X11/xorg.conf does not contain any advanced driver options, due to the lack of a hard coded driver line in the /etc/X11/xorg.conf file. This doesn't however mean they cannot be used. The following example shows the addition of lines into the video card "Device" section, to force the use of the intel i810 driver, and some advanced driver options.

Example Ubuntu 8.04 Xorg Updated Driver Section


Section "Device"
  Identifier  "Card0"
  BoardName   "intel-mobile-video"
  Driver      "Intel"
  Option      "NoAccell"      "0"
  Option      "DCC"           "1"
  Option      "Clone"         "1"
  Option      "Rotate"        "270"
  
  
EndSection

This Example forces the use of the following driver options for the i810 driver

  • NoAccell: This option allows graphics acceleration to be enabled or disabled, as the option suggests it's a double negative being that enabling "no acceleration" would actually disable acceleration. In this example, the boolean value is set to "0" disabling "noAccel", which in turn enables graphics acceleration.
  • DCC: This driver option enables or disables DCC support. This value is a boolean, "1" enabling DCC support, "0" disabling DCC support. In this example "1" is selected forcing DCC to be enabled.
  • Clone: This option allows the use of dual headed cards, this can be set as a boolean to "1" or "0". In this example "1" is selected to enable a cloned monitor display on the second card pipe.
  • Rotate: This allows you to rotate the screen by 90, 180, 270, degress. In this example I 270 degress is selected.

The advanced driver options are simply examples of options that can be used with the i810 Xorg driver, and how you can force the now dynamic Xorg release in Ubuntu 8.04 Hardy Heron release to use them. These options are specific to the i810 driver and not a complete list. You can find more information out with the command "man i810" in a terminal. Each driver has it's own set of driver options, most are not compatible with each other, please make sure the driver options you use are specific to the Xorg driver you are using.

Nvidia Video Card Drivers

Xorg has two core options for Nvidia video drivers, The Xorg included driver referred to as "nv" and the external driver provided by Nvidia Corporation (http://www.nvidia.com) referred to as "nvidia" or "proprietary driver" These drivers have various differences both providing pro's and con's to their use.

Xorg NV Driver

This driver is supplied as part of the Xorg core driver packages, it is open source and covered by the MIT license, as such is commonly referred to as "nv" or "open source Nvidia driver". The main positive point of the nv driver is that it is open source, it's freely available for developers to develop, fix bugs and progress. The card also supports a wider range of Nvidia chipsets than the proprietary Nvidia drivers as legacy chipsets and cards are not removed from the drivers as quickly and commonly as the proprietary drivers. The core drawback stopping these drivers from becoming "the norm" for use with Nvidia video cards is the lack of 3D and accelerated support. The nv driver is really without any usable 3D acceleration support. This is due to Nvidia Corporation not releasing the hardware specifications to provide 3D support. Reverse engineering has been carried out on the Riva, TNT and Geforce chipsets, however the effects are nowhere near as usable as the propritary driver from Nvidia. Work is progressing on a driver called "nouveau" (http://nouveau.freedesktop.org/wiki/) to provide 3D support to the Nvidia cards however this driver is very early in it's life and not in a usable state currently.

Xorg NV Driver Configuration

The majority of users with Nvidia graphics cards will want to use the proprietary Nvidia video card driver for the simple reason that 3D support is enabled for use with advanced graphics features such as compiz-fusion. There are some issues that surround the use of the proprietary Nvidia driver. People who have cards that are not supported by the proprietary Nvidia drivers, or users who don't require 3D support/composition, may want to seriously consider using the Xorg nv driver. To force Xorg to use the nv driver in the Ubuntu 8.04 Hardy Heron release, the /etc/X11/xorg.conf file should approximately resemble the following example:

Example Ubuntu 8.04 Xorg NV Driver Nvidia Hardware Device Section


Section "Device"
  Identifier  "Card0"
  BoardName   "Generic Geforce 7800"
  Driver      "nv"
EndSection

As with the earlier examples, this is only forcing Xorg to use the driver. To obtain the results that you want, you may need to configure Xorg to use more advanced driver options.

Example Ubuntu 8.04 Xorg NV Driver Nvidia Hardware Device Section Advanced Driver Options


Section "Device"
  Identifier  "Card0"
  BoardName   "Generic Geforce 7800"
  Driver      "nv"
  Option      "DualHead"      "1"
  Option      "ShadowFB"      "1" 
  Option      "FPScale"       "1"
  
EndSection

The above example shows the use of three example driver options. These are:

  • DualHead: The NV driver equivalent of the i810 driver option "clone" used in the earlier example (see comment about each driver having it's own set of driver options that are not interchangeble). This option has a boolean option which in this example is set to "1" enabling "DualHead" DualHead enables a simple VBE based dual head mode setting both screens to the same resolution.
  • ShadowFB: This option has a boolean switch, which setting to "1" enables the use of the Shadow Frame Buffer Layer.
  • FPScale: This is an example of how specific drivers can be needed to get your desired results, This option can only be used on Geforce 4 or later chipsets, and when enabled with the boolean switch set to "1" will scale lower resolution screens up to the native resolution of the flat panel display in use.

As with the earlier i810 example, the selected driver options are for example only, there are more available and can be used to help configure the results you want. These options are specific to the Xorg "nv" driver. More information on this driver and it's options can be found by typing "man nv" in a terminal.

Nvidia Corporation Nvidia Xorg Driver

The Nvidia Xorg driver supplied by Nvidia Corporation is a proprietary or "closed source" driver. The driver is often referred to as "nvidia" or a "proprietary" driver. The proprietary driver is the more common driver for use with Nvidia cards due to the fact that it provides the best 3D acceleration support for Nvidia graphics cards. This is probably the core factor that accounts for it being the most popular Nvidia driver. The core down side to the "Nvidia" driver is that it is closed source--no one other than developers at Nvidia corporation can provide bug fixes. This can result in compatibility issues between the Nvidia driver (due to the fact that it provides a kernel module as well as an Xorg driver) and the kernel, which makes packaging and supporting the driver for Linux distributions a full time effort for the Nvidia Corporation. As a result, there is a reasonable amount of scope for distribution/kernel/driver incompatibility at regular intervals.

Xorg Nvidia Corporation Proprietary Driver Configuration

The proprietary Nvidia Xorg driver has a slightly more complex setup along with configuration methods and provides a kernel module to provide an interface into the kernel from the Nvidia Xorg driver. To allow for easier setup and configuration, Ubuntu has provided a package with a specific version of the Nvidia Xorg driver that is tested against the version of Xorg and the Linux kernel that Ubuntu 8.04 uses. This allows for a more stable driver than the bleeding edge releases from the Nvidia Corporation.

Xorg Nvidia Corporation Proprietary Driver Configuration Ubuntu GUI

To try to make Ubuntu a more usable desktop for its users, Ubuntu has provided a tool called the restricted driver manager or the Hardware Driver tool. It can be accessed from the Ubuntu GNOME desktop via the System Menu -> Administration -> Hardware Drivers. XORGHardy?action=AttachFile&do=get&target=XORGHardy_hardware_drivers_desktop_cropped.png If you have an Nvidia card you will see it listed in this interface. Clicking enable should do everything that needs to be done for you. PLACE HOLDER FOR KDE DESKTOP IMAGE IF POSSIBLE

Xorg Nvidia Corporation Proprietary Driver Configuration Ubuntu Command Line

If you have problems using the Hardware Driver tool you can use the command line to install the Nvidia Corporation's proprietary driver. Within the Ubuntu 8.04 software repository there are three core packages

  • nvidia-glx-legacy
  • nvidia-glx
  • nvidia-glx-new

These three packages are associated with the three versions of the Nvidia proprietary driver. Which driver package you select will depend on your video card.

  • nvidia-legacy: An older packaged version of the Nvidia proprietary drivers and should be used with older versions of Nvidia graphics cards such as Nvidia TNT, TNT2, TNT Ultra, Geforce and Geforce2 chipsets.
  • nvidia-glx: The more current and stable version of the Nvidia proprietary drivers and should be used with most Nvidia cards containing Nvidia Geforce, Quadro and nforce chipsets.
  • nvidia-glx-new: Contains a more bleeding edge version of the Nvidia proprietary drivers aimed at the latest Nvidia cards available such as the new Nvidia Geforce 8 chipset based cards.

You can install your chosen proprietary Nvidia driver set with the following command

sudo apt-get install nvidia-glx

Replacing nvidia-glx with your chosen package name. At this point the Ubuntu package management software will connect to the Ubuntu software repository and download the driver package along with the needed dependencies. Upon the restart of the Xorg Xserver, the auto detection should select the correct Nvidia driver for you.

Display

xxx Corporation