Display Server vs. Window Manager vs. Graphics Driver?

7,032

Solution 1

The term "graphics driver" is used to refer to several different things. One of them is a kernel driver. The kernel driver mostly just sets the video mode and facilitates passing data to/from the card. It also usually downloads the firmware into the GPU on the card. The firmware is a program that the GPU itself runs, but unfortunately, graphics vendors only provide it as a binary blob so you can't look at its source code.

Above that you usually have Xorg running, which has its own driver that translates generic X11 or OpenGL drawing calls into commands the card understands, and sends them down to the card to execute. It also may do some of the work itself depending on what commands the gpu does and does not support. In the case of the OpenGL calls, the Direct Rendering Infrastructure allows this part of the driver to actually execute directly in the client application rather than the X server, in order to get acceptable performance. It also allows the driver in the client application to send its commands directly to the gpu, thanks to coordination with and help from Xorg and the kernel driver at startup.

Wayland and Mir are supposed to replace Xorg as a simplified type of display server.

Unity is both a shell ( provides desktop/launcher ) and compositing window manager in one.

GNOME and KDE are desktop environments. They are large projects consisting of many components. The core of them are their respective application toolkits, which are GTK for GNOME and Qt for KDE. This is a library framework that an application is written with and provides the foundation on which everything else is built. Some of the basic services they provide are event and object handling, Windows, basic drawing functions, I/O, and much more.

Solution 2

  • Graphics drivers are implemented as kernel modules that have to be loaded into it. So, basically, they're outside the kernel. Whether or not a kernel can be built to contain them is a matter left from someone more knowledgeable than me to answer. I think they were excluded from the kernel because if a kernel is built with, say, the nouveau driver it would have conflicts loading a proprietary NVIDIA driver later on.
  • X Windows, Wayland and Mir are display servers.
  • Gnome, Ubuntu Unity and KDE are all desktop environments not window managers. A window manager is part of a desktop environment (e.g. Gnome uses metacity). That said, you can run standalone window managers (with no desktop environment) like awesome, xmonad or openbox

As to which component plays which part:

  • The graphics driver is how the kernel "talks to" the graphics card.
  • The display server is what creates and manages windows and other graphical elements of your display.
  • A desktop environment or window manager acts as a client to the display server and instructs it on how it should draw/decorate windows, panels,...
Share:
7,032

Related videos on Youtube

ams
Author by

ams

I love software development.

Updated on September 18, 2022

Comments

  • ams
    ams almost 2 years

    I am trying to sort my understanding of the different part of graphics on Linux, and I am confused as to the roles played by each of the following concepts.

    • Display Server
    • Window Manager
    • Graphics Driver

    My questions:

    • Are graphics drivers implemented inside the Linux Kernel or outside? If outside the kernel why are they excluded when network, disk, file system are all inside the kernel?
    • X Windows, Gnome, Ubuntu Unity, KDE, Mir, Wayland who does what in terms of Display Server, Window Manager, and Graphics Driver?

    My goal for this question is to understand which projects are contributing what parts of the Linux Graphics experience?

    UPDATE http://blog.mecheye.net/2012/06/the-linux-graphics-stack/ has a lot of the details that I was looking for.

  • psusi
    psusi almost 11 years
    Kernel modules are definitely considered to be "inside" the kernel.
  • Jeff Hewitt
    Jeff Hewitt almost 11 years
    @psusi I chose to read the OP's "inside" and "outside" as meaning built into the kernel vs. loaded into it from "the outside". You probably mean "inside" the kernel in the sense that they're not part of userspace, right?
  • psusi
    psusi almost 11 years
    Yes, that's how I interpret "inside" vs "outside".