COVER STORY X11R7

X.Org 6.9 / 7.0 – Next Generation X11 ment since 2004, recently announced the simultaneous release of X11 versions 6.9 and 7.0. Both versions offer similar fea- tures. The main difference is that X11R7 comes with an all-new modular design. This modular architecture will make NEXT X it easier for software developers and hardware vendors to adapt specific X11 components with minimal effect on the rest of the infrastructure. According to the X.org Foundation, “Xorg 7.0 represents a major change in the development process for X. Developers can work on individual compo- nents with less in- terference from un- related changes, and users can acquire new features and bug fixes asynchronously from the main release stream. This makes it easier than ever for develop- ers and users to partici- pate in the growth and success of the .” In this article we’ll describe some new features of X11R7, and help you take your own test drive of the latest X11 release.

The first major X release for over 10 years, X11R7, has finally adopted a What’s Inside The box titled “New Features” gives an modular approach. X11R6.9, which uses the same codebase, is the last overview of the enhancements you’ll find in X11R7. The collection is com- monolithic release for existing systems. BY RENÉ REBE prised of over 200 individual packages. The packages can be built using the ven as AIGLX and are making sion of the X protocol, which has been standard autoconf tools, although the their appearance in the Linux around since 1987. order is significant. The individual pack- Eworld, the venerable X Window The X.org Foundation [1], a non-profit ages include protocols (headers), librar- system is getting a new start with a new organization that has led X11 develop- ies, the X server, and drivers for individ- release that promises to be the biggest change in over 10 years. X Window pro- New Features vides the basic framework for graphics • Enhanced 2D drivers: Savage, Open- • XRender: Software fallback is not in Linux. Desktop environments like BSD, and NetBSD Framebuffer sup- quite as slow as previously. KDE and Gnome operate through X, or port (new), Radeon (TV in and DMA • 12 bit PseudoColor and 30 bit more specifically, X11, the reigning ver- operations), NV (NVidia), Via, i810 TrueColor: more dynamic pixel (support for i915GM/ E7721/ i945G), formats, such as with Matrox Parhelia sunffb, sisusb (new), r128, Mach64, sis René Rebe, who studies computer binary drivers for medical applica- (XGI Chips). science at the TFH in Berlin, Ger- tions. • EXA acceleration for i128, radeon, and many, did not discover Linux until • Multiseat: Support for multiple, inde- sis. pendent keyboards and mice for mul- 1997. He contributes to various • Enhanced 3D drivers: Radeon R300/ tiple users on a workstation. open source projects, such as T2 R400 (Radeon 9500 and later, new). • Modular build system using GNU au- and Sane. You can contact René at • Enhanced XvMC support (video tomake and autoconf (Version 7.0 or THEAUTHOR . decompression). later).

32 ISSUE 68 JULY 2006 WWW.LINUX - MAGAZINE.COM X11R7 COVER STORY

ual graphics adapters. The new design chitecture) fo- means that the numerous utilities and cused on acceler- sample programs that X has gathered ating legacy X op- over the years, such as , xclock, erations such as , xdm, xedit, or the xmh mail client, drawing lines, are now available separately. rectangles, circles The new structure gives distributions of various sizes, more control over the way Xorg pack- and with various ages are made available, while at the patterns and fills. same time giving users the ability to up- It was not de- date individual drivers from the source signed to handle code. On the downside, more calls to today’s ARGB vi- configure affect the build time. suals, and there The 6.9 release still uses the imake- was no practical based build system and is designed for or efficient way of updating existing installations. integrating these Figure 1: Transparent windows are now far quicker thanks to EXA. features. Transparency This is what prompted HP’s Keith vided a HOWTO on porting an XAA Since the drivers with the previous ver- Packard to design a test X server, known driver to EXA in seven simple steps [2]. sion did not support graphics accelera- as Kdrive, with an architecture that does EXA focuses on the topics that are im- tion for the new ARGB Visuals, a slow not support classical drawing operations portant to today’s desktops: system was what most users experienced but focuses on the functions required by • Optimized memory management for when enabling genuine transparency. today’s desktops. Packard concentrated off-screen pixmaps The only drivers really capable of accel- on accelerating XRender and RGBA visu- • Copying of data between main and erating Xrender operations were the als, and on keeping the server as simple video memory commercial Nvidia drivers. The reason as possible. Zack Rusin from Trolltech • XRender acceleration for transparent for this was the legacy XAA driver archi- integrated this architecture, now dubbed images, text anti-aliasing, and com- tecture. XAA (XFree86 Accelerated Ar- EXA, with the current release and pro- positing

ADVERTISEMENT COVER STORY X11R7

EXA ignores the numerous elements of legacy applications, such as lines and circles, all of which are accelerated by XAA. Most programs make no use of these types of grapic elements in desktops, and the benefits of acceleration are thus minimal. Even with a driver that imple- ments only basic EXA functionality, it should be no trouble to achieve good us- ability values with transparent windows on recent hardware. Driver Support The current Xorg release supports EXA functions for the r128, radeon, and sis drivers. You can enable this support in the "Device" section of your /etc/X11/ xorg.conf file:

Option "AccelMethod" "EXA"

Check the “Enabling and Figure 2: KDE introduced a composite manager in version 3.4. EXA” box. Patches for the i810, mach64, nv, savage, tdfx, and via drivers are Multiseat support is also new with the Linux drivers for these cards in the near available from [3]. arrival of X11R7. Multiseat support pro- future. The sis driver in X11R7 is the first to vides the dedicated allocation of key- support XGI chips. Thanks to time-con- boards and mice to individual video out- Theory and Practice suming hardware and vendor driver puts, which means that multiple users As of this writing, not all graphics adapt- analysis, the R300/ R400 generation of can now work on a single workstation. ers support transparency at high speeds Radeon chips (up to Radeon 9800) now However, this multiseat feature is still – but more and more programs can use support hardware acceleration with free experimental. ARGB visuals. For example, the latest drivers. Xorg still does not support the latest version of the rxvt-unicode terminal em- XvMC, which handles hardware-based X1000 generation of Ati cards. As the ulators uses transparency for color defi- acceleration for video decoding, has commercial Ati driver does not support nitions to give users the ability to enable been reworked in this latest X11 version, these cards either, users are forced to re- transparency for some display areas – and the XRender software implementa- sort to the Vesa driver as a workaround. typically the background. The MacOSD tion shows some performance improve- However, Ati has announced that they tool, which handles OSD displays on ments. will be offering hardware-accelerated PPC machines, now uses transparent windows, rather than colored screen- Enabling Composite and EXA shots (Figure 1). And KDE 3.4 integrates By default, neither the composite exten- Driver "ati" a composite manager with the win- sion, nor EXA acceleration, are enabled, Option "AccelMethod" "EXA" dow manager (Figure 2). as both are quite new. To use these EndSection features, you need to make two minor For Developers If you do not have an EXA-capable driver changes to your /etc/X11/xorg.conf con- Another major change is evidenced by at present, but do have a fast machine, figuration file. The following is required you can use an intermediate layer that the fact that X.org now does without a at any position within the file for the stores screen contents, and thus allows composite extension: for fast CPU access, for improved re- INFO Section "Extensions" sults: [1] X.Org homepage: http:// www. x. org/ Option "Composite" "Enable" Option "ShadowFB" "true" [2] EXA in seven steps: http:// lists. EndSection And if your driver does not support freedesktop. org/ archives/ xorg/ To enable EXA acceleration, assuming ShadowFB directly either, you may need 2005-June/ 008356. html your drivers supports this feature, mod- to disable acceleration completely to use [3] EXA status: http:// wiki. x. org/ wiki/ ify the driver section, as shown in this software rendering: ExaStatus example for a Radeon card: Option "NoAccel" "true" [4] Xgl: http:// en. opensuse. org/ Xgl Section "Device" After modifying the configuration file, [5] AIGLX: http:// fedoraproject. org/ wiki/ Identifier "Card1" don’t forget to relaunch the server. RenderingProject/

34 ISSUE 68 JULY 2006 WWW.LINUX - MAGAZINE.COM ADVERTISEMENT

Figure 3: Xgl and AIGLX leverage OpenGL to support arbitrary window transformations. binary format for the hard- Xgl and AIGLX both use an ware drivers. X11R7 now uses inertia effect when moving standard ELF Shared Objects windows, allowing windows (.so files). The major benefit to wobble, as shown in Fig- is easier porting to new archi- ure 3. Arbitrary scaling of tectures and easier bug hunt- windows is also supported. ing. Developers previously For more information, see the had to patch the GNU Debug- articles on Xgl and AIGLX in ger to teach GDB the special this issue. proprietary X format before starting serious work on X Conclusions driver development. The seventh major X11 re- lease has enhanced hardware OpenGL Fever support. 3D support for the Development has also con- Ati R300 and R400 series fi- tinued on Xgl [4], Novell’s nally provides an open source OpenGL-based X server im- driver for a widespread gen- plementation. The aim is to eration of chips. do without 2D acceleration The new EXA architecture, for modern graphics cards and the composite and dam- and to use the 3D engine for age extensions introduced all graphics rendering tasks. with the latest version, help This will not only facilitate X11R7 hold its own against development, it will also commercial systems. In fact, force vendors to publish X11R7 has a slight lead over stable, high-performance Windows. Now it’s time for OpenGL drivers for free the vendors to start supplying operating systems. high-performance drivers, or Red Hat is also pursuing better still, to disclose their an interest in X’s new 3D card specifications to allow features through their work open source developers to with AIGLX (Accelerated Indi- work efficiently and speed rect GL X) [5]. AIGLX sup- up the bug fixing process. ports OpenGL for composit- X11R7 is also good news ing. Enhancements for Xgl or for newcomers to the world AIGLX to X.org or the free of X development. The excel- Mesa3D OpenGL library often lent EXA HOWTO and the benefit both projects and have individual driver packages, helped development progress make it easier than ever to by leaps and bounds. get started. ■