|
|

楼主 |
发表于 2009-6-27 16:50:03
|
显示全部楼层
Intel集成显卡平台升级到 kernel-2.6.30 xorg-server-1.6
参照楼上的意见,把 Kernel, xorg-server, mesa 做了升级。内核中开启了KMS,重新启用"xorg.conf"文件,去掉了driconf。升级以后 3D 性能提高,能流畅地玩 ut2004-demo。但是稳定性欠佳,有一些问题需要解决——ut2004经常会freeze,需要拔电源重启;无法用 Ctrl+Alt+F1~F6 切换到终端;compiz-fusion的CPU占用率还是稍高,并且会freeze。
[升级]
因为我懒,这部分没有使用 overlay。我使用的都是 Gentoo 官方 portage ~x86 分支中的包。添加到 package.keywods 中的包有:
sys-kernel/gentoo-sources ~x86
x11-base/xorg-server ~x86
x11-drivers/xf86-video-intel ~x86
app-admin/eselect-opengl ~x86
x11-libs/libXfont ~x86
x11-proto/randrproto ~x86
app-admin/eselect ~x86
x11-libs/libdrm ~x86
media-libs/mesa ~x86
x11-apps/mesa-progs ~x86
先编译的内核,顺利通过;然后升级xorg-server;接着升级/重新编译X相关的驱动程序和应用程序,比如xf86-video-intel,mesa,都很顺利地完成了。最后再运行module-rebuild rebuild重新编译vmware-modules模块,revdep-rebuild检查链接关系。目前系统上 kernel, xorg-server, mesa 的版本是:
sys-kernel/gentoo-sources-2.6.30-r1 (CONFIG_DRM_I915_KMS=y)
x11-base/xorg-server-1.6.1.901-r4 (USE=hal input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 nptl video_cards_intel xorg)
x11-drivers/xf86-video-intel-2.7.1 (USE=dri)
media-libs/mesa-7.4.4 (USE=nptl video_cards_intel xcb)
这回我又重新开始使用 xorg.conf , 有些 Option 还是要写进去的。X之前在没有 xorg.conf 的状态下工作良好,但是3D性能完全没有被发挥出来。参考《Gentoo用户手册》,这个 xorg.conf 文件先由 X -configure 自动生成,然后在此基础上修改——添加UXA选项、设置分辨率和色深等。完整的xorg.conf文件贴在帖子最后。
重启之前我先把 xdm 从 default runlevel 中去掉——我担心出现这种情况:X起来后无法操作键盘鼠标,不能切换到终端下。
[效果]
重启,新内核顺利启动。到了命令提示符下,启动 xdm,熟悉的登录界面出来了。登入,没什么问题。显示正常,运行 glxgears
$ glxinfo | grep -i direct
direct rendering: Yes
$ glxinfo | grep -i gem
OpenGL renderer string: Mesa DRI Intel(R) G45/G43 GEM 20090418 2009Q1 x86/MMX/SSE2
$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately 1/7562842 the monitor refresh rate.
4862 frames in 5.0 seconds = 972.400 FPS
4591 frames in 5.0 seconds = 918.111 FPS
4857 frames in 5.0 seconds = 971.223 FPS
4845 frames in 5.0 seconds = 968.890 FPS
4782 frames in 5.0 seconds = 956.272 FPS
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
after 122794 requests (122793 known processed) with 0 events remaining.
最后这段error不是很靠谱,望高人解释一下。
用 VLC 看了会儿电影,很正常。又手痒开了一下 compiz-fusion, 比以前情况好一些,挺流畅。玩了 ut2004-demo,很流畅。3D性能提升非常明显。
[问题]
虽然给了些惊喜,但是还不很完善。我发现不能用 Ctrl+Alt+F1~F6切换到终端下了。更具体地说:我按X按下Ctrl+Alt+F1,则画面不动(多了一些斑驳的彩色条纹),鼠标键盘无反应;再按Ctrl+Alt+F7又会到X下,Xorg的log没有增加内容。compiz-fusion 开的特效非常少,只用到了:窗口装饰+静态程序切换,在切换用户程序的时候CPU占用率在20%左右(CPU是Intel E7400)。ut2004玩着玩着会卡住,完全不能进行任何操作,也不能切换到终端。这时我只能长按机箱的关机健关机。下次开机的时候会多花十几秒扫描文件系统日志。
不知其他兄弟的情况如何?有没有好的解决方案?现在我只能等更新。
[附: 完整的 xorg.conf 文件 InputDevice被注释; compiz被注释]
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
# InputDevice "Mouse0" "CorePointer"
# InputDevice "Keyboard0" "CoreKeyboard"
## for compiz
# Option "AIGLX" "true"
EndSection
## for compiz
# Section "Extensions"
# Option "Composite" "Enable"
# EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/OTF"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/100dpi/"
FontPath "/usr/share/fonts/75dpi/"
EndSection
Section "Module"
Load "dbe"
Load "dri"
Load "dri2"
Load "extmod"
Load "glx"
Load "record"
EndSection
# Section "InputDevice"
# Identifier "Keyboard0"
# Driver "kbd"
# EndSection
# Section "InputDevice"
# Identifier "Mouse0"
# Driver "mouse"
# Option " rotocol" "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: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" "True"
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option " ageFlip" # [<bool>]
Option "AccelMethod" "UXA"
# Option "Tiling" "False"
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "4 Series Chipset Integrated Graphics Controller"
BusID " CI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1440x900"
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 |
|