我的Ubuntu 8.04默认安装完成之后,默认的分辨率虽然为1024x768,可是刷新率只有60Hz,把眼睛闪得太难受了。
按照资料显示,应该是运行配置程序的时候,会配置需要使用的分辨率的,但是,在我的电脑上,从来没有见到过这个过程。
/etc/X11/xorg.conf文件的内容就事下面这样,非常的奇怪:
代码: 全选
1 # xorg.conf (X.Org X Window System server configuration file)
2 #
3 # This file was generated by dexconf, the Debian X Configuration tool, using
4 # values from the debconf database.
5 #
6 # Edit this file with caution, and see the xorg.conf manual page.
7 # (Type "man xorg.conf" at the shell prompt.)
8 #
9 # This file is automatically updated on xserver-xorg package upgrades *only*
10 # if it has not been modified since the last upgrade of the xserver-xorg
11 # package.
12 #
13 # If you have edited this file but would like it to be automatically updated
14 # again, run the following command:
15 # sudo dpkg-reconfigure -phigh xserver-xorg
16
17 Section "InputDevice"
18 Identifier "Generic Keyboard"
19 Driver "kbd"
20 Option "XkbRules" "xorg"
21 Option "XkbModel" "pc105"
22 Option "XkbLayout" "us"
23 EndSection
24
25 Section "InputDevice"
26 Identifier "Configured Mouse"
27 Driver "mouse"
28 Option "CorePointer"
29 Option "Emulate3Buttons" "true"
30 EndSection
31
32 Section "Device"
33 Identifier "Configured Video Device"
34 Driver "i810"
35 EndSection
36
37 Section "Monitor"
38 Identifier "Configured Monitor"
39 EndSection
40
41 Section "Screen"
42 Identifier "Default Screen"
43 Monitor "Configured Monitor"
44 Device "Configured Video Device"
45 EndSection
46
47 Section "ServerLayout"
48 Identifier "Default Layout"
49 Screen "Default Screen"
50 EndSection
在这个情况下,刷新率就只有60可以选择。
后来,搜索了一些资料,知道可以在这个配置文件的Monitor字段中添加一个Modeline语句来指定特殊的分辨率以及刷新率。
添加方法为:
代码: 全选
$ gtf 1024 768 75.0
运行这条命令会得到一个Modeline数据。
2.添加Modeline到xorg.conf文件中,在Section Monitor下面添加:
代码: 全选
HorizSync
VertRefresh
Option “dpms”
Modeline "1024x768_75.0" 81.80 1024 1080 1192 1360 768 769 772 802 -HSync +Vsync
代码: 全选
1 # xorg.conf (X.Org X Window System server configuration file)
2 #
3 # This file was generated by dexconf, the Debian X Configuration tool, using
4 # values from the debconf database.
5 #
6 # Edit this file with caution, and see the xorg.conf manual page.
7 # (Type "man xorg.conf" at the shell prompt.)
8 #
9 # This file is automatically updated on xserver-xorg package upgrades *only*
10 # if it has not been modified since the last upgrade of the xserver-xorg
11 # package.
12 #
13 # If you have edited this file but would like it to be automatically updated
14 # again, run the following command:
15 # sudo dpkg-reconfigure -phigh xserver-xorg
16
17 Section "InputDevice"
18 Identifier "Generic Keyboard"
19 Driver "kbd"
20 Option "XkbRules" "xorg"
21 Option "XkbModel" "pc105"
22 Option "XkbLayout" "us"
23 EndSection
24
25 Section "InputDevice"
26 Identifier "Configured Mouse"
27 Driver "mouse"
28 Option "CorePointer"
29 EndSection
30
31 Section "Device"
32 Identifier "Configured Video Device"
33 EndSection
34
35 Section "Monitor"
36 Identifier "Configured Monitor"
37 HorizSync 28.0-81.0
38 VertRefresh 43.0-80.0
39 Option "dpms"
40 Modeline "1024x768_75.0" 81.80 1024 1080 1192 1360 768 769 772 802 -HSync +Vsync
41 EndSection
42
43 Section "Screen"
44 Identifier "Default Screen"
45 Monitor "Configured Monitor"
46 Device "Configured Video Device"
47 EndSection
48
49 Section "ServerLayout"
50 Identifier "Default Layout"
51 Screen "Default Screen"
52 EndSection
HorizSync 28.0-81.0
VertRefresh 43.0-80.0
这两行数据我也不知道怎么得到的,只是从网络上原样Copy到我的配置文件中去(当然,现在我知道什么原因了~参看后面的ddcprobe命令输出中的monitorrange)。
OK,现在重启X(Ctrl + Alt + Backspace),在首选项里就可以修改刷新率为75.0和70.0了。
这样,虽然可以使用75.0Hz,但是在我的电脑上,还有问题。在75.0Hz的情况下,屏幕右边缘不能完全显示,就是会有一个黑色的竖条,好难看,没办法,将就着70.0Hz用吧。
今天下午,再一次找了一些关于xorg的配置、分辨率与刷新率的资料。
有以下一些相关的程序:
ddcprobe: 属于xresprobe包,可以检测显卡及支持的分辨率与刷新率
在我的电脑上,输出如下:
代码: 全选
vbe: VESA 3.0 detected.
oem: Intel(r) 82945G Chipset Family Graphics Chip Accelerated VGA BIOS
vendor: Intel Corporation
product: Intel(r) 82945G Chipset Family Graphics Controller Hardware Version 0.0
memory: 7872kb
mode: 1280x1024x256
mode: 1280x1024x64k
mode: 1280x1024x16m
mode: 1024x768x256
mode: 1024x768x64k
mode: 1024x768x16m
mode: 640x480x16m
mode: 800x600x64k
mode: 800x600x16m
mode: 640x480x256
mode: 800x600x256
mode: 640x480x64k
edid: �������������
edid: 1 1
id: 8080
eisa: @DE8080
serial: 00000bac
manufacture: 2 2003
input: sync on green, analog signal.
screensize: 31 23
gamma: 2.200000
dpms: RGB, active off, no suspend, standby
timing: 720x400@70 Hz (VGA 640x400, IBM)
timing: 720x400@88 Hz (XGA2)
timing: 640x480@60 Hz (VGA)
timing: 640x480@67 Hz (Mac II, Apple)
timing: 640x480@72 Hz (VESA)
timing: 640x480@75 Hz (VESA)
timing: 800x600@56 Hz (VESA)
timing: 800x600@60 Hz (VESA)
timing: 800x600@75 Hz (VESA)
timing: 832x624@75 Hz (Mac II)
timing: 1024x768@87 Hz Interlaced (8514A)
timing: 1024x768@60 Hz (VESA)
timing: 1024x768@70 Hz (VESA)
timing: 1024x768@75 Hz (VESA)
timing: 1280x1024@75 (VESA)
ctiming: 1280x1024@60
ctiming: 1024x768@85
ctiming: 800x600@85
ctiming: 640x480@85
dtiming: 640x480@130
monitorname:
monitorname: EX700F+
monitorrange: 30-70, 50-135
代码: 全选
$ xrandr -s 1024x768 -r 75.0
xdebconfigurator: 基于自动的HW检测为dexconf生成debconf数据
还有一个方法是使用:
代码: 全选
$ sudo dpkg-reconfigure xserver-xorg
网上的资料好多都是使用这个方法来重新配置Xorg的,但是在我的电脑上重新配置的结果就是重新回到最原始的状态,刷新率低得要命,无法改变。
折腾了很久,尝试了很多方法,但是都没有什么结果,不是刷新率上不来,就是”rate out of range”,直接花屏,郁闷啊!
后来,突然想到,我之前使用Puppy Linux的时候,显示效果很好,而且分辨率与刷新率的可调范围都很大,于是,就又重启了一下,启动到U盘上的Puppy Linux中,看了以下它自动产生的xorg.conf配置,与Ubuntu中的配置有很大的差异。
所以就把它拷贝到Ubuntu下面,并进行了一些必要的小修改,重启。
OK,太完美了,分辨率可调范围成为640x480—1680x1050,1024x768分辨率下的刷新率可调范围为60Hz, 70Hz, 75Hz, 85Hz,其他模式下的分辨率有60Hz,75Hz等。
使用 $ xrandr 命令查看:
代码: 全选
$ xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1680 x 1680
VGA connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 85.0 + 75.0* 70.1 60.0
1680x1050 60.0
1600x1024 60.0
1400x1050 60.0
1280x1024 60.0
1440x900 60.2
1280x960 60.0
1280x800 60.0
1152x864 75.0
1280x768 60.0
1152x768 54.8
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 72.8 75.0 59.9
没有添加注释的都是没有做过任何修改的地方(以#号注释的如果后面没有我的注释的话,就是Puppy Linux中配置文件自带的注释)。
注意,由于里面涉及到一些pci接口以及一些具体的硬件参数,所以只能作为参考之用,切不可直接拷贝到其他电脑上直接使用,否则可能驱动不起来。
代码: 全选
1 #Special base config file used in Puppy Linux.
2
3 # **********************************************************************
4 # Module section -- this section is used to specify
5 # which dynamically loadable modules to load.
6 # **********************************************************************
7 #
8 Section "Module"
9
10 # This loads the DBE extension module.
11
12 Load "dbe" # Double buffer extension
13
14 # This loads the miscellaneous extensions module, and disables
15 # initialisation of the XFree86-DGA extension within that module.
16 SubSection "extmod"
17 Option "omit xfree86-dga" # don't initialise the DGA extension
18 EndSubSection
19
20 # This loads the font modules
21 Load "type1"
22 Load "freetype"
23
24 # This loads xtrap extension, used by xrandr
25 Load "xtrap"
26
27 # This loads the GLX module (if present)
28 Load "glx"
29
30 # This loads dri module (if present)
31 Load "dri"
32
33 EndSection
34
35 # **********************************************************************
36 # Files section. This allows default font and rgb paths to be set
37 # **********************************************************************
38
39 Section "Files"
40
41 # The location of the RGB database. Note, this is the name of the
42 # file minus the extension (like ".txt" or ".db"). There is normally
43 # no need to change the default.
44
45 # RgbPath "/usr/X11R7/lib/X11/rgb"(被我注释掉了,因为我发现自己的/usr/X11R6/(Ubuntu8.04是X11R6,不是X11R7,没有Puppy Linux新)目录下根本就没有lib目录,其他的字体也没有,同样紧接下来的FontPath也是被我注释掉的)
47 # Multiple FontPath entries are allowed (which are concatenated together),
48 # as well as specifying multiple comma-separated entries in one FontPath
49 # command (or a combination of both methods)
50
51 # FontPath "/usr/X11R7/lib/X11/fonts/misc/"(注释掉)
52 # FontPath "/usr/X11R7/lib/X11/fonts/Type1/"(注释掉)
53 # FontPath "/usr/X11R7/lib/X11/fonts/TTF/"(注释掉)
54
55 EndSection
56
57 # **********************************************************************
58 # Server flags section.
59 # **********************************************************************
60
61 Section "ServerFlags"
62
63 # Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence
64 # (where n is 1 through 12). This allows clients to receive these key
65 # events.
66
67 # Option "DontVTSwitch"
68
69 # Enables mode switching with xrandr
70 # There is a report that this can cause Xorg not to work on some
71 # video hardware, so default is commented-out...
72 # but i want to use it in xorgwizard so leave on...
73
74 Option "RandR" "on"
75
76 EndSection
77
78 #everything past here is auto-generated by Puppy's Xorg Wizard...
79
80
81 Section "ServerLayout"
82 Identifier "X.org Configured"
83 Screen 0 "Screen0" 0 0
84 InputDevice "Mouse0" "CorePointer"
85 InputDevice "Keyboard0" "CoreKeyboard"
86 EndSection
87
88 Section "InputDevice"
89 Identifier "Keyboard0"
90 Driver "kbd"
91 Option "XkbRules" "xorg"
92 Option "XkbModel" "pc105"(这里从pc102改到了pc105,因为在之前的配置中,都是pc105,而且没有出现问题,所以我认为它应该事pc105)
93 Option "XkbLayout" "us" #xkeymap0
94 EndSection
95
96 Section "InputDevice"
97 Identifier "Mouse0"
98 Driver "mouse"
99 Option "CorePointer"
100 #Option "Protocol" "auto" #mouse0protocol(注释掉,因为第一次没有注释掉的时候登录,鼠标无法使用,而原本的配置没有这些,鼠标可以使用)
101 #Option "Device" "/dev/mouse"(注释掉,原因同上)
102 #Option "Emulate3Buttons"
103 #Option "Emulate3Timeout" "50"
104 #Option "ZAxisMapping" "4 5" #scrollwheel
105 EndSection
106
107 Section "Monitor"
108 Identifier "Monitor0"
109 VendorName "Monitor Vendor"
110 ModelName "Monitor Model"
111 HorizSync 30-70(这里注意,和ddcprobe命令的输出中的monitorrange有关,也就是这个范围一定要在monitorrange后面的第一个范围之内,否则可能花屏(rate out of range))
112 VertRefresh 50-85(同样,这个范围需要在monitorrange后面的第二个范围之内)
113 #UseModes "Modes0" #monitor0usemodes
114 Option "PreferredMode" "1024x768"
115 EndSection
116
117 Section "Modes"
118 Identifier "Modes0"
119 #modes0modeline0
120 EndSection
121
122 Section "Device"
123 ### Available Driver options are:-
124 ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
125 ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
126 ### [arg]: arg optional
127 #Option "NoAccel" # [<bool>]
128 #Option "SWcursor" # [<bool>]
129 #Option "ColorKey" # <i>
130 #Option "CacheLines" # <i>
131 #Option "Dac6Bit" # [<bool>]
132 #Option "DRI" # [<bool>]
133 #Option "NoDDC" # [<bool>]
134 #Option "ShowCache" # [<bool>]
135 #Option "XvMCSurfaces" # <i>
136 #Option "PageFlip" # [<bool>]
137 Identifier "Card0"
138 Driver "intel" #card0driver
139 VendorName "Intel Corporation"
140 BoardName "82945G/GZ Integrated Graphics Controller"
141 BusID "PCI:0:2:0"
142 EndSection
143
144 Section "Screen"
145 Identifier "Screen0"
146 Device "Card0"
147 Monitor "Monitor0"
148 DefaultDepth 24
149 Subsection "Display"
150 Depth 24
151 Modes "1024x768"
152 EndSubsection
153 EndSection
154
155 #PuppyHardwareProfile=Intel_r__82945G_Chipset30_70_50_135