KC7MM Wiki

Amateur Radio with KC7MM

User Tools

Site Tools


linuxusernet:inside_linux:graphics_sub_layer

A Look Inside Linux series

A series of short topics on how Linux works and how to make it work the way you want it to, which I present during the weekly sessions of the Linux User Net. The target audience is Hams who are new to Linux and want to know more about it, as well as experienced Linux users who can learn more about their chosen operating system. These are my notes for the presentations. (Russ, KC7MM)

10. Linux System Layer 3: Graphics subsystem

Introduction

As we saw last week when we talked about the the Linux application layer, a Linux system doesn't require any video graphics capability. System services, application servers, and even user interfaces work fine without graphics.

However, there are many applications that require graphical rendering on a screen. And users these days expect to work in a graphical user interface.

In Linux, the answer to that demand is to add hardware and software that combine to make graphics capabilities available to applications. The basic components are:

  • Hardware in the form of a graphics processor (GPU) and dedicated memory.
  • Kernel-level device drivers for the hardware.
  • A system service that provides an application programming interface (API) that programs can use to work with the hardware.

Note that this is a fine example of the modular nature of Linux. Many applications don't use graphics, so they can be run without the complications inherent in graphics cards and their drivers. Plus, system resources are not wasted on unused capabilities. On the other hand, for apps that need graphics, a graphical subsystem can be bolted on without affecting existing, non-graphical, operations.

Two graphical systems are in common use:

  • X Window System (or X11, or X). There have been many implementations of X. The one most used in Linux comes from X.org
  • Wayland is being developed as a simpler replacement for X. It is slowly being adopted by Linux distros.

What it does

The graphics subsystem includes the basic functions needed to work with computer graphics:

  1. Connects to graphics hardware through device drivers to:
    • Configure video properties such as screen resolution, color saturation.
    • Configure video monitors through HDMI, DisplayPort, VGA. This is part of the graphics hardware.
  2. Connects to and configures user devices: mouse, KB, trackpad, graphics tablet.
  3. Sets up the client/server model that provides graphics to:
    • The local host by running both client and server on it.
    • Remote hosts by connecting client and server over TCP/IP.
  4. Provides a programming interface in the form of graphics primitives, such as movable windows, for building user interfaces.

The overall effect of this is that it allows applications to employ graphical interfaces. These most ofter run within a GUI desktop system (covered next week), but they can provide their own UI if desired.

What you need to know

For everyday use, you need to know very little. GUI desktops include setup utilities that make it easy to configure graphics-related hardware on the host. Also, hardware support in Linux has advanced greatly over the years, to the point where having to do manual editing of X configuration files is an extremely rare occurrence. (I haven't had to resort to that in a decade or more, despite having performed a great number of Linux installations over that time.)

However, there are some things you should at least be aware of that can come in handy in certain situations.

  • X is run in a shell, as a system service. This means that:
    • It can be started and stopped by the root user, in the same way other systems can. Other services are not affected if X is shut down.
    • If an errant application locks up the graphics system, it can be restarted without having to reboot the computer.
  • It has a client/server architecture:
    • Dates from earlier Unix days, when programs ran on a central mini or mainframe computer, while users worked on remote terminals.
    • Can operate on a single host or on multiple hosts over a network.
    • There are Linux distributions explicitly designed for network terminal operations, such as Debian Edu. These are most often intended for educational uses.

Summing up

  • Linux runs very well without graphics capabilities.
  • Graphics hardware and software can be added on to a host system without affecting existing applications.
  • The X Window system provides the necessary basic facilities for applications to employ graphics hardware and input/output devices.

Next time, we'll take a look at how the GUIs we know and love are built on top of the graphics subsystem.

Return to series index

linuxusernet/inside_linux/graphics_sub_layer.txt · Last modified: 2022/03/16 03:34 by KC7MM