Конфиг xorg

Себе на память и с надеждой что кому то он будет полезен.
Для ноутбука с видеокартой nvidia. С кучей хаков. Не идеал конечно но лучше чем примеры из манов.

$ cd /etc/X11/xorg.conf.d
$ ls
10-evdev.conf 10-monitor.conf 11-mouse.conf 20-files.conf 20-nvidia.conf 50-synaptics.conf

$ cat 10-evdev.conf
Section "InputClass"
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection

Section "InputClass"
Identifier "Keyboard"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbModel" "acer\_laptop"
Option "XkbLayout" "us,ru"
Option "XkbVariant" ", winkeys"
Option "XkbOptions" "grp:lwin,compose:ralt\_switch"
EndSection

Да это настройки клавиатуры. Ничего особого.

$ cat 10-monitor.conf
Section "ServerLayout"
Identifier "DualSreen"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
Option "AIGLX" "true"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Acer"
ModelName "LPL"
DisplaySize 339 212
HorizSync 30.0 - 110.0
VertRefresh 50.0 - 150.0
Option "DPMS"
Option "backingstore"
ModeLine "1280x800@60i" 33.410 1280 1312 1432 1464 720 736 740 757
+hsync +vsync interlace
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Asus"
ModelName "Ancor Communications Inc VW202"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
Option "DPMS"
Option "backingstore"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "1"
SubSection "Display"
Depth 24
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubSection
Option "RenderAccel" "1"
Option "AllowGLXWithComposite" "1"
Option "AddARGBGLXVisuals" "1"
Option "TripleBuffer" "1"
Option "DamageEvents" "1"
Option "TwinView" "0"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "DFP: nvidia-auto-select +0+0"
EndSection

Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "NoLogo" "1"
Option "RenderAccel" "1"
Option "AllowGLXWithComposite" "1"
Option "AddARGBGLXVisuals" "1"
Option "TripleBuffer" "1"
Option "DamageEvents" "1"
Option "TwinView" "0"
Option "metamodes" "CRT: 1680x1050 +0+0"
EndSection

Section "Module"
# Disable "dri"
# Disable "dri2"
Load "record"
Load "glx"
Load "freetype"
Load "dbe"
Load "ddc"
Load "extmod"
Load "i2c"
EndSection

Section "Extensions"
Option "GLX" "Enable"
Option "Composite" "Enable"
Option "RENDER" "Enable"
EndSection

Section "ServerFlags"
Option "IgnoreABI" "1"
Option "GlxVisuals" "all"
EndSection

А это настройки собственно самого монитора.

    $ cat 11-mouse.conf
Section "InputClass"
# 046d:c50e
# 046d:c501
Identifier "Logitech Trackball"
MatchVendor "Logitech, Inc."
MatchProduct "MX-1000 Cordless Mouse Receiver|Cordless Mouse Receiver"
MatchIsPointer "on"
Driver "evdev"
Option "Buttons" "8"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "8"
Option "YAxisMapping" "4 5"
Option "XAxisMapping" "6 7"
EndSection

Section "InputClass"
# 046d:c521
Identifier "Logitech Multibutton Mouse"
MatchVendor "Logitech, Inc."
MatchProduct "MX620 Laser Cordless Mouse"
MatchIsPointer "on"
Driver "evdev"
Option "HWHEELRelativeAxisButtons" "7 6"
EndSection

Section "InputClass"
# 045e:0095
Identifier "Microsoft IntelliMouse Explorer"
MatchVendor "Microsoft Corp."
MatchProduct "IntelliMouse Explorer 4.0 (IntelliPoint)"
MatchIsPointer "on"
Driver "evdev"
Option "HWHEELRelativeAxisButtons" "7 6"
EndSection

Section "InputClass"
# 0210:0003
Identifier "0210:0003"
MatchVendor "0210"
MatchProduct "0003"
MatchIsPointer "on"
Driver "evdev"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
EndSection

Section "InputClass"
# 0002:000a
Identifier "0002:000a"
MatchVendor "0002"
MatchProduct "000a"
MatchIsPointer "on"
Driver "evdev"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
EndSection

Section "InputClass"
# 04b3:300f
Identifier "IBM 300f"
MatchVendor "IBM Corp."
MatchProduct "300f"
MatchIsPointer "on"
Driver "evdev"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
EndSection

Section "InputClass"
# Novell Bug #597214
Identifier "IBM TPPS/2 TrackPoint"
MatchProduct "TPPS/2 IBM TrackPoint"
MatchIsPointer "on"
Driver "evdev"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
Option "YAxisMapping" "4 5"
Option "XAxisMapping" "6 7"
Option "Emulate3Buttons" "on"
Option "EmulateWheelTimeout" "200"
EndSection

Section "InputClass"
# Novell Bug #668842
Identifier "PS/2 Generic Mouse"
MatchProduct "PS/2 Generic Mouse"
MatchIsPointer "on"
Driver "evdev"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
Option "YAxisMapping" "4 5"
Option "XAxisMapping" "6 7"
Option "Emulate3Buttons" "on"
Option "EmulateWheelTimeout" "200"
EndSection

Section "InputClass"
# Novell Bug #671776
Identifier "ImPS/2 Generic Wheel Mouse"
MatchProduct "ImPS/2 Generic Wheel Mouse"
MatchIsPointer "on"
Driver "evdev"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
Option "YAxisMapping" "4 5"
Option "XAxisMapping" "6 7"
Option "Emulate3Buttons" "on"
Option "EmulateWheelTimeout" "200"
EndSection

Section "InputClass"
# 03f0:1126
Identifier "HP 1126"
MatchVendor "Hewlett-Packard"
MatchProduct "1126"
MatchIsPointer "on"
Driver "evdev"
Option "MinX" "0"
Option "MaxX" "3000"
Option "MinY" "0"
Option "MaxY" "3000"
EndSection

Section "InputDevice
Identifier "Mouse0"
Driver "evdev"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "VertScrollDelta" "6"
EndSection

Зоопарк грызунов.

    $ cat 20-files.conf
Section "Files"
ModulePath "/usr/lib64/xorg/modules"
ModulePath "/usr/lib64/opengl/xorg-x11/extensions"
# local
FontPath "/usr/local/share/fonts/TTF"
FontPath "/usr/local/share/fonts/cyrillic"
FontPath "/usr/local/share/fonts/misc"
FontPath "/usr/local/share/fonts/75dpi"
FontPath "/usr/local/share/fonts/mac"
FontPath "/usr/local/share/fonts/Type1"
FontPath "/usr/local/share/fonts/OTF"
FontPath "/usr/local/share/fonts/100dpi"
# global
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/corefonts"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/OTF"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/Speedo"
FontPath "/usr/share/fonts/cyrillic"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/urw-fonts"
FontPath "/usr/share/fonts/TTF"
FontPath "/usr/share/fonts/cantarell"
EndSection

Это основные пути. Обратите особое внимание на строчки ModulePath! Да и я переопределяю порядок поиска шрифтов. Вначале мои локальные /usr/local а затем глобальные /usr. Кроме того замечательный скрипт
fontlist_fix.py можно найти на странице X.Org/Fonts

$ cat 20-nvidia.conf
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
#Forcing Powermizer performance level (for laptops)
# Force Powermizer to a certain level at all times
# level 0x1=highest
# level 0x2=med
# level 0x3=lowest
# AC settings:
# Battery settings:
# Letting the GPU set its own performance level based on temperature
# Option "RegistryDwords" "PerfLevelSrc=0x3333"
#on battery - max power saving, on AC - max performance
#"PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x3;
PowerMizerDefaultAC=0x1"
#on battery - max power saving, on AC - adaptive strategy (my
favorite)
#"PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"
#on battery - adaptive strategy, on AC - max performance
#"PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"
#adaptive strategy for any power source
#"PowerMizerEnable=0x1; PerfLevelSrc=0x3333"
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2233;
PowerMizerDefault=0x3; PowerMizerDefaultAC=0x1"
# Disable vblank interrupts (for laptops)
Option "OnDemandVBlankInterrupts" "1"
# Enabling overclocking
Option "Coolbits" "1"
Screen 0
EndSection

Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
#Forcing Powermizer performance level (for laptops)
# Force Powermizer to a certain level at all times
# level 0x1=highest
# level 0x2=med
# level 0x3=lowest
# AC settings:
# Battery settings:
# Letting the GPU set its own performance level based on temperature
# Option "RegistryDwords" "PerfLevelSrc=0x3333"
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2233;
PowerMizerDefault=0x3; PowerMizerDefaultAC=0x1"
# Disable vblank interrupts (for laptops)
Option "OnDemandVBlankInterrupts" "1"
# Enabling overclocking
Option "Coolbits" "1"
Screen 1
EndSection

Настройки и тюнинг видеокарты. По поводу конкретных опций добро пожаловать в man.

$ cat 50-synaptics.conf
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but
cannot be
# enabled by default. See the following link for details:
#
http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
Identifier "touchpad ignore duplicates"
MatchIsTouchpad "on"
MatchOS "Linux"
MatchDevicePath "/dev/input/mouse*"
Option "Ignore" "on"
EndSection

Ну и точпад.

Надеюсь что было познавательно.

Comments