Linux Graphics News
At the start of this quarter we looked at how 2013's graphics developments were more incremental than revolutionary, perhaps with the need for LTS stability in mind. Things are looking quite different this year, with several major changes quietly under way.
Last time, we identified XWayland's upstream status as a potential barometer of Wayland's desktop future. We'll look at what has recently landed and what's still to come.
The mesa project has made astounding progress in recent years, and this quarter saw the 10.0 milestone achieved. This release implements the OpenGL 3.3 API for Intel (support on other graphics chipsets will follow). This brings new texture, vertex, and shader APIs and several dozen bug fixes. A 10.1 release this past month added half a dozen more GL APIs and expands OpenGL 3.3 support to several late-model NVIDIA and Radeon cards. In addition the mesa project made bugfix releases on both the 9.2.x and 10.0.x series.
Meanwhile, the X11 project finally pushed out 1.15.0 after delaying it to include more new features. This release brings Direct Rendering Infrastructure 3 (DRI3) and the Present Extension, which we've discussed in earlier reports. A GLX rewrite is also included, which cleans out a major amount of redundant and unnecessary code. The project is also working on a bugfix release for the 1.14 tree which supplies a dozen XQuartz fixes, and has begun publishing pre-releases for the 1.16 series (see below).
The -ati driver's 7.3.0 release is of note due to how long it's been since the last release. Notable changes include enabling GLAMOR acceleration by default and supporting GLAMOR X-Video. Also is the usual improvements for supporting newer graphics cards, including tiling performance optimization for Southern Islands cards, preliminary support for Hawaii class cards, and PCI IDs for Berlin hardware.
Since the 1.15 release, xorg-server 1.16's development has focused on GLAMOR improvements by Intel (including porting a lot of their optimization techniques), a vast amount of warnings cleanup by Keith Packard (Intel), and the usual array of bug fixes and code cleanup. Other work not yet merged includes XWayland and XMir support code, which let Wayland and Mir run Xorg sessions; since many applications won't have been ported from X to Wayland or Mir, these X sessions offer a compatibility layer to allow gradual migration of the application infrastructure off X.
GLAMOR is a generalized open-source 2D graphics driver that renders using OpenGL to do 2D graphics operations, draws the results to textures, and then renders the textures directly. This provides a hardware-independent way to do 2D with any X.org graphics driver so long as the platform has OpenGL, gbm, and drm libraries available. Historically, each video driver DDX implemented their own hand-tuned 2D rendering acceleration, with Intel's XAA->EXA->UXA->SNA acceleration series perhaps being the most well-known. Yet as 3D composited desktops have become more the norm, finely tuned 2D acceleration is less important. At the same time, the market for ARM-based tablets, smart phones and other consumer devices has introduced new graphics chips which have good EGL support but no X drivers; for this case in particular it is helpful to use GLAMOR (or similar techniques) to hook 2D support through GL.
The XWayland code was initially developed as an Xorg module that Xorg video drivers could hook into, but with the improvements that have gone into GLAMOR XWayland is now it's own DDX driver that uses GLAMOR for acceleration. With this new architectural direction, the code is much more straight-forward and self-contained, in only 2500 lines. The patches landed in early April for inclusion in the 1.16 release. Unfortunately, this new approach of running as a DDX apparently throws a wrench into NVIDIA's Wayland plans for supporting GLX direct rendering; but as NVIDIA is doing their development privately, it may prove challenging to find a solution, so hopefully they can adapt to the changes.
Support for systemd logind was added, which enables running "rootless X" - installing the Xorg binary without suid root rights. This is a big security improvement for Linux systems. However, it only works for kms supporting video drivers, which means it won't work with NVIDIA's drivers or the vesa driver. Redhat is working on adding a suid root wrapper, which detects if the system needs root rights. If some of the system's cards don't support kms then it executes Xorg with the suid privileges; otherwise it drops suid before executing the real Xorg binary. By implementing this as a discrete wrapper, it can be installed when legacy drivers are installed, and be left out when using drivers that can run with rooless X.
The -intel driver is closing in on their big 3.0 release. The snapshots released this quarter were almost exclusively bug-fixes, however the latest snapshot, 2.99.911, also includes a two new features to support the rootless Xserver: server file descriptors, and a small back-light helper. Two features added last quarter included in this release are TearFree transformed outputs and SNA 2D acceleration by default. Several major distros already ship SNA on by default, so for most users the 3.0 release is mostly going to represent a heap of bug fixes.
Development picked up a bit in Cairo compared with the previous quarter, with a lot of attention paid to cleanup of warnings and other distcheck issues, in preparation for release. A wide array of targeted fixes to minor bugs have also gone in, including a bunch from patches posted to the bug tracker. Postscript and PDF backends in particular saw an increased level of attention for bug fixes this quarter.
Early in this release cycle a patch was added to improve downscaling image quality, however testing showed that this also incurs a non-trivial performance regression. In a healthy debate on the mailing list, some compromises have been proposed but no patches as of yet.
Aside from the downscaling performance regression, the other main concern for the release is the state of the test suite. The past year's contributions have not been kind to the test suite. At one point we were up to 1000 crashing tests (up from 200 last release) and 5300 failing tests (up from 4200). Several patches have gone in to fix about 500 crashing tests, but much work here still remains.
|cairo 1.12||git 03/17||git 03/29|
There have been a number of discussions about getting the 1.14 release out the door soon, or at least a bugfix-only 1.12.x release, so distros have a new version to include in their LTS releases. The discussions stimulated activity but didn't result in an actual release being cut; the current project lead (Chris Wilson) has been mum on release plans for a while now. Possibly others will get involved in pushing the release out, but as of yet no definite plans are in place.
The Wayland project is composed of two code trees: 'wayland', which is just the protocol definition, and 'weston', the demo compositor that implements the backend server for the protocol.
wayland 1.4 was released on Jan 24, 2014 and is the current stable release. This release promoted the Subsurfaces protocol as an official Wayland protocol for handling surfaces-within-surfaces (such as a video player inside a web browser page). Some other minor enhancements included a range of bug fixes, SHM Buffer SIGBUS protection to guard against malicious clients, and a mechanism for resetting wl_proxy queues to defaults.
weston 1.4 was also released Jan 24, 2014. A few items of particular note included in this release:
- Proper window buttons/decorations For X applications running under Wayland via XWayland.
- Animations for keyboard focus, exposé-like window picker, touch-to-move and touch-to-activate for surfaces, and touch screen drag-and-drop.
- Faster start-up with GL, by allowing the compositor to start-up with pixman instead, and then switch to the gl-renderer module at run-time after initializing EGL+GLES2 later. Also a more secure way to launch weston on KMS using logind to drm drop/set master and open the input devices.
- Fixes to monitor unplugging, so it cleans up properly and moves windows back to the visible region.
- Added xdg-shell protocol. This establishes a standard set of APIs for applications to work in Wayland-compliant desktop environments.
- The Crop and Scale protocol was also added. This enables a client application to limit only a sub-rectangle of its surface to be shown, and facilitates scaling it.
- Nested compositor buffer pass-through is a new EGL extension to allow passing buffers straight from a sub-window in an application down to the underlying compositor itself, skipping any nested compositor rendering. This would enable faster, more direct rendering of video playback inside a web browser, for instance.
Since the 1.4 release, the rate of patch acceptance into upstream master has slowed a bit, and several patch-sets are awaiting final review on the mailing list, but a total of 254 patches have been committed to Wayland's development trees this quarter. A fifth of those went to the Wayland protocol package to fix bugs (null pointer assertions, documentation clarifications, memory cleanup), and the rest to the Weston demo compositor.
Some of the major ongoing efforts (some of which are still works in progress include:
- Wayland presentation extension. This permits accurate presentation timing feedback, to ensure smooth video playback while maintaining audio/video synchronization.
- XDG Shell protocol and implementation. This protocol defines the basic operations that Wayland GUI shells should support. Part of the code for this effort has already landed but more is under discussion on the mailing list.
- Full-screen shell protocol. This is for simple single-client systems with a surface or set of surfaces, or for a client that needs a higher degree of control over the outputs.
- exposay fixes and behavioral (arrangement) optimizations.
- randr protocol. This would permit user or client access to screen resizing and rotation. There are some security considerations for allowing this level of access to clients, though.
- Weston IVI shell. This is a reference shell for a In-Vehicle Infotainment System for Tizen.
- Per-surface color management. This is a very recent proposal and has a number of open questions still.
As mentioned above, the first patch-set implementing XWayland support in the X Server landed at the beginning of April, in time for the X Server 1.16 release. This makes XWayland into it's own DDX similar to XQuartz and XWin, and supports DRI3+present and render nodes. Glamor support is on the list for inclusion if some dependency issues get sorted out in time.
Finally, Canonical's alternative to Wayland, Mir, is scheduled to land in Ubuntu 14.10 as the default compositor, with Unity 8 as its windowing system. While this is coming a year later than initially planned, it's a better strategy since they'll have three non-LTS releases to experiment and test it. Landing it in their 13.10 release would have been very risky and likely fatal for the success of their LTS; it's curious why they didn't just target 14.10 to begin with, and save themselves being criticized for bait-and-switching their development community.
- Linux Kernel Summit - Aug 18-20: Chicago, USA
- LinuxCon US - Aug 20-22: Chicago, USA
- X.org Developer's Conference: XDC2014 - Oct 8-10: Bordeaux, France
- LinuxCon EU - Oct 13-15: D�sseldorf, Germany
- Linux Plumbers - Oct 15-17: D�sseldorf, Germany
The EFL 1.9 release landed successfully and on schedule in February thanks to community efforts managed by Stefan Schmidt. This release, on a drastically shortened 3 month timeline, features initial AT-SPI support, the start of effect filters within the rendering pipeline, a long-awaited move to GStreamer 1.0, and text handling optimizations.
Community and development growth have both accelerated over Q1 as compared to Q4 of last year: EFL itself -- approaching the 1.10 release -- has seen 36% more commits to master than last quarter, and Enlightenment, now approaching DR0.19, has seen a whopping 226% more commits over the same period.
The 1.10 release is scheduled for May 19, 2014, and it seems well on schedule. This release is most notable for updates and stabilization in the Eo (E object) infrastructure, adding a DRM engine for inputs and rendering, as well as beginning full C++ support. E19 is also upcoming, though experts wonder whether it will land before the next sighting of Halley's Comet.
Between the Glamor changes to X, and the XWayland patch-set landing upstream, 2014 is primed to show us some rather profound changes to the graphics landscape in Linux. The X server is becoming more versatile across a wider array of graphics hardware - GLAMOR makes porting X to new video cards much easier since you can skip having to write hardware-specific 2D acceleration now.
The XWayland support in X Server 1.16 may prove even more revolutionary, since it finally will allow using the stock X server to run X applications under Wayland. With Canonical pushing Mir as a default in Ubuntu 14.10, we can expect to see other distributions taking a serious look at using Weston as their system compositor, running applications (or perhaps entire user sessions) under that inside XWayland clients. If they see tangible benefits to running Weston instead of X, we may well finally see the transition to Wayland get under way with spirit. Or, however, if performance regressions, glitches, and incompatibilities rear their heads, we could see a stronger re-embrace of X.org for another LTS cycle.
Bryce is a Senior Open Source Developer at Samsung Research America.
Special Reports: DevOps
- Vigilante Malware
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Vagrant Simplified
- Libreboot on an X60, Part I: the Setup
- Bluetooth Hacks
- System Status as SMS Text Messages
- Dealing with Boundary Issues
- Non-Linux FOSS: Code Your Way To Victory!
- October 2015 Issue of Linux Journal: Raspberry Pi
- New Products