x window配置

本文详细介绍了X Window的配置文件xorg.conf的各个部分,包括ServerLayout、Monitor、Module、InputDevice、Screen等内容,涉及到显卡驱动、显示器设置、输入设备配置以及DRI、GLX等3D加速技术。通过理解并定制这些设置,可以优化系统的显示性能和硬件利用率。
摘要由CSDN通过智能技术生成

                                                                                一.xorg.conf配置文件

生成xorg.conf文件

关闭x window:init 3 

生成配置文件:X -configure
然后就可以生成xorg.conf.

1. 编译内核时选中内核驱动:

drivers/char/agpgart/VIA chipset

drivers/char/drm/ATI Radeon

2. 安装ati xserver驱动: apt-get install xserver-xorg-video-ati

.相关文件夹

X11有关的软件,大多放在/usr及其子目录中。

/usr/bin:存放X Server和不同的X Clients

/usr/include:开发X Client和图形所需的文件路径。

/usr/libX ServerX Clients所需的函数库目录。

/usr/lib/X11:保存多项资源,如字体和文件等。

/usr/lib/xorg/modules:包含驱动程序与多种X Server模块。

/usr/X11/man:保存X11程序编写时的手册说明页。

./etc/X11/xorg.conf文件

1.ServerLayout

“ServerLayout”Section主要用于建立X Server启动时的外观,如果文件中包含多个ServerLayout Section,则默认会使用第一个ServerLayout Section的设置。

Identifier:此ServerLayout Section的惟一名称。

Screen“Screen”Section指定的名称,此名称左侧的数字表示在Multi-head环境下的屏幕数量,如果使用标准的Single-head显示卡,则此值为0。在此名称右侧的数字分别代表

屏幕左上角的XY绝对坐标,默认值为“0 0”

InputDevice:在X Server中的“InputDevice”Section名称。通常在此仅有两行设置,即Mouse0Keyboard0,也就是系统中的第一个鼠标和键盘,而其他的设备大多可以忽略。

radeon支持比较简单的3D建模.
# Option "AIGLX" "True" #打开AIGLX就黑屏

2.Files

“Files”Section用于设置X Server服务的路径,如字体和颜色。

RgbPathRGB数据库的路径。这个文件定义在X中所有有效颜色的名称,并且指定数值。

FontPath:设置X Server寻找字体时的路径。可以同时使用多个路径,但需用逗号隔开。

作为 Xorg 服务器的一个模块,freetype渲染引擎 的功能包括读取 Truetype 字体信息,如大小、分辨率、编码等,并以之为依据渲染字体。freetype 只负责渲染字体。而查找字体,

则可以由 X服务器、X客户端 或者 字体服务器来 完成。找到字体后,使用 freetype 引擎进行渲染。

X核心字体:X服务器根据X客户端的请求(字符编码),查找字体并进行渲染,然后显示

Xft字体:X客户端自行查找字体并进行渲染,X服务器只负责显示。由于 Xft字体 的渲染在客户端完成,所以它可以动态的加载,而不需要随同X服务器一同启动

字体服务器:当客户端请求字体时,X服务器将请求转发到字体服务器,由字体服务器查找字体,并使用 freetype 引擎渲染,将结果传回X服务器,X服务器进行显示

/etc/X11/xorg.conf 中可以配置X核心字体的搜索路径

Section "Files"

FontPath "/usr/X11R6/lib/X11/fonts/misc/"

FontPath "/usr/X11R6/lib/X11/fonts/Type1/"

FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"

FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"

FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"

EndSection   

3.Module

“Module”Section主要用来告诉X Server应加载哪些模块。这些模块可以提供额外的服务功能,一般并不需要更改此处的值。此处使用的惟一选项为“Load”,它可用来加载模块。

Identifier:设置设备的名称。通常这些名称后面都会加上一个数字,第一个设备的数字为0。例如,第一个键盘的IdentifierKeyboard0

Driver:告诉X Server应该从哪里加载驱动程序。

Xorg 可以透過 I2C/DDC來得知該寬螢幕所支援的解析度等相關資訊, 因此就能正確偵測出該螢幕所能支援的頻率、解析度。

若驅動程式並未包括 ModeLine 訊息的話, 那麼就要為 Xorg 做些設定才行。

Load "freetype"
Load "glx"

GLX extension 也稱為 libglx,在 X server 中透過 GLX protoco l 對應用程式提供 OpenGL 

context 服務,保留給硬體廠商實做或 Xorg 自行處理。NVIDIA closed source driver 即處理此動作,直接對應到硬體加速呼叫。

# old bitmap font support (no longer needed as of xorg7.x)

Load    "bitmap"

# a collection of X protocol extensions that you want but shouldn't even be loadable

Load    "extmod"

# to load freetype fonts and type 1 fonts

Load    "freetype"

Load    "type1"

# layer below vbe that emus x86 real mode so you can call into vbios

# vesa bios interface for card setup stuff

Load    "int10"

Load    "vbe"

# serial bus over which you speak the ddc protocol to get info from the monitor

Load    "i2c"

Load    "ddc"

# direct rendering infrastructure which makes opengl go fast

Load    "dri"

# glx and glcore implement opengl

Load    "glx"

Load    "GLcore"

# double buffering extension (no apps use?)

#       Load    "dbe"

# 1 of 3 extensions for application automation (unneeded -- most things use xtest from extmod)

#       Load    "record"

- glx   : support for OpenGL rendering;

- dri   : support in the X server for DRI (Direct Rendering Infrastructure)

- vbe   : support for VESA BIOS Extensions. Allows to query the monitor capabilities via the video card;                                                       

- ddc   : support for Data Display Channel, respectively. Allows to query the monitor capabilities via the video card;

- int10 : real-mode x86 emulator used to softboot secondary VGA cards. Should be enabled if vbe is enabled;                                                              

- dbe   : enables the double-buffering extension in the server. Useful for animation and video operations;                                                         

- extmod: enables many traditional and commonly used extensions, such as shaped windows, shared memory, video mode switching, DGA, and Xv;

- record: implements the RECORD extension, often used in server testing;

- bitmap: font rasterizer (so are freetype, and type1 modules).

4.Monitor

“Monitor”Section用于设置系统使用的显示器类型,设置此处选项时应特别留意,因为不适当的设置可能会给显示器造成损害。

以下是此区块的系统默认值,以及可供使用的选项说明:

Section "Monitor"

Identifier "Generic Monitor"

Option "DPMS"

HorizSync 28-51

VertRefresh 43-60

EndSection

Identifier:显示器的惟一名称。在这些名称后面都会加上一个数字,而第一个显示器的代表数字为0Monitor0

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值