systemctl restart display-manager # restart
radeon: until GCN 2nd gen amdgpu: since GCN 3rd gen, 1st gen experimental
nouveau NVIDIA Tesla, Fermi, Kepler, Maxwell based GeForce GPUs, Tegra K1, X1 SoC tegra Nvidia Tegra20, Tegra30 SoCs
bochs Virtual VGA cards using the Bochs dispi vga interface (such as QEMU stdvga)
dmesg | grep modesetting
GEM (Graphics Execution Manager): Framework for buffer management.
https://wiki.archlinux.org/index.php/kernel_mode_setting Previously, setting up the video card was the job of the X server. kernel is now able to set the mode of the video card. This makes fancy graphics during bootup, virtual console and X fast switching possible, among other things.
Any vga= options in your bootloader as these will conflict with the native resolution enabled by KMS.
Any video= lines that enable a framebuffer that conflicts with the driver.
Any other framebuffer drivers (such as uvesafb)
Intel, Nouveau, ATI and AMDGPU drivers already enable KMS automatically.
The proprietary NVIDIA driver supports KMS (since 364.12), which has to be manually enabled.
The proprietary AMD Catalyst driver does not support KMS
a framework for allowing direct access to graphics hardware under the X Window System in a safe, efficient way. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL. DRI has also been adapted to provide OpenGL acceleration on a framebuffer console without a display server running.
version 4.8.0 released on 15 December 2008
a prospective replacement for X. It works directly with the GPU hardware, via DRI. Wayland can run an X.org server as a client, which can be rootless based on EGL and DRI
the client and server may run on the same machine or on different ones
An X client itself may emulate an X server by providing display services to other clients. This is known as "X nesting". Open-source clients such as Xnest and Xephyr support such X nesting.
No release plan for a X11R7.8 rollup katamari release has been proposed. Unlike X11R1 through X11R6.9, X11R7.x releases are not built from one monolithic source tree, but many individual modules.
allow fragments of the X server configuration to be delivered in individual files running the server without a configuration file
Some multi-head configurations are supported in X11R7.7. Support for multiple PCI/AGP cards may require a kernel with changes to support VGA arbitration.
All users must now set DPI or some other scaling factor explicitly
The Xorg server relies on the operating system's native module loader support for handling program modules. The X server makes use of modules for video drivers, X server extensions, input device drivers, framebuffer layers, and internal components used by some drivers (like XAA & EXA).
# Xorg -version
X.Org X Server 1.19.5
X Protocol Version 11, Revision 0
The X Protocol can be extended with new functionality via Extensions. Examples:
◾ XSHM (»X Shared Memory«) – faster local display of bitmap graphics
◾ Xv (»X Video«) – hardware-accelerated video display
◾ GLX – OpenGL on X
◾ Xinerama – multi-monitor support
◾ XRandR (»X Resize and Rotate«) – graphics mode setting without restarting the X
◾ XRender – modern anti-aliased, alpha-blended 2D graphics
▸ today used for (almost) every 2D graphics application
Screen 0: minimum 0 x 0, current 1234 x 823, maximum 4096 x 4096
xrandr --output VGA1 --off # Disabling an output
is a proxy X server that uses one or more other X servers as its display devices. It provides multi-head X functionality for displays that might be located on different machines.
is a nested X server, that operates as both an X client and X server.
is a X server that outputs to a window on a pre-existing “host” X display. Unlike Xnest which is an X proxy, and thus limited to the capabilities of the host X server, Xephyr is a full X server which uses the host X server window as a “framebuffer” via fast SHM XImages.
is a virtual framebuffer X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory.
is an X server that interacts with the MacOS X native Aqua window system
is an X server that runs under the Cygwin environment: https://x.cygwin.com
OpenGL driver runs in userspace as part of the application process
additional API required as »glue« to the windowing system:
▸ GLX for the X Window System
▸ WGL (Windows), AGL (Mac OS X)
▸ EGL for OpenGL ES (Embedded Linux, Android, iOS, ...)
◦ available on all systems, will eventually supersede GLX etc.
Mesa is an open source OpenGL implementation
X Clients don’t implement the X11 protocol directly, but use libraries:
▸ traditionally Xlib
▸ newer, leaner alternative: XCB (»X11 C Bindings«)
▸ toolkits (Motif, Gtk, Qt, ...) internally use Xlib or XCB, too
special X Client that manages the positions of the top-level windows and draws window frames (»decorations«)
- Host access: managed using xhost command.a single connection simultaneously.
- MIT-magic-cookie-1: without encryption.
- XDM-authorization-1: with encryption.
- sun-des-1: SunOS (and some other systems)
- server interpreted: manipulated via xhostMIT-MAGIC-COOKIE-1 and XDM-AUTHORIZATION-1 store secret data in the file; so anyone who can read the file can gain access to the X server. SUN-DES-1 stores only the identity of the principal who started the server ([email protected] when the server is started by xdm), and so it is not useful to anyone not authorized to connect to the server.
inet Internet host (IPv4).
inet6 Internet host (IPv6).
dnet DECnet host.
nis Secure RPC network name.
krb Kerberos V5 principal.
local Contains only one name, the empty string.
si Server Interpreted: IPv6/hostname/localuser & localgroup
xhost + # allow everyone
xhost +SI:localuser:lightdm / si:hostname:almas
By default, XAUTHORITY environment variable or ~/.Xauthority.
ignore any authority file locks
attempt to break any authority file locks before proceeding
not attempt to resolve any hostnames
git clone --recursive https://github.com/Ventto/mons.git
sudo make install
xauth add $(xauth -f ~fzinfz/.Xauthority list|tail -1)
ss -anp | grep 6010 # 127.0.0.1:6010 (= 6000+10 for localhost:10.0)
tcpdump -nS -i any port 6010
apt install -y xpra # remote
xpra start :13 # remote
xpra attach ssh:remote:13 # local
DISPLAY=:13 xeyes # remote
vncserver -kill :1
Linux subsystem for laptop hybrid graphics. 2 flavors:
- muxed: both GPUs can drive all displays
- muxless: only one connected to outputs. The other one is merely used to offload rendering, its results are copied over PCIe into the framebuffer. On Linux this is supported with DRI PRIME.
PRIME is a technology used to manage hybrid graphics found on recent laptops (Optimus for NVIDIA, AMD Dynamic Switchable Graphics for Radeon). PRIME GPU offloading and Reverse PRIME is an attempt to support muxless hybrid graphics in the Linux kernel.
xrandr --listproviders # check support
xrandr --setprovideroffloadsink 1 0
xrandr --setprovideroffloadsink radeon Intel
DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
# Discrete card as primary GPU, XRandR 1.4+
xrandr --setprovideroutputsource Intel nouveau
dedicated GPU’s output is copied over to the integrated GPU
◦ not saving power (quite the contrary – both GPUs are active!)
make amdgpu=1 # show VRAM usage. requires libdrm >= 2.4.63