Linux how to display

How does Linux’s display work?

The Linux’s display system uses multiple technology, protocols, extensions, applications, servers (daemon), drivers and concepts to achieve the windowing system for instance:
Xorg, Wayland, X11, OpenGL, RandR, XrandR, Screen Resolution, DPI, Display server, etc. That multitude can be overwhelming or confusing when we don’t have the full picture. There are multiple documentations for each side of the Linux’s display system, but globally how does it work exactly?

This QA clarify the global situation of the Linux’s display system and is not requesting for links/advice on learning materials, nor it is a copy/past of existing wikis (still based on existing linked documentations).

Everyone should vote their conscience on whether a question is too broad or not. I would say that the existence of a good (content-wise and vote-wise) answer is a counter-example to a closure argument. Separately, self-answering is completely acceptable, and «accepted» answers can change over time. Also, the changes so far to the question seem to me to have been cosmetic, and not changes in scope. Critically, those changes have not invalidated any existing answers.

3 Answers 3

Linux display

The Linux’s display system, uses multiple technology, protocols, extensions, applications, servers (daemon), drivers and concepts to achieve the windowing system for instance: Xorg, Wayland, X11, OpenGL, RandR, XrandR, Screen Resolution, DPI, Display server, etc. This can be overwhelming to understand fully, but each side of it is meant for a specific purpose and they are not used all together at the same time.

X protocol

The X Window System, X11 (X version 11) is a windowing system for bitmap displays, common on Unix-like operating systems, X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting with a mouse and keyboard. X does not mandate the user interface, this is handled by individual programs. As such, the visual styling of X-based environments varies greatly; different programs may present radically different interfaces. X originated at the Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at version 11 (hence «X11») since September 1987. The X.Org Foundation leads the X project, with the current reference implementation, X.Org Server, available as free and open source software under the MIT License and similar permissive licenses.

X implementation

Most Linux distribution uses X.Org Server which is the free and open-source implementation of the display server for the X Window System (X11) stewarded by the X.Org Foundation. Xorg/X alone doesn’t support multiple provided features like scaling or rendering, for that Xorg uses extensions such as XFixes, RandR (RandR is managed by xrandr it can for instance setup panning, resolution or scaling), GLX (OpenGL extension), Render or Composite which causes an entire sub-tree of the window hierarchy to be rendered to an off-screen buffer, applications can then take the contents of that buffer and do whatever they like, the off-screen buffer can be automatically merged into the parent window or merged by external programs, called compositing managers to do compositing on their own like some window managers do; E.g. Compiz, Enlightenment, KWin, Marco, Metacity, Muffin, Mutter and Xfwm. For other «non-compositing» window managers, a standalone composite manager can be used, example: Picom, Xcompmgr or Unagi. Xorg supported extensions can be listed with: xdpyinfo -display :0 -queryExtensions | awk ‘/^number of extensions:/,/^default screen number/’ .

On the other hand Wayland is intended as a simpler replacement for Xorg/X11, easier to develop and maintain but as of 2020 desktop’s support for Wayland is not yet fully ready other than Gnome (e.g. KDE Kwin and Wayland support); on the distributions side, Fedora does use Wayland by default. Note that Wayland and Xorg can work simultaneously, this can be the case depending on the used configuration. XWayland is a series of patches over the X.Org server codebase that implement an X server running upon the Wayland protocol. The patches are developed and maintained by the Wayland developers for compatibility with X11 applications during the transition to Wayland, and was mainlined in version 1.16 of the X.Org Server in 2014. When a user runs an X application from within Weston, it calls upon XWayland to service the request.

Читайте также:  No efi system partition was found при установке linux mint

The whole scope

A display server or window server is a program (like Xorg or Wayland) whose primary task is to coordinate the input and output of its clients to and from the rest of the operating system, the hardware, and each other. The display server communicates with its clients over the display server protocol, a communications protocol, which can be network-transparent or simply network-capable. For instance X11 and Wayland are display server communications protocols.

As shown on the diagram a window manager is an other important element of the desktop environment that is a system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunction with the underlying graphical system that provides required functionality support for graphics hardware, pointing devices, and a keyboard, and are often written and created using a widget toolkit. KDE uses KWin as a window manager (it has a limited support for Wayland as of 2020), similarly Gnome 2 uses Metacity and Gnome 3 uses Mutter as a window manager.

An other important aspect of a windows manager is the compositor or compositing window manager, which is a window manager that provides applications with an off-screen buffer for each window. The window manager composites the window buffers into an image representing the screen and writes the result into the display memory. Compositing window managers may perform additional processing on buffered windows, applying 2D and 3D animated effects such as blending, fading, scaling, rotation, duplication, bending and contortion, shuffling, blurring, redirecting applications, and translating windows into one of a number of displays and virtual desktops. Computer graphics technology allows for visual effects to be rendered in real time such as drop shadows, live previews, and complex animation. Since the screen is double-buffered, it does not flicker during updates. The most commonly used compositing window managers include: Linux, BSD, Hurd and OpenSolaris-Compiz, KWin, Xfwm, Enlightenment and Mutter. each one have its own implementation, for instance KDE’s KWin’s compositor have many features/settings like animation speed, tearing prevention (vsync), window thumbnails, scaling method and can use OpenGLv2/OpenGLv3 or XRender as a rendering backend along with Xorg. (XRender/Render not to confuse with XRandR/RandR).

Читайте также:  Проверка команда dns linux

OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering. OpenGL is a rendering library that can be used with Xorg, Wayland or any application that implements it. OpenGL installation can be checked with glxinfo | grep OpenGL .

The display resolution or display modes of a computer monitor or display device is the number of distinct pixels in each dimension that can be displayed. It is usually quoted as width × height, with the units in pixels: for example, 1024 × 768 means the width is 1024 pixels and the height is 768 pixels. xrandr can be used to add or render/simulate a new display resolution.

The DPI stand for dots per inch and is a measure of spatial printing/display, in particular the number of individual dots that can be placed in a line within the span of 1 inch (2.54 cm). Computer’s screens do not have dots, but do have pixels, the closely related concept is pixels per inch or PPI and thus DPI is implemented with the PPI concept. The default 96 DPI mesure mean 96×96 vertically and horizontally. Additionally Is X DPI (dot per inch) setting just meant for text scaling? QA is very informative.

Notes

Some KDE’s gui tools: systemsettings5 > display, kcmshell5 xserver and kinfocenter .

References

Links and sources: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12.

Источник

How to Display System Details and Hardware Information on Linux

A master craftsman is deeply familiar with the tools he or she works with, and you need to be familiar with your Linux system and the hardware it runs on if you want to call yourself an advanced user.

Knowing how to display system details and hardware information on Linux is guaranteed to come in handy when troubleshooting all kinds of problems, from hardware devices not showing up to software applications not installing or running correctly.

As is usually the case, Linux gives you multiple ways to display system details and hardware information, some requiring more technical knowledge than others.

Method 1: CPU-X

If you’re familiar with CPU-Z, a freeware system profiling and monitoring application for Microsoft Windows, then you’ll love CPU-X, its free and open-source alternative.

CPU-X runs on Linux and FreeBSD, and it has a graphical user interface designed after the application that inspired it. There’s also a text-based user interface created using the ncurses library, plus a special dump mode that’s useful for outputting all collected information into a text file.

You can download CPU-X from the official repositories of most major Linux distributions, including Ubuntu, Fedora, and Solos, or you can build it yourself following the step-by-step guide on the Wiki.

Method 2: Hardware Lister (lshw)

Hardware Lister is a tool for gathering detailed hardware information. The tool comes with an optional graphical user interface that displays the gathered information in a more user-friendly manner, but most users rely only on the lshw command.

Читайте также:  Find java home in linux

If you’re using a major Linux distribution like Ubuntu, the lshw command (but not the GUI, called lshw-gui) will likely already be installed on your system. To use it, all you need to do is enter the following command in the terminal:

Hardware Lister will then display a long list of information about your Linux machine, including its name, CPU, connected USB devices, memory, and more.

Method 3: Neofetch

This command-line system information tool written in bash is loved by aesthetically-oriented Linux users for its ability to display basic OS, software, and hardware information in a visually pleasing manner. To use Neofetch with its default settings, simply install the tool and invoke it in your favorite terminal emulator:

By default, Neofetch will display your operating system’s logo on the left (more than 150 operating systems are supported) and system information on the right. You can also configure Neofetch to use an image, a custom ASCII file, the current wallpaper, or nothing at all.

Method 4: inxi

inxi (never capitalized) is a command line system information tool that started as infobash, developed by locsmif.

“That was a buggy, impossible to update or maintain piece of software, so the fork fixed those core issues, and made it flexible enough to expand the utility of the original ideas,” explains the project’s GitHub page.

So, what can inxi tell you about your system and the hardware it runs on? Just about anything you could possibly need for basic troubleshooting and more.

To tell inxi to display full output with extra details, use the following command:

If you want to share the collected information with strangers on the internet, you can also include the -z flag, which masks out personally identifying information like your MAC and IP address.

Method #5: ls* Commands

To display system details and hardware information on Linux, you actually don’t need to download any third-party software. Instead, you can take advantage of the so-called ls* commands to display information gathered from places like /proc.

Here are the ls* commands you should know about:

  • lscpu: used to display information about the CPU.
  • lsusb: used to display information about USB buses in the system and the devices connected to them.
  • lspci: used to display information about PCI buses and devices in the system.
  • lssci: used to display information about scsi/sata devices.

Each of these commands supports a variety of flags, so we recommend you study their man pages to for more information about them.

Summary

In this article, we’ve described five ways to display system details and hardware information on Linux to help you quickly collect the information you need to troubleshoot any problem. Now, it’s up to you to pick the method you like the most and put it to good use.

About the author

David Morelo

David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application

Источник

Оцените статью
Adblock
detector