This is trying to be a rough overview of how a lot of display stuff works on Linux, was pulled from another page on this site and still needs some work.

Terminology

This is a bit messy, so I'll do as well as I can to explain everything here. Please let me know if anything is incorrect, since there's a lot of weird stuff going on here.

Here's how desktops have worked in Linux for a while:

  • You boot up the computer, and you're placed at a display manager. This is the login screen. It logs you in with PAM and then starts up the X server with your window manager.
  • The X server (X.org is the only current full implementation) forms a low-level communications layer with a kernel. Everything else you will run that deals with graphics sends commands to the X server. Once it's started, it runs the program it was given (usually a window manager).
  • The window manager is what you see as your desktop. It manages, well, the windows. Most window managers also have a compositor, though you can change them out.
  • The (technically optional) compositor takes all the windows and combines them together on an off-screen buffer that contains the entire screen's contents. The compositor can also create cool animated effects on the windows. In addition, this also essentially becomes a double buffer, meaning that the contents of the screen are entirely decided before they are drawn. This minimizes problems such as screen tearing, which may manifest themselves if no compositor is present (for instance, i3 does not use a compositor by default). Popular standalone compositors include Compiz and Compton.

In addition, there are several desktop environments, which basically bundle together a window manager, the compositor, and a bunch of other stuff together to give you something nice to work with. GNOME and KDE are desktop environments; their window managers and compositors are the GNOME shell and Mutter, and the Plasma shell and kwin,

However, now Wayland has come in to replace the X server standard. Now, Wayland is interesting because it's not an actual server. It's just a protocol that the window manager can use for communication. In addition, it discards much of X's legacy cruft and allows applications to directly draw to the display. Now, things work a bit like this:

  • The display manager is the same, except it directly starts the window manager instead of starting the X server.
  • The X server has been replaced with the window manager. Each window manager has its own Wayland compositor, which, in addition to the normal compositor tasks, also implements the Wayland protocol in order to allow desktop applications to communicate with the window manager.
  • A process called XWayland will be started in order to allow traditional X applications to run in Wayland environments.

Some points of interest:

  • Notice there's a lot less overhead unless you're running X applications (since those have to go through XWayland).
  • There is no single server implementation like with X and the X.org server. Again, each window manager has its own compositor that's responsible for pretty much everything.
  • Traditional compositors (like Compiz) are now impossible; the window-manager-specific Wayland compositor is responsible for managing everything now.
  • Whereas the compositor was optional for X, Wayland requires it, which also means it's impossible to avoid double buffering. (It's debatable whether or not this is an issue; on one hand, double buffering avoids screen tearing, but on the other hand, it increases latency a bit.)
  • Related to the above, Wayland implements stricter vsync to avoid X's other screen tearing issues.

Tiling vs stacking

Tiling window managers are...well, tiling. You arrange the open windows into tiles, which means no toying with handlebars to make them bigger or smaller or trying to fit as much as possible at once. It's all automatic; you just position and resize the tiles. They also usually support placing windows in tabs.

Stacking window managers are the traditional, Windows/Mac-esque window managers. You move around windows and resize them however you want.

It's worth noting that both GNOME and KDE have extensions and methods that you can use to support tiling.