- Ubuntu Wiki
- Quick xorg.conf
- Configuring using xorg.conf.d (Ubuntu 10.04 and newer)
- Configuration Recipes
- Other Resources
- Xorg
- Installation
- Driver installation
- AMD
- Running
- Configuration
- Using .conf files
- Using xorg.conf
- Input devices
- Управление графикой: xorg.conf, многомониторные режимы, панель задач
- Создание конфигурационного файла /etc/X11/xorg.conf
Ubuntu Wiki
Today’s X rarely requires manual configuration. X now automatically configures itself with reasonable defaults. Both GNOME and KDE provide GUI utilities for customizing settings beyond these defaults if you like.
However, sometimes you need to muck with the configuration manually, beyond what these tools allow.
Quick xorg.conf
Most systems don’t ship with an X config file any more, but sometimes you need one. Here’s a basic skeleton:
Section "Device" Identifier "Configured Video Device" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection
Configuring using xorg.conf.d (Ubuntu 10.04 and newer)
Files ending in *.conf in the /usr/share/X11/xorg.conf.d directory are automatically loaded by X at start prior to reading the xorg.conf. These files can each contain one or more Sections in the same format used by xorg.conf.
Users can continue making custom configuration in /etc/xorg.conf as usual; the .conf snippets are mainly there for the distro or hw vendor to ship default InputClass rules and custom overrides.
Configuration Recipes
- Session Startup — .xprofile, .xsessionrc, .gnomerc
- Rootless X — Running X as a user process, not as the root user
- Xorg On The Edge — for bleeding edge packages
- Input device configuration
- Keyboard configuration
Other Resources
X/Config (последним исправлял пользователь yktooo 2020-10-13 09:10:05)
The material on this wiki is available under a free license, see Copyright / License for details.
Xorg
The X.Org project provides an open source implementation of the X Window System. The development work is being done in conjunction with the freedesktop.org community. The X.Org Foundation is the educational non-profit corporation whose Board serves this effort, and whose Members lead this work.
Xorg (commonly referred to as simply X) is the most popular display server among Linux users. Its ubiquity has led to making it an ever-present requisite for GUI applications, resulting in massive adoption from most distributions. See the Xorg Wikipedia article or visit the Xorg website for more details.
For the alternative and successor, see Wayland.
Installation
Xorg can be installed with the xorg-server package.
Additionally, some packages from the xorg-apps group are necessary for certain configuration tasks. They are pointed out in the relevant sections.
Finally, an xorg group is also available, which includes Xorg server packages, packages from the xorg-apps group and fonts.
Driver installation
The Linux kernel includes open-source video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11.
First, identify the graphics card (the Subsystem output shows the specific model):
$ lspci -v | grep -A1 -e VGA -e 3D
Then, install an appropriate driver. You can search the package database for a complete list of open-source video drivers:
Xorg searches for installed drivers automatically:
- If it cannot find the specific driver installed for the hardware (listed below), it first searches for fbdev ( xf86-video-fbdev ), which does not include any 2D or 3D acceleration.
- If that is not found, it searches for vesa ( xf86-video-vesa ), the generic driver, which handles a large number of chipsets but does not include any 2D or 3D acceleration.
- If vesa is not found, Xorg will fall back to kernel mode setting, which includes GLAMOR acceleration (see modesetting(4) ).
In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required:
This article or section needs expansion.
Other video drivers can be found in the xorg-drivers group.
Xorg should run smoothly without closed source drivers, which are typically needed only for advanced features such as fast 3D-accelerated rendering for games. The exceptions to this rule are recent GPUs (especially NVIDIA GPUs) not supported by open source drivers.
AMD
For a translation of model names (e.g. Radeon RX 6800) to GPU architectures (e.g. RDNA 2), see Wikipedia:List of AMD graphics processing units#Features overview.
Running
The Xorg(1) command is usually not run directly. Instead, the X server is started with either a display manager or xinit.
Configuration
Note: Arch supplies default configuration files in /usr/share/X11/xorg.conf.d/ , and no extra configuration is necessary for most setups.
Xorg uses a configuration file called xorg.conf and files ending in the suffix .conf for its initial setup: the complete list of the folders where these files are searched can be found in xorg.conf(5) , together with a detailed explanation of all the available options.
Using .conf files
The /etc/X11/xorg.conf.d/ directory stores host-specific configuration. You are free to add configuration files there, but they must have a .conf suffix: the files are read in ASCII order, and by convention their names start with XX— (two digits and a hyphen, so that for example 10 is read before 20). These files are parsed by the X server upon startup and are treated like part of the traditional xorg.conf configuration file. Note that on conflicting configuration, the file read last will be processed. For this reason, the most generic configuration files should be ordered first by name. The configuration entries in the xorg.conf file are processed at the end.
Using xorg.conf
Xorg can also be configured via /etc/X11/xorg.conf or /etc/xorg.conf . You can also generate a skeleton for xorg.conf with:
This should create a xorg.conf.new file in /root/ that you can copy over to /etc/X11/xorg.conf .
Tip: If you are already running an X server, use a different display, for example Xorg :2 -configure .
Alternatively, your proprietary video card drivers may come with a tool to automatically configure Xorg: see the article of your video driver, NVIDIA or AMDGPU PRO, for more details.
Note: Configuration file keywords are case insensitive, and «_» characters are ignored. Most strings (including Option names) are also case insensitive, and insensitive to white space and «_» characters.
Input devices
For input devices the X server defaults to the libinput driver ( xf86-input-libinput ), but xf86-input-evdev and related drivers are available as alternative.[1]
Udev, which is provided as a systemd dependency, will detect hardware and both drivers will act as hotplugging input driver for almost all devices, as defined in the default configuration files 10-quirks.conf and 40-libinput.conf in the /usr/share/X11/xorg.conf.d/ directory.
After starting X server, the log file will show which driver hotplugged for the individual devices (note the most recent log file name may vary):
$ grep -e "Using input driver " Xorg.0.log
If both do not support a particular device, install the needed driver from the xorg-drivers group. The same applies, if you want to use another driver.
To influence hotplugging, see #Configuration.
For specific instructions, see also the libinput article, the following pages below, or Fedora:Input device configuration for more examples.
Управление графикой: xorg.conf, многомониторные режимы, панель задач
Общее управление графическими режимами современных версиях Astra Linux осуществляется с помощью графического сервера Xorg. По умолчанию этот сервер автоматически определяет актуальную конфигурацию оборудования, и настраивается самостоятельно. Ниже описаны основные способы ручной настройки этого сервера.
Создание конфигурационного файла /etc/X11/xorg.conf
По умолчанию в современных версиях Astra Linux файл конфигурации графического сервера Xorg не создаётся и не используется. Автоматическая настройка параметров Xorg производится при каждом запуске системы, при этом каждый раз производится проверка оборудования, и подбираются параметры под актуальную аппаратную конфигурацию.
Описанные ниже действия по созданию и редактированию конфигурации в виде файла нужны для специальных настроек или при возникновении проблем с автоматически определёнными параметрами.
Более подробная информация по конфигурационным файлам Xorg доступна в документации по xorg.conf.
Конфигурационный файл с текущими настройками может быть создан самим сервером Xorg.
Для этого первым шагом нужно остановить текущую сессию менеджера дисплеев (в Astra Linux это служба fly-dm).
При остановке текущей сессии менеджера дисплеев текущая графическая сессия будет прекращена.
Останавливая текущую сессию менеджера дисплеев нужно быть готовым войти в консольную сессию (знать логин и пароль).
Для повторного запуска графической сессии нужно будет перезагрузить компьютер.
Из консольной сессии из командной строки перезагрузить компьютер можно командой
Остановить текущую сессию менеджера дисплеев можно командой:
sudo systemctl stop fly-dm
В консольной сессии перейти в каталог /etc/X11/ и ввести команду для генерации файла настроек:
При выполнении команды будет создан файл /root/xorg.conf.new с примерно таким содержанием (очень сильно зависит от текущей аппаратной конфигурации):
Section «ServerLayout»
Identifier «X.org Configured»
Screen 0 «Screen0» 0 0
InputDevice «Mouse0» «CorePointer»
InputDevice «Keyboard0» «CoreKeyboard»
EndSection
Section «Files»
ModulePath «/usr/lib/xorg/modules»
FontPath «/usr/share/fonts/msttcorefonts»
FontPath «/usr/share/fonts/X11/misc»
FontPath «/usr/share/fonts/X11/100dpi/:unscaled»
FontPath «/usr/share/fonts/X11/75dpi/:unscaled»
FontPath «/usr/share/fonts/X11/Type1»
FontPath «/usr/share/fonts/X11/100dpi»
FontPath «/usr/share/fonts/X11/75dpi»
FontPath «built-ins»
EndSection
Section «Module»
Load «glx»
EndSection
Section «InputDevice»
Identifier «Keyboard0»
Driver «kbd»
EndSection
Section «InputDevice»
Identifier «Mouse0»
Driver «mouse»
Option «Protocol» «auto»
Option «Device» «/dev/input/mice»
Option «ZAxisMapping» «4 5 6 7»
EndSection
Section «Monitor»
Identifier «Monitor0»
VendorName «Monitor Vendor»
ModelName «Monitor Model»
EndSection
Section «Device»
### Available Driver options are:-
### Values: : integer, : float, : «True»/»False»,
### : «String», : » Hz/kHz/MHz»,
### : «%»
### [arg]: arg optional
#Option «SWcursor» # []
#Option «kmsdev» #
#Option «ShadowFB» # []
#Option «AccelMethod» #
#Option «PageFlip» # []
#Option «ZaphodHeads» #
#Option «DoubleShadow» # []
Identifier «Card0»
Driver «modesetting»
BusID «PCI:0:2:0»
EndSection
Section «Screen»
Identifier «Screen0»
Device «Card0»
Monitor «Monitor0»
SubSection «Display»
Viewport 0 0
Depth 1
EndSubSection
SubSection «Display»
Viewport 0 0
Depth 4
EndSubSection
SubSection «Display»
Viewport 0 0
Depth 8
EndSubSection
SubSection «Display»
Viewport 0 0
Depth 15
EndSubSection
SubSection «Display»
Viewport 0 0
Depth 16
EndSubSection
SubSection «Display»
Viewport 0 0
Depth 24
EndSubSection
EndSection
Конфигурационный файл, для того, чтобы он использовался графическим сервером, необходимо переместить (или скопировать, сохранив оригинал) в каталог /etc/X11/ и переименовать в xorg.conf: