Results 1 to 10 of 1334

Thread: HOWTO: Jaunty Intel Graphics Performance Guide

Threaded View

  1. #1
    Join Date
    Nov 2005
    Ubuntu Development Release

    HOWTO: Jaunty Intel Graphics Performance Guide

    Warning: Although I have made an effort to make this guide as accessible as possible, if you are a beginner to Ubuntu then you are not recommended to follow this guide at all. Even if you stick to the safest method outlined, your system may experience difficulties due to the installation of unofficial drivers. Consider yourselves warned .

    Some users are experiencing performance issues with Intel integrated graphics chips in Jaunty (9.04) for several possible reasons:

    1. The current driver in our repository has some performance issues with the EXA acceleration method. Users will notice 2D performance is poor due to the default "migration heuristic" employed by EXA (to "always" migrate pixmaps), but this causes performance issues for many users. Setting the heuristic to "greedy" alleviates this problem somewhat. See "man exa".
    2. The new and faster acceleration method (UXA) is not enabled by default, due to issues reported by many users. This code is being actively developed, and many stability and performance issues have been resolved in the latest drivers (specifically within the intel driver, libdrm, mesa and kernel or later). Unfortunately, Jaunty will not include the latest versions necessary to improve performance.
    3. 3D performance has regressed compared to the Intrepid release, possibly due to major code changes that have resulted from the introduction to the new acceleration and memory management code (UXA, GEM, DRI2). Due to these changes, there seems to be some regressions in the "legacy" DRI acceleration.
    4. Either Xorg or the "intel" driver seems to be suffering from a bug in which the memory (MTRR) region allocated for the graphics card is not set up with the proper type of caching. This results in jerky video playback of almost any content (from 720p media, all the way down to simple 320x240 mpeg content), and a potential loss of performance for other 2D and 3D operations.

    There are three possible configuration that this guide will present:

    Safe Configuration
    • For this configuration, you will upgrade to the latest stable Xorg drivers (via the X-Updates PPA), enable UXA acceleration and create a workaround for the MTRR bug. This is the solution recommended for users who possess hardware devices that depend on a restricted driver. If you don't know what this means, then this is the solution you should use.

    Optimal* Configuration
    • This configuration is identical to "Safe", but includes the kernel. Using this kernel will improve 3D performance for many users, but you will lose access to restricted kernel drivers. This configuration yields the best results for my system (an 855GM chipset), but of course, your experience may differ.

    Bleeding-Edge* Configuration
    • This configuration is the most risky. This will enable repository which contains bleeding-edge mesa & Xorg drivers which are continually updated (via the xorg-edgers PPA), enable UXA acceleration, create a workaround for the MTRR bug and install kernel This configuration is not necessarily the fastest (in fact, the Optimal configuration is fastest for my hardware), and is recommended only for users who want to test the latest Xorg code.
      Note: As per the PPA maintainer's wish, you are instructed to read the instructions here, since the Bleeding-Edge repository is prone to breakage and important instructions may be added. Don't request support for these packages (and don't be surprised if questions are left unanswered).

    *Disclaimer: Using a third-party kernel means that you will no longer have access to "restricted" drivers such as FGLRX, NVIDIA, some Broadcom wireless chipsets, certain webcams and a handful new sound cards that require restricted firmware to function. If you believe that you have restricted hardware on your machine, you should continue using the official Jaunty kernel - in other words, stick to the Safe configuration.

    Warning: Do not switch between the Safe/Optimal and Bleeding-Edge solutions unless you have followed the steps to revert changes beforehand. For example, if you try the Bleeding-Edge method, and then decide to try the Optimal configuration, you will still be using the Bleeding-Edge drivers (because the xorg-edgers PPA contains newer drivers than the X-Updates PPA, which are not downgraded automatically).

    Once you have decided on the configuration that suits you, begin by following Part A below:

    Part A - Common Instructions (Safe/Optimal/Bleeding-Edge)
    All users must follow this part.

    0. Optional: If there is no xorg.conf file present on your system, the following command will create a minimal configuration (which you can customize later):
    $ sudo dpkg-reconfigure -phigh xserver-xorg
    Note: Use caution with this command, as it will overwrite any xorg.conf file already present on your system (though it will create a backup).

    1. Edit your xorg.conf:
    $ gksudo gedit /etc/X11/xorg.conf
    Find the "Device" section and make sure it looks identical to the following (important: remove or comment any of your previous customizations):
    Section "Device"
    	Identifier	"Configured Video Device"
    	Option		"AccelMethod"			"uxa"
    	Option		"EXAOptimizeMigration"		"true"
    	Option		"MigrationHeuristic"		"greedy"
    	Option		"Tiling"			"true" # i8xx users: see note in guide
    N.B.: If you are using an Intel 8xx chipset, tiling cause instability unless you use the Bleeding-Edge configuration. Therefore: if you are using the Safe/Optimal configurations, set tiling to false; if you are using the Bleeding-Edge configuration, set tiling to true.

    2. Download Bartec's script and make it executable:
    $ sudo wget -O /usr/local/bin/
    $ sudo chmod +x /usr/local/bin/
    3. Create a symbolic link to ensure the script is executed upon each login via GDM:
    $ sudo ln -s /usr/local/bin/ /etc/gdm/PostLogin/Default
    N.B. This works only if you are using the GNOME Display Manager (GDM). KDE/other users need to execute this script manually - see the Important Note section.

    4. If you want the Safe/Optimal configuration, continue to Part B. For Bleeding-Edge, skip to Part C.

    Part B (Safe/Optimal)
    Users who wish to try the Safe or Optimal configurations must follow this part.

    1. Add the X Updates PPA to your sources.list:

    Edit /etc/apt/sources.list:
    $ gksudo gedit /etc/apt/sources.list
    Add these entries to the end of your sources.list file (if they do not already exist):
    deb jaunty main #X-Updates PPA
    deb-src jaunty main #X-Updates PPA
    2. Import the X Updates PPA key, update your apt sources, and perform an upgrade:
    $ sudo apt-key adv --recv-keys --keyserver AF1CDFA9
    $ sudo apt-get update
    $ sudo apt-get dist-upgrade
    N.B.: If you are asked to remove any packages, immediately cancel the process. The expected behaviour is only to upgrade packages, not to remove.

    3. If you want to use the Safe configuration, you're finished - proceed to the Important Note section. If you want the Optimal configuration, continue to Part C.

    Part C (Optimal/Bleeding-Edge)
    Users who desire the Optimal or Bleeding-Edge configurations should follow this section.

    1. Download & install the kernel according to your architecture:

    i386 users:
    $ wget -c
    $ sudo dpkg -i linux-headers-2.6.30-02063009-generic_2.6.30-02063009_i386.deb linux-headers-2.6.30-02063009_2.6.30-02063009_all.deb linux-image-2.6.30-02063009-generic_2.6.30-02063009_i386.deb
    amd64 users:
    $ wget -c
    $ sudo dpkg -i linux-headers-2.6.30-02063009-generic_2.6.30-02063009_amd64.deb linux-headers-2.6.30-02063009_2.6.30-02063009_all.deb linux-image-2.6.30-02063009-generic_2.6.30-02063009_amd64.deb
    3. If you want the Optimal configuration, you're finished - however, before rebooting into the new kernel, read the Important Note section. Bleeding-Edge users, continue to the Part D.

    Part D (Bleeding-Edge)
    Users who desire the Bleeding-Edge configuration should follow this section.

    1. Add the xorg-edgers PPA to your sources.list:

    Edit /etc/apt/sources.list:

    $ gksudo gedit /etc/apt/sources.list
    Append the following text into the end of this file, then save and close:
    deb jaunty main #xorg-edgers PPA
    deb-src jaunty main #xorg-edgers PPA
    Import the xorg-edgers PPA key, update your apt sources, and perform an upgrade:
    $ sudo apt-key adv --recv-keys --keyserver 8844C542
    $ sudo apt-get update
    $ sudo apt-get dist-upgrade
    N.B.: If you are asked to remove any packages, immediately cancel the process. The expected behaviour is only to upgrade packages, not to remove.

    2. You're finished. However, before rebooting into the new kernel, read the Important Note section.

    Important Notes (Safe/Optimal/Bleeding-Edge)

    Reporting Bugs
    If you choose the Safe or Optimal configuration, you will be using the stable (but unofficial) X-Updates drivers. From the repository description:

    While Ubuntu-X does not officially support these packages, if you discover problems when installing these debs please feel free to report bugs to launchpad. However, please make sure to clearly state that you are running packages from this PPA so we know the fixes need to come here.
    Therefore, if you are using the Safe/Optimal configuration you may report bugs to Launchpad - as long as you adhere to the request above. I also recommend that you test against the official Ubuntu kernel, or at least disclose in your bug report that you are using the unofficial mainline kernel.

    If you are using the Bleeding-Edge configuration, you can also report bugs to Launchpad as long as you explicitly state that you are using the xorg-edgers drivers. Please keep in mind that the purpose of the xorg-edgers repository is to package semi-daily snapshots of upstream's code, and Launchpad may not the appropriate place to file bugs (since there are going to be days where stuff is expected to break, and filing a bug is a waste of time). Alternatively, you can report issues to the upstream bug tracker, but you are expected to submit detailed reports. Don't expect support for the xorg-edgers drivers in this thread!

    Remember to use the ubuntu-bug tool to ensure the required information gets submitted to your bug report:
    $ ubuntu-bug xserver-xorg-video-intel
    Using the script
    The purpose of the script is to workaround a bug in the intel driver and/or kernel and ensure your graphics card's memory region gets set to the correct type of caching (write-combining). If your memory region is not set with the proper type of caching, you will experience video stuttering and reduced 3D performance.

    Note: If you are using Kubuntu or a custom distribution of Ubuntu that does not use the GNOME Display Manager (GDM), you need to execute the script each time X (re)starts. Therefore, executing this script in your rc.local script is not sufficient.

    Interpreting Performance Gains

    Do. Not. Trust. Glxgears.

    Seriously. Your glxgears score may reduce after following this guide and enabling UXA acceleration (i.e., when the DRI2 framework is activated), but it does *not* mean things are worse.

    The glxgears application was never an accurate benchmark of 3D performance, and developers have pleaded for users to understand this fact for a long, long time. See this page for an explanation.

    I suggest you find a better tool to benchmark performance - in my case, I settled on PlanetPenguin racer (enabling the FPS counter in the options).

    For comparison's sake, here's a rough outline of my performance results on my Inspiron 510m laptop with a Pentium M 1.5Ghz, 768MB ram and Intel 855GM chipset:
    Intrepid: glxgears = ~1000fps, ppracer = ~23fps.
    Jaunty (default configuration): glxgears = ~300fps, ppracer = ~19fps
    Jaunty (with Optimal configuration): glxgears = ~340fps, ppracer = ~30fps

    As you can see, glxgears does not accurately portray the improvement gained from testing the latest DRI2/UXA code.

    To Revert Settings
    If these configurations didn't work for you, this is how to revert changes.

    1. Edit your sources.list:
      $ gksudo gedit /etc/apt/sources.list
      Remove the lines for the xorg-edgers and/or X-Updates repositories, then save and close.

    2. Downgrade packages:
      $ sudo apt-get install libdrm-dev/jaunty libdrm2/jaunty libdrm-intel1/jaunty libdrm-radeon1/jaunty xserver-xorg-video-intel/jaunty libdrm-nouveau1/jaunty libgl1-mesa-dri/jaunty libgl1-mesa-glx/jaunty libgl1-mesa-dev/jaunty libglu1-mesa/jaunty mesa-common-dev/jaunty mesa-utils/jaunty xserver-common/jaunty xserver-xorg-core/jaunty xserver-xorg-input-evdev/jaunty xserver-xorg-input-evdev/jaunty xserver-xorg-input-synaptics/jaunty xserver-xorg-video-ati/jaunty xserver-xorg-video-nv/jaunty xserver-xorg-video-openchrome/jaunty xserver-xorg-video-radeon/jaunty
      N.B.: Ensure that packages are only downgraded, not removed. Otherwise cancel the process.

    3. Remove the kernel:
      $ sudo dpkg -r linux-headers-2.6.30-02063009 linux-headers-2.6.30-02063009-generic linux-image-2.6.30-02063009-generic
    4. Reset your xorg.conf to defaults:
      $ sudo dpkg-reconfigure xserver-xorg
    5. Optional: remove the script and GDM PostLogin hook:
      $ sudo rm /usr/local/bin/ /etc/gdm/PostLogin/Default

    Your system will then be restored to normal.

    v1.1 - 12/05/09 - Complete re-write.
    v1.2 - 12/05/09 - Modified instructions to allow automatic startup of script (Part A, step 3).
    v1.3 - 19/05/09 - Updated Bleeding-Edge section to fetch -rc6 kernel.
    v1.4 - 24/05/09 - Updated Bleeding-Edge section to fetch -rc7 kernel.
    v1.5 - 01/06/09 - Updated Optimal section to fetch kernel, added Bleeding-Edge note.
    v1.6 - 02/06/09 - Added some warnings to guide.
    v1.7 - 03/06/09 - Updated Bleeding-Edge section to fetch -rc8 kernel.
    v1.8 - 11/06/09 - Updated Optimal and Bleeding-Edge sections to fetch final 2.6.30 kernel.
    v1.9 - 15/06/09 - Added information regarding bug reporting policy to Important Note section.
    v2.0 - 24/06/09 - Clarified bug reporting policy.
    v2.1 - 22/07/09 - Updated guide to use kernel.
    v2.2 - 28/07/09 - Updated guide to use kernel.
    v2.3 - 15/09/09 - Updated guide to use kernel.
    Last edited by psyke83; October 15th, 2009 at 02:24 PM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts