LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 11369|回复: 27

转载 关于调整刷新率得文章 很值得一看!

[复制链接]
发表于 2003-4-26 12:35:07 | 显示全部楼层 |阅读模式
原文出处:
http://thunder.prohosting.com/~x ... f86configsetup.html

我接触Linux有一年多了.Linux给我以优雅体面的感觉,在Linux下面工作,
心情都和在MS Windows下面不一样.
但是X Window 的刷新率一直是我心中的痛.我不知道用xf86config设置了多少
遍,xf86config的选择我背都背得
下来,但是X Window还是有闪烁感.我想X的设置怎么这么保守.因此,我喜欢Linux的
字符模式.上网只能在MS Windows下面了.前几天我痛下决心一定要把刷新率给搞
定,开始看有关X的文档.原来我误会了,XF86的目标就是充分地利用硬件,哪是什么
保守.是我自己不看文档.下面就是我认为最值得看的几篇文章:
/usr/X11R6/lib/X11/doc/README.Config
/usr/X11R6/lib/X11/doc/QuickStart.doc
/usr/X11R6/lib/X11/doc/VideoMode.doc

特别是最后那篇文章彻底解决了刷新率的问题.现在我就谈点体会.有什么不清楚的
话,请看原文.
先介绍一些术语:
HSF:显示器的水平扫描频率,单位是kHz
VSF:垂直刷新率,单位是Hz
显卡的"dot-clock",正式名称是driving clock frequency(DCF),它表示每秒钟能
向屏幕发出的象素数,单位是MHz
RR:刷新率(refresh rate)
HR:水平分辨率
VR:垂直分辨率
frame:帧,由于显示器的扫描枪扫描到屏幕边缘的时候不可能马上回来,会有一段调
整的时间,这时候它仍在
扫描,但对我们来说是不可见的.因此帧比HRxVR略大些.
HFL:帧宽,比HR略大些,经验HFL = 1.25HR
VFL:帧长,比VR略大些,经验VFL = 1.05VR

下面就是很重要的公式:
RR = DCF/(HFL*VFL)

HFL = DCF/HSF

或 HSF = DCF/HFL

我们的问题就是:在给定分辨率和刷新率的条件下,显卡的DCF是多少?水平扫描频率
(HSF)是多少,它是否超出了
显示器所能允许的最大水平扫描频率?
我们看到,在这里显卡的DCF不是问题,就是最一般的S3 Trio64V+的DCF也有135MHz,
瓶颈是显示器所能允许的最大水平扫描频率.我们在
启动X的时候会看到许多模式不能用,就是因为经过计算,水平扫描频率超出了显示
器所能允许的最大水平扫描频率.

事情还没有完:
在XF86Config文件里,有许多这样的行:
Mode "800x600" 55.2 800 832 1064 1096 600 602 610 630
也许写成这样看得更清楚些:
Mode "800x600" 55.2 800 832 1064 1096
                                600 602  610  630

Mode是关键词,引号中的800x600是名称,可以随便起. 55.2就是DCF,800和600当然
就是分辨率了,1096和630是
帧宽和帧长(HFL,VFL).中间两个数是什么意思呢?原来它们决定了同步脉冲的开始
位置和结束位置.
800 832 1064 1096 这组数可以这样理解:
水平分辨率是800,扫描枪扫到第800个象素的时候还要继续往前扫,到第832个象素
的时候,发出同步脉冲,该
脉冲持续一段时间,到第1064个象素的时候结束.扫描枪扫继续往前扫,到达帧宽的
时候返回到最左边,扫描下
一条线.
600 602 610 630是垂直方面的,也可以这样理解.这就是这组神密数字的含义.

自己从头生成一组这样的数字是挺麻烦的,我的做法是修改当前使用的模式,比如我
用的是xf86config自动生成的
800x600模式,但刷新率偏低.我就找到XF86Config文件中对应的行,直接增大DCF的
值,再计算一下:水平扫描频率HSF=DCF/HFL .只要水平扫描频率不超出显示器所能
允许的最大水平扫描频率就行.再到X Window中用xvidtune微调一下.
发表于 2003-4-26 17:28:00 | 显示全部楼层
嗯,很好。
发表于 2003-4-26 17:55:30 | 显示全部楼层
好!谢谢谢谢!
发表于 2003-5-3 14:53:59 | 显示全部楼层
这个应该可以参考Windows,加个菜单选择一下,方便大家嘛。
发表于 2003-5-4 23:09:23 | 显示全部楼层
我正需要他。
我是新手
大家多多关照哈
发表于 2003-5-5 01:21:09 | 显示全部楼层
xf86cfg 可以看到各种数值
发表于 2003-5-6 09:46:17 | 显示全部楼层
一起看吧
发表于 2003-5-6 17:39:18 | 显示全部楼层

这是我的xf86config~~ 

这是我的xf86config~~ 我的系统一近X就黑屏
请高手们帮帮我



# XFree86 4 configuration created by pyxf86config

Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "DevInputMice" "AlwaysCore"
EndSection

Section "Files"
# RgbPath is the location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.

        RgbPath      "/usr/X11R6/lib/X11/rgb"
        FontPath     "unix/:7100"
EndSection

Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "fbdevhw"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
        Load  "dri"
EndSection

Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
#        Option        "Xleds"                "1 2 3"

# To disable the XKEYBOARD extension, uncomment XkbDisable.
#        Option        "XkbDisable"

# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
#        Option        "XkbModel"        "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
#        Option        "XkbModel"        "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
#        Option        "XkbLayout"        "de"
# or:
#        Option        "XkbLayout"        "de"
#        Option        "XkbVariant"        "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
#        Option        "XkbOptions"        "ctrl:swapcaps"
# Or if you just want both to be control, use:
#        Option        "XkbOptions"        "ctrl:nocaps"
#
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option            "XkbRules" "xfree86"
        Option            "XkbModel" "pc105"
        Option            "XkbLayout" "us"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option            "rotocol" "S/2"
        Option            "Device" "/dev/psaux"
        Option            "ZAxisMapping" "4 5"
        Option            "Emulate3Buttons" "no"
EndSection

Section "InputDevice"
# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
        Identifier  "DevInputMice"
        Driver      "mouse"
        Option            "rotocol" "IMPS/2"
        Option            "Device" "/dev/input/mice"
        Option            "ZAxisMapping" "4 5"
        Option            "Emulate3Buttons" "no"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "DDCPROBED"
        DisplaySize  250        190
        HorizSync    30.0 - 50.0
        VertRefresh  50.0 - 100.0
        Option            "dpms"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "nv"
        VendorName  "Videocard vendor"
        BoardName   "NVIDIA GeForce 2 MX (generic)"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Depth     24
                Modes    "800x600" "640x480"
        EndSubSection
EndSection

Section "DRI"
        Group        0
        Mode         0666
EndSection
发表于 2003-10-24 11:28:35 | 显示全部楼层

我有救了,

我的也是刷新率太低,回去看看
发表于 2003-10-24 11:44:11 | 显示全部楼层
很好,顶一下!

这些服务谁能详细说明一下,都是干什么用的?

Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表