Chinaunix首页 | 论坛 | 博客
  • 博客访问: 627733
  • 博文数量: 227
  • 博客积分: 8017
  • 博客等级: 中将
  • 技术积分: 2069
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-08 22:50
文章分类

全部博文(227)

文章存档

2011年(10)

2010年(55)

2009年(28)

2008年(134)

我的朋友

分类: LINUX

2008-05-25 10:22:59

这几天因为要连接开发板, 可是我原来的机子有没有串口。 无奈只好放弃另换了一台Celeron 2.0G, 然后又去加了根512M DDR 400内存条。
接下来就是装linux, (我不喜欢在windows里用集成开发环境。)
先是装的ubuntu8.04, 可是很慢。
后来换成了ubuntu7.10, 弄了一下午,终于弄好了。 重启机子后却发现屏幕老是闪烁, 原来是显卡没有驱
#sudo apt-get install xserver-xorg-video-intel    #(Intel 845G主板)

安装好了,屏幕还是闪烁。 于是用图形操作去改刷新率, 却发现一开机就没有作用, 而且最高的默认刷新率只有70。  那只好改 /etc/X11/xorg.conf了
其实可以通过如下方式重新配置xorg.conf的
#sudo dpkg-reconfigure xserver-xorg

通过命令行取得刷新率对应的参数
# gtf 1024 768 75
   # 1024x768 @ 75.00 Hz (GTF) hsync: 60.15 kHz; pclk: 81.80 MHz
   Modeline "1024x768_75.00"  81.80  1024 1080 1192 1360  768 769 772 802  -HSync +Vsync

将该行加入到xorg.conf的 Section "Monitor" 中, 还有一些更改吧, 贴出来,省得我下次又忘记了:
##The content of xorg.conf

Section "Files"
EndSection

Section "InputDevice"
    Identifier    "Generic Keyboard"
    Driver        "kbd"
    Option        "CoreKeyboard"
    Option        "XkbRules"    "xorg"
    Option        "XkbModel"    "pc105"
    Option        "XkbLayout"    "us"
EndSection

Section "InputDevice"
    Identifier    "Configured Mouse"
    Driver        "mouse"
    Option        "CorePointer"
    Option        "Device"    "/dev/input/mice"
    Option        "Protocol"    "ImPS/2"
    Option        "ZAxisMapping"    "4 5"
    Option        "Emulate3Buttons"    "true"
EndSection

Section "InputDevice"
    Driver        "wacom"
    Identifier    "stylus"
    Option        "Device"    "/dev/input/wacom"
    Option        "Type"    "stylus"
    Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY
EndSection

Section "InputDevice"
    Driver        "wacom"
    Identifier    "eraser"
    Option        "Device"    "/dev/input/wacom"
    Option        "Type"    "eraser"
    Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY
EndSection

Section "InputDevice"
    Driver        "wacom"
    Identifier    "cursor"
    Option        "Device"    "/dev/input/wacom"
    Option        "Type"    "cursor"
    Option        "ForceDevice"    "ISDV4"# Tablet PC ONLY
EndSection

Section "Device"     ##显卡设备
    Identifier    "Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device"
    Boardname    "intel"
    Busid        "PCI:0:2:0"
    Driver        "intel"
    Screen    0
EndSection

Section "Monitor"  #显示器的信息
    Identifier    "Generic Monitor"
    Vendorname    "Generic CRT Display"
    Modelname    "Monitor 1024x768"
    Horizsync    31.5-61.0                  #这里据说可以改得更大一点, 那样就可以使用85MHz的刷新率了。
    Vertrefresh    50-75                  #接下来的两行指定显示器的显示模式
  Modeline "1024x768_75.00"  81.80  1024 1080 1192 1360  768 769 772 802  -HSync +Vsync #我不知道这两行
  modeline "1024x768@75"  81.80  1024 1080 1192 1360  768 769 772 802  -hsync +vsync      #哪个正确,都放上了
    Gamma    1.0
EndSection

Section "Screen"  ##一个显卡和一个显示器组合成一个screen,若还有一块显卡,其上也接一显示器则再加一Section “Screen”描述。
    Identifier    "Default Screen"
    Device        "Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device"
    Monitor        "Generic Monitor"
    Defaultdepth    24
    SubSection "Display"
        Depth    24
        Virtual 1024    768
        Modes        "1024x768@75"    "1280x960@60"    "832x624@75"    "800x600@60"    "800x600@75"    "800x600@72"    "800x600@56"    "640x480@75"    "640x480@72"    "640x480@60"
    EndSubSection
EndSection

Section "ServerLayout"   #若有两套独立的显卡显示器,则需在Section “ServerLayout”中对多个screen进行组织。
    Identifier    "Default Layout"
  screen 0 "Default Screen" 0 0
    Inputdevice    "Generic Keyboard"
    Inputdevice    "Configured Mouse"
   
    # Uncomment if you have a wacom tablet
    #    InputDevice     "stylus"    "SendCoreEvents"
    #    InputDevice     "cursor"    "SendCoreEvents"
    #    InputDevice     "eraser"    "SendCoreEvents"
EndSection
Section "Module"
    Load        "glx"
    Load        "GLcore"
    Load        "v4l"
EndSection
Section "ServerFlags"
EndSection

其他的通过man xorg.conf去慢慢看吧。


阅读(1036) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~