Xegl

from Wikipedia, the free encyclopedia
Xegl is a display server protocol which communicates with its clients via the X11 protocol. A window manager is also required.

Xegl is an X - display server log for the Linux operating system, with the cleanup and modernization of the current Linux graphics driver architecture to be achieved. The basis is the operating and windowing-system-independent programming interface specification EGL . Xegl is the Linux-specific implementation of this interface.

Instead of using a hardware driver integrated into the X server - like the previous X11 architecture under Linux - Xegl relies on a combination of a driver for the Linux framebuffer device (fbdev) , a variant of the Mesa 3D OpenGL that is independent of the X Window System -Library with hardware acceleration via the Direct Rendering Infrastructure Kernel Interface, and the additional 2D graphics library Cairo .

The development of Xegl was stopped several years ago and the desired functionality was largely implemented in other ways.

motivation

initial situation

Up to now there were two parallel graphics driver architectures under Linux as standard: fbdev and XFree . In addition, there is the DRI interface for hardware-accelerated graphics operations, which up to now could only be used in conjunction with the X11 drivers.

X11 / XFree

X11 (or X for short ) is originally a collection of specifications for a "windowing system" with the motivation to define a hardware and system-independent platform made up of protocols and interfaces for graphical user interfaces. The definition of this platform does not originally include the specification of graphics hardware drivers, which should be correctly located in a corresponding layer model below the definition of the protocols for the graphic user interface. Many X11 implementations for other Unix -like operating systems than Linux are built according to such a layer model, e.g. For example, under Sun Solaris there is a framebuffer device that represents the hardware driver and an X server that offers the services of the X11 protocol as an application above this driver .

The XFree86 project , which developed the original X11 implementation for Linux, decided at the time to link the windowing system directly with the development of hardware drivers. At a time when there were hardly any powerful graphics drivers for Linux, this was an approach to promote support for graphics cards together with the development of the windowing system. Another goal was the joint development of the windowing system for Linux and other UNIX-like operating systems on PC hardware, e.g. B. FreeBSD . For this purpose, a driver architecture was developed that was hardware-dependent (this is given by definition for hardware drivers), but was independent of the operating system. Under these conditions, XFree introduced its own driver model, which is state of the art in Linux to this day.

Although there is also an "X_fbdev driver" for Linux, which sets up the X Window System on Linux's own graphics card driver (see below), this does not offer hardware acceleration and most of the capabilities that make up a modern user interface, such as z. B. Fonts with anti-aliasing, 3D games, moving windows with displayed content etc. are not possible with this variant. As a rule, the X-fbdev server is only used in combination with the generic VESA fbdev driver (which works on almost every x86-based computer with graphics hardware) and only in the following situations:

  • As a workaround, if there is no X driver for a specific graphics card, but an fbdev driver.
  • In the installation phase of a Linux operating system before the graphics hardware is recognized and the corresponding X drivers are installed.

Framebuffer Device (fbdev)

The " fbdev driver" from Linux is an operating system-dependent kernel mode driver for graphics cards on which any application can be run. Graphics card manufacturers have so far provided little support for the development of fbdev drivers, with the argument that the XFree model is already supported and fbdev is therefore not required. So fbdev leads a shadowy existence in a certain way, it was missing for a long time and except for the graphics cards of a single manufacturer to this day important functions such as hardware acceleration and a uniform user mode graphics library (e.g. OpenGL), which make this driver a full-fledged graphics interface would. In addition, as a kernel mode driver, fbdev cannot be expanded at will, since the stability and performance of the operating system itself has absolute priority for kernel mode drivers. The most common fbdev driver currently in use is the generic VESA driver. It supports the VESA hardware specification, which is offered by most of the graphics chips currently on the market as the "lowest common denominator". However, there is a lack of options for changing the screen resolution during operation, for programming video frequencies and much more, as well as 2D or 3D acceleration functions.

DRI

In the course of the development of 3D hardware support under X, the Direct Rendering Infrastructure (DRI) was developed, which enables further access to the hardware parallel to the Xfree driver. The graphics card manufacturer ATI, which supplies its own drivers for its products under Linux, supports this interface in its proprietary drivers. However, Nvidia , another major graphics card manufacturer, has developed its own proprietary kernel interface for 3D acceleration.

Problems with the current XFree architecture

  • A basic principle of operating system architectures is that only a single driver can access the same hardware at the same time. Under Linux, however, two drivers are usually loaded, namely fbdev in the boot phase and for the text console, and X for the graphical user interface. This means that switching between the two drivers must be taken into account when developing the driver, i.e. H. Routines for saving and restoring the hardware state must be programmed in, which restore the graphical user interface after switching to the text console exactly as it was before the other driver accessed the hardware. These routines in particular are difficult to program and maintain and are therefore one of the most common reasons for annoyance with graphics drivers under Linux.
  • Due to the spread of the XFree standard, hardware manufacturers only offer their own drivers for their hardware for the Xfree standard. For this reason, other windowing systems, some of which have more modern concepts, have so far not been successful under Linux - they are difficult to install and functionally very limited.
  • For some applications (e.g. Linux on pure game consoles) basically no windowing system is required, but accelerated graphics are required. Currently, such applications typically need to be developed as pseudo-X applications; H. The entire X11 system has to be installed and configured, and then only a single window without a frame is opened (or it is switched to full screen mode via an X server extension) in which the actual application then runs. The availability of hardware drivers that are independent of the windowing system would save this effort.
  • Accelerated graphics e.g. B. with OpenGL was not provided for in the original X11 specification. This is why a forest of X extensions has developed over time, all of which must be supported and configured separately by the driver. The current GLX extension that enables OpenGL within X applies e.g. B. via DRI (or corresponding proprietary driver) past the X server to the hardware. This makes the architecture more complex than necessary and many functionalities are implemented redundantly. In addition, the X-Server itself cannot use the possibilities that resulted from the hardware-accelerated graphics and OpenGL in its own implementation.

The Xegl

With Xegl, the X window system is set up on a completely independent hardware driver and the X server is also equipped with all the possibilities of modern hardware. Under Xegl z. For example, simple window operations can also be carried out directly with OpenGL support. The separation between user interface functions and hardware-accelerated graphics is no longer necessary.

The implementation of Xegl is based on the framebuffer device fbdev in cooperation with DRI , OpenGL and another 2D graphics library ( Cairo ). A special version of the Mesa 3D library is used as the OpenGL implementation , which can also be run without X11 but still supports hardware acceleration via DRI.

The basic modules, i.e. H. fbdev, DRI, OpenGL and Cairo can also be used without X11 . If drivers were developed for this architecture by open source projects or by hardware providers (which they have also announced), they could also be used for other applications outside of X. In addition, there is no problem of switching between different drivers, because the state of the hardware (e.g. screen resolution, video frequencies) is managed solely by the fbdev driver. That simplifies some things considerably, the most noticeable is that starting X is a little faster and no visible switching artifacts (flickering, dark phases, etc.) occur. The entire configuration of the graphics hardware, which is currently taking place in Xorg.conf, is also obsolete. Screen resolutions u. Ä. are then defined via the configuration of fbdev .

Another advantage is the decoupling of the driver from X11 requirements, also during further development, i.e. H. In the future, driver developers can actually focus on actual hardware driver development , and X.org can drive the development of visual effects, network protocols, font management, and so on.

Less emphasis is now placed on the operating system independence of the actual driver, which was originally viewed as an important goal by the XFree86 developers. However, this goal has taken a back seat due to the increased importance of the Linux operating system on the market. In addition, targeted licensing (e.g. MIT) could also enable non-GPL-based open source projects to port this complete driver infrastructure to their system, but with proprietary drivers these are just as good as Linux Will depend on the graphics card manufacturer.

See also

  • Wayland , likely successor to the X11 protocol
  • Mesa 3D , open source OpenGL implementation
  • X Window System
  • XFree86 , the original developer of the previous Linux X11 architecture
  • X.Org Foundation , umbrella organization for the specification of the X protocol, for some time also umbrella organization for the further development of a spin-off of the XFree86 server.
  • Framebuffer , explanations of the meaning and functionality of a framebuffer.
  • Direct rendering infrastructure
  • Xgl : X server implemented with the help of OpenGL, which, unlike Xegl, is based on another, conventional X server (Xgl server runs as an application on another X server).

Web links