Xorg-Server-21.1.10

Xorg サーバー の概要

Xorg サーバーは、X ウィンドウシステムの中心となるソフトウェアです。

[注記]

注記

LFS や依存パッケージが本ブックに示す最新安定バージョンでなかった場合には、BLFS 開発版においては、パッケージのビルドや処理実行が適切に行われないことがあります。

パッケージ情報

追加のダウンロード

Xorg サーバー の依存パッケージ

必須

libxcvt-0.1.2, Pixman-0.42.2, Xorg フォント (only font-util), and at runtime: xkeyboard-config-2.40

推奨

任意

acpid-2.0.34 (runtime), Doxygen-1.9.8 (to build API documentation), fop-2.9 (to build documentation), libunwind-1.6.2, Nettle-3.9.1, libgcrypt-1.10.3, xcb-util-keysyms-0.4.1, xcb-util-image-0.4.1, xcb-util-renderutil-0.3.10, xcb-util-wm-0.4.2 (all four to build Xephyr), xmlto-0.0.28 (to build documentation), xkeyboard-config-2.40 (for tests), rendercheck (for tests), and xorg-sgml-doctools (to build documentation)

Kernel Configuration

The traditional Device Dependent X (DDX) drivers have been removed from BLFS in favor of the modesetting_drv driver which will be built as a part of this package. To use the modesetting_drv driver, the kernel must provide a Direct Rendering Manager (DRM) driver for your GPU.

If your GPU supports 3D acceleration and Mesa-23.3.1 provides a Gallium3D driver for utilizing its 3D capability, you should have already enabled the necessary kernel configuration options in Mesa Kernel Configuration. Otherwise, you need to find the kernel configuration option of the DRM driver for the GPU and enable it. Notably, the virtual GPUs provided by some virtual machine managers:

Device Drivers --->
  Graphics support --->
    <*/M>   Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
                                                                      ...  [DRM]
    < /*/M> DRM driver for VMware Virtual GPU                       [DRM_VMWGFX]
    < /*/M> DRM Support for bochs dispi vga interface (qemu stdvga)  [DRM_BOCHS]
    < /*/M> Virtual Box Graphics Card                            [DRM_VBOXVIDEO]

If the kernel does not provide a DRM driver for your GPU, on most x86 systems the simple frame buffer DRM driver running on VESA or UEFI frame buffer can be used as a fallback. Enable the following options in the kernel configurations if you don't have a dedicated DRM driver for the GPU, or you want to keep the simple frame buffer driver as a fallback in case the dedicated driver fails:

Device Drivers --->
  Firmware Drivers --->
    [*] Mark VGA/VBE/EFI FB as generic system framebuffer       [SYSFB_SIMPLEFB]
  Graphics support --->
    <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
                                                                      ...  [DRM]
    <*> Simple framebuffer driver                                [DRM_SIMPLEDRM]

To allow the kernel to print debug messages at an early boot stage, CONFIG_DRM and CONFIG_DRM_SIMPLEDRM should not be built as kernel modules unless an initramfs will be used.

If you want to use the simple frame buffer driver on a system booted via BIOS (instead of UEFI), add the following line before the first menuentry block in the /boot/grub/grub.cfg file to initialize the VESA frame buffer:

set gfxpayload=1024x768x32

You may replace 1024, 768, and 32 with a resolution and color depth setting suitable for your monitor.

If all of these DRM drivers do not work for you and you need to use a DDX driver with a non-DRM kernel GPU driver (usually named CONFIG_FB_* in the kernel configuration, or existing as out-tree kernel modules), or you need an device specific functionality requiring a DDX driver, consult a prior version of BLFS, or an even prior version for more DDX drivers.

Xorg サーバー のインストール

First, if you need the TearFree option to work around screen tearing, apply the backported patch:

patch -Np1 -i ../xorg-server-21.1.10-tearfree_backport-10.patch

サーバーをビルドするために以下のコマンドを実行します。

mkdir build &&
cd    build &&

meson setup ..              \
      --prefix=$XORG_PREFIX \
      --localstatedir=/var  \
      -Dglamor=true         \
      -Dxkb_output_dir=/var/lib/xkb &&
ninja

ビルド結果をテストする場合は ninja test を実行します。 You will need to run ldconfig as the root user first or some tests may fail.

root ユーザーになって以下を実行します。

ninja install &&
mkdir -pv /etc/X11/xorg.conf.d &&
install -v -d -m1777 /tmp/.{ICE,X11}-unix &&
cat >> /etc/sysconfig/createfiles << "EOF"
/tmp/.ICE-unix dir 1777 root root
/tmp/.X11-unix dir 1777 root root
EOF

コマンド説明

-Dglamor=true: Ensure building the Glamor module. It's needed to build the modesetting_drv driver which replaces the traditional Device Dependent X (DDX) drivers.

-Dsuid_wrapper=true: Builds the suid-root wrapper for legacy DDX driver support on rootless xserver systems.

-Dsystemd_logind=false: This switch disables elogind integration, allowing Xorg Server to work without having the PAM module configured.

cat >> /etc/sysconfig/createfiles...: このコマンドは起動時に /tmp/.ICE-unix ディレクトリと /tmp/.X11-unix ディレクトリを生成します。 そしてサーバーが必要としているパーミッションおよび所有者を適切に設定します。

-Dxephyr=true: This option allows building Xephyr if its dependencies are met.

パッケージ構成

インストールプログラム: gtf, X, Xnest, Xorg, Xvfb, and optionally Xephyr
インストールライブラリ: several under $XORG_PREFIX/lib/xorg/modules/ including the modesetting_drv driver
インストールディレクトリ: /etc/X11/xorg.conf.d, $XORG_PREFIX/include/xorg, $XORG_PREFIX/lib/xorg, $XORG_PREFIX/share/X11/xorg.conf.d

概略説明

gtf

VESA GTF モードの行数を算出します。

X

Xorg へのシンボリックリンク。

Xephyr

is a nested X server which supports modern X extensions

Xnest

Nested X サーバー。

Xorg

X11R7 X サーバー。

Xvfb

X バージョン 11 における X サーバーの仮想フレームバッファー。

modesetting_drv.so

provides a video driver for machines using Kernel Mode Setting (KMS). This will use glamor if that has been enabled and the hardware offers acceleration