AcceleratedX

Revision 37 as of 2006-11-14 19:54:57

Clear message

Please DO NOT update this specification. It is currently being drafted. Please talk to rodarvus on FreeNode, or another knowledgeable person, before making changes.

Summary

To enable X.Org acceleration by default, on Ubuntu Feisty.

Rationale

Currently, Ubuntu does little to enable Composition and 3D acceleration on cards that support these features. MatthewGarrett - untrue. Composite is enabled by default in Edgy's X.org, and we support 3D out of the box on everything with a working free driver There is no automatic configuration of options specific for any video board, no official documentation on how to do it for all (or at least most) cards, or how to troubleshoot in case you have a problem.

On the bright side, accelerated X platforms are much easier to make accessible (screen magnification for example is easier).

Finally, acceleration is already enabled by default on other Linux distributions, such as Fedora Core, openSUSE and Mandriva - so - there is precedent for safely enabling it on Feisty. MatthewGarrett - this statement seems highly misleading. None of these vendors ship non-free drivers by default, so we provide exactly the same level of acceleration out of the box as they do

Use cases

Joe uses Google Earth on his windows machine and wants to switch to Ubuntu. He goes through a whole bunch of trouble to find, download, and install this third-party program, and doesn't want to get an error message about hardware acceleration when the program starts.

Cindy has read about fancy new eye candy on Linux, and doesn't want to be disappointed when she installs ubuntu.

  • ["Warbo"]: Personally I don't find proprietary 3D drivers that pretty. Compositing window managers can be

Vernor thinks that, while transparency and wobbly windows aren't much use, compositing features like window preview and smart magnification actually improve his workflow.

  • ["Warbo"]: These are 3D features aren't they? I thought compositing IS the transparency.

Doreen designs video games and would like to work directly on her ubuntu-based laptop.

  • ["Warbo"]: "... and would therefore get frustrated that some crazy wobbly effects are taking a load of the GPU's cycles away from her 3D graphics package."

Scope & Design

Proprietary Video Drivers

  • Both NVIDIA and ATI proprietary drivers will be installed by default, on Ubuntu Feisty. This is out of the scope of this Specification, but is covered on the "binary-driver-education" spec MattZimmerman: this absolutely is in scope for this spec; installing these drivers by default is the core of it.

  • The NVIDIA and NVIDIA Legacy drivers work correctly, and 3D acceleration will be enabled for all users with supported boards. NVIDIA provides a function call that returns whether your video board supports 3D acceleration or not, and in the second case, xorg.conf is left untouched MatthewGarrett - Why? If the desire is to have the non-free driver be the default, just change the entry in discover1-data for the appropriate cards. Users with supported boards will have their xorg.conf generated with relevant options for appropriate support MattZimmerman: need to describe how this is done. How will you influence the choice of driver? Where does the function provided by NVIDIA live? How will it be called?

  • The ATI proprietary doesn't supports Composite, and thus, will only be enabled for users with boards that are not supported by the open source 'ati' video driver. For them, 3D acceleration will be enabled, but Composite will be explicitly disabled
    • ["Warbo"]: Every card I have used the open source ati driver on which has 3D acceleration has performed miserably at compositing/alpha, since this still appears to be done by Mesa. Running Compiz was NOT an option, since it would take minutes just to perform simple operations, so I went back to E16. I would not be suprised if every ATI card with 3D support by the open source drivers gets put on a blacklist, or as MattZimmerman has said would not get put on a whitelist.

    • Compiz running without a hitch here on ATI Radeon Mobility 9000, and I've heard others playing with the newer 9500-9800 and X700/X800 cards also succesfully so clearly the comment above is somehow a bit outdated. Surely the latest DRM/DRI/X.org is needed, but that's what we have feisty for.
    • Basically fglrx should be _only_ enabled for X1300-X1950 series of cards, and somehow a detection for those cards should be made.

Open Source Video Drivers

  • Specific options for all open source video drivers will be researched during development period, and will be enabled as required during xorg.conf creation (this is explained in detail on the "Implementation/Code" section below)
  • Specifically for the 'ati', 'trident' and 'via', the necessary extra configuration options are already known during Spec Drafting time, and will be correctly output during xorg.conf creation MattZimmerman: what are they? MatthewGarrett - why aren't we just fixing the drivers to actually work? If they "need" extra configuration, it's likely that adding it will also be breaking some other setup

General Scope and Design issues

  • A decision has been made during Edgy development, on which Ubuntu decided to ship X.Org enabled by default (as is the case with X.Org 7.1 onwards) MattZimmerman: I think you meant AIGLX instead of X.org here

  • XGL is considered unsupported for all versions of Ubuntu (including feisty), but a XGL X.Org server is available on the 'universe' repository. Please note that, again, this server is completely unsupported, and needs to be manually enabled to be useful
  • A blacklist will be created during the feisty development cycle, for boards that are recognized as "3D capable", but are either too slow, or do not support acceleration correctly. The postinst part of the 'xorg' package, responsible for xorg.conf generation shall take this list into consideration, and accordingly, disable acceleration for these boards MattZimmerman: in composite-by-default it was decided to use a whitelist instead

  • 3D and Composite support is available on all architectures supported by X.Org on Ubuntu (including powerpc). Please note, though, that the implementation speed is completely dependant on the raw processing power of the video board used MattZimmerman: this bullet point doesn't seem to add useful information to the spec; it is assumed that this works on our desktop architectures

  • MatthewGarrett - Proprietary drivers are currently significantly worse at surviving a suspend/resume cycle. How are regressions going to be avoided?

Implementation

Packaging

  • X.Org will be updated to version 7.2 on feisty, with addition of the 'autoconfig-for-7.2' branch. This branch makes X.Org capable of detecting the most common options for drivers and input devices, and simplifies configuration immensely. It is worth of note that this branch is already present on the X.Org packages of Fedora Core 6
  • Proprietary and open source video drivers will be updated to the latest available versions, at the time of Upstream Version Freeze MattZimmerman: this should be Feature Freeze

    • ["Warbo"]: This is done anyway, isn't it?

  • Mesa and libdrm will be updated to version 6.5.1 + 3D patches, or newer available, by the time of Upstream Version Freeze MattZimmerman: why do we need to do anything other than shipping the latest upstream?

Code

  • the 'configure' and 'postconf' sections of the package 'xorg' will be greatly improved, using the following rationale:
    • due to the landing of the 'autoconfig-for-7.2' X.Org branch
    • to allow the automatic configuration of Composite and 3D support on all supported boards
    • to take in consideration the above mentioned 'blacklist'

MattZimmerman: what is "postconf"? 3D acceleration is automatically enabled where supported, so there is nothing to be done there. What is involved in enabling Composite? See above regarding whitelist instead of blacklist.

  • ["Warbo"]: Adding an Extensions section to xorg.conf and putting Composite in there will enable it, and this is apparently default in Edgy. Those who want to use it just have to use an appropriate compositing manager/window manager. However, there may be unexpected side-effects like [https://launchpad.net/distros/ubuntu/+source/xteddy/+bug/57783 this], and I know users of the proprietary Nvidia driver for a time had to choose between composite or 3D acceleration, since using both would crash X until the driver was fixed (I don't know if this is still an issue in the legacy driver or not)

Data preservation and migration

Users upgrading from previous versions of Ubuntu shall have their xorg.conf unmodified, and thus, potentially won't be able to use X.Org acceleration "by default". On the other hand, Feisty will provide users upgrading their installation an option to have their config files regenerated, so they can take use of the new shiny accelerated stuff.

Please note that this "regeneration" of the config file is only offered if xorg.conf was not manually modified, and in this case, should *not* be considered more harmful than a simple install (on which xorg.conf has to be newly created).

MattZimmerman: how and when would this be offered? what would happen if the user opted for this choice? see bullet-proof-x for possible overlap in regenerating a default autodetected configuration.

Unresolved issues

Please note that the unresolved issues are not a blocker for the the Approval or implementation of this Specification, and are here for completeness reasons.

  • Support for texture-from-pixmap (ATI proprietary driver)
  • Monitor and input hotplug for X.Org 7.3

Comments

I am concerned whether this spec is worth installing binary drivers. I think we will lose our arguments for free graphic drivers by doing so and also shoot other supporters like Fedora or Suse in the back. A small popup informing the user about non-free drivers means nothing when we give our best to make free drivers obsolete on the other hand. -- Pavel Rojtberg

  • Amen to that. -- Hidde Brugmans
  • I think it should be easy to install binary drivers (clicking a button), but not done by default. IMO this is a bad move, kernel hackers will complain and many others, ubuntu should advocate free software but let the end user decide what to do about it's freedom. This should be reconsidered. -- kmon
  • I too share Pavel's concerns. PLEASE reconsider the choice to install non-free display drivers by default. They are infamous for their instability, and more importantly, installing non-free software that is not absolutely essential for getting a piece of hardware to work is a dangerous road to walk down -- some might ask why flash and google earth can't then just be installed by default as well. This would also be a major loss for the effort of lobbying ATI/AMD and NVidia to free their drivers. And technical concerns aside, frankly, it just feels morally and ethically like a bad and wrong thing to do. --JonasJørgensen

Legal issues with proprietary modules should also be considered with this. Kororaa, for example, after distributing and enabling proprietary drivers by default, switched back to only providing them optionally due to the unclear legal situation of combining a GPL'd kernel with proprietary modules. Personally, I doubt that enabling these modules by default will have a positive effect on Ubuntu and open source in general in the long term. Even being a mainline distribution, Ubuntu still has not only a commitment, but also a responsibility towards free software. I'd prefer Ubuntu enabling all this eye-candy stuff by default just on free drivers while still educating users, which gives the users an incentive to consider this issue for buying decisions, and keeps (and even strengthens) the incentive for graphics card vendors to provide open sourced drivers. Other distros also manage to enable 3d effects without enabling proprietary drivers by default, why shouldn't Ubuntu be able to do so? -- JakobPetsovits

Binary drivers out-of-the-box usage only "fixes" problems in the mid-term, in long-term it would make it even worst:

  • No "motivation speech" for companies opening up their drivers, see [http://www.advogato.org/person/Burgundavia/diary.html?start=111 example]

  • Binary drivers cant ever be fully supported, if the manufacturer decides to stop updating it to be compatible with the newer version of the kernel/xorg/etc.... (yes they can sign an agreement in which compromise to support security updates of an given version, but software in the Gnu/Linux world is always evolving) and the user goes back to the non compatible hardware status in the following releases of Ubuntu, and even with the binary driver education most users will just ignore the warnings until is too late and they are stuck with hardware they thought would be compatible because worked out-of-the-box or they goggled and appeared as "supported". -- jc87

["Warbo"]: I think this spec is extremely vague. It seems to jump between "use proprietary drivers by default", "add the Composite extension to xorg.conf by default" and "use a compositing window manager by default". The use cases are not really coherent. Does "accelerated X" mean "X with a driver with direct rendering" or "an X server with support for 3D window managers, ie. AIGLX and XGL"?

It was claimed above that the ati open source driver always works, e.g. with Radion 9000 & compiz without problems. However, on my Dell D600 laptop from year 2004 it just simply doesn't work, at least nobody of the gurus who tried was able to get it working in the Mountain View on the Summit. Also my 23" Apple Cinema HD Display connected to the Dell D600 laptop (via DVI) displays blank screen with the "ati"-driver. With the fglrx driver it works in the 1920x1200 -mode, but only on that mode and everything else but that is blank. -- KaroliinaSalminen2

  • ["Warbo"]: Recent fglrx drivers do not work AT ALL on my Radeon 9250 card, so I have to use the Open Source driver anyway. I have found that an Nvidia card with half the RAM (graphics cards are hard to compare directly) runs perfectly with Compiz and generally with other 3D things. However, the ATI card admittedly performs well for 3D only (ie. no transparency/alpha) tasks.
  • Maybe gurus weren't guru enough Smile :) And yes, as Warbo said, it's noticeable that the fglrx will not work on your machine in Ubuntu 7.04 anymore, because ATI has ceased support for pre-9500 Radeons and the older drivers don't work with newer kernels. --TimoJyrinki

Timbobsteve: I think the default installation of binary-drivers is a terrible idea. I understand that people might want an accelerated desktop and it should be supported by Ubuntu (and even possible after rebooting from installation) but I don't think that users who don't use binary-blob drivers should be brushed aside just to make this happen. I don't know much about ubuquity or the installation process, but perhaps another option page could be added to the installer asking the user if they wish to have binary drivers on their system. If they answer yes then the binary packages can be installed, if they say no then they are not installed. That way both parties win.

  • Problems with this idea:
    • Is Xorg.conf generated automatically? If so, can it detect if binary drivers are present and decide to use them?
    • Can the installer detect whether or not to enable Xglx and compiz/beryl depending on the choices made by the user during installation.
    • Can Xglx/compiz/beryl run on open-source drivers? If so, can their be an option after startup to try it.
      • On first boot Xglx could try to start, if it fails then it could default to normal Xorg setup, if it passes then it could start and display a message, like "Do you want to keep this configuration? [Yes/No]"... if they click yes then the system could use Xglx by default. If they select no, or unhappy with the way Xglx runs on their system then the installer could default back to normal Xorg.

No matter what happens no user should be forced into using binary drivers. It should be, like all other aspects of GNU/Linux and OpenSource Software, a choice made by the user. The second the choices are made for us, is the second we become more like our commercial partners/enemies/competitors.

JustinChudgar: I and several of my clients have secondary (from the spare parts box) video cards in their PCs to support dual monitors. This means that there is a high chance of multiple video devices and drivers on one system. I.e. Intel onboard video + Matrox PCI, ATI onboard + NVidia AGP, etc. While the ideal solution would be to get a new board with dual display output, this is not always financially justifiable immediately. What happens when one VGA device is on the whitelist and one is not? Are xinerama, twinview, etc., going to be part of the conf/postconf process?


CategorySpec