Intel graphics (简体中文)

From ArchWiki
Revision as of 12:42, 23 December 2012 by Fengchao (Talk | contribs) (Update link)

Jump to: navigation, search

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Intel graphics (简体中文)#)

Tango-preferences-desktop-locale.png本页面需要更新翻译,内容可能已经与英文脱节。要贡献翻译,请访问简体中文翻译组Tango-preferences-desktop-locale.png

附注: please use the first argument of the template to provide more detailed indications.
概要 help replacing me
Intel图形显示卡/芯片组

介绍

关于在终端(不使用X)里的使用 ,参看Uvesafb

由于Intel对X.Org开源驱动的支持,并且随着X11的逐步完善,现在所需做的基本上是即插即用。

型号

很多人都错误的以为,“Intel 945G”和“Intel GMA 945”只是不同名字的同一种显示芯片。实际上,后者是不存在的。Intel用“GMA”来表示图形核心,即GPU。除此以外的任何命名其实是主板芯片组的型号,象“915G”、“945GM”、“G965”或者“G45”。

较为常见的GPU和相应的主板芯片组有:

  • Intel GMA 900 (910, 915)
  • Intel GMA 950 (945)

“i810”芯片组(再次声明,是主板,不是GPU)是十分老旧的,在9xx产品线以前制造的,GMA板载图形卡品牌的开山之作。同样的, 910、915和945芯片组的名字也包含了i前缀。

详细列表可参看this

驱动

安装

先安装 Xorg,然后安装位于官方软件仓库xf86-video-intel-uxaxf86-video-intel-sna 软件包。UXA仍然是受推荐的加速架构。SNA则推荐 Sandy Bridge CPU 用户使用,它更新一些,并且可以作为UXA驱动不能正常工作时的替代品。Phoronix 对 Sandy Bridge 的评测可以在这里找到,Ivy Bridge 的则在这里

64 位系统需要安装[multilib] 源中的lib32-intel-dri才能在 32 位程序中使用加速功能。

配置

自从换用了HAL后没必要做任何形式的配置了。详情可参看Xorg input hotplugging

还有一件应该一开始就做的事就是(非配置步骤)将你的用户加入到相关的用户组中:

~# gpasswd -a username video

KMS (Kernel Mode Setting)

取自forums。 (你也可以参考here中的另一种方式,使得你可以保留当前的image。)

2.6.29中的KMS还是有点毛病,所以我们没有缺省开启它。 用户可以自行开启它,不过需要一点技巧。 要注意的是,KMS目前仅在使用i915 DRM驱动的芯片组下可以运行。 如果你使用KMS,那么缺省的加速方式为UXA。

早启动

你必须修改initramfs,KMS将会在kernel启动之后、Arch的initscripts脚本运行之前启用(效果看起来不错)

1) 将以下内容加入到/etc/modprobe.d/modprobe.conf:

options i915 modeset=1

2) 象下面这样修改/etc/mkinitcpio.conf中的MODULES和FILES(不要真的加上“...”,它表示原有的内容):

MODULES="... intel_agp i915"
FILES="... /etc/modprobe.d/modprobe.conf"

3) 重新生成initramfs

mkinitcpio -p linux

4) 删除/boot/grub/menu.lst中kernel命令行里所有的“vga=”和“video=”选项。

现在你会得到一个本地分辨率(native resolution)的framebuffer,X将启动得更快,终端可以即时切换, 如果要取消这个设置(当发生问题时),只需要注释调modprobe.conf相应的内容,再次重新生成initramfs即可。

晚启动

1) 加入以下内容到/etc/modprobe.d/modprobe.conf:

options i915 modeset=1

2) 修改/etc/rc.conf中的MODULES行(不要真的加上“...”,它表示原有的内容):

MODULES=(... intel_agp i915)

这是必须的,否则 i915 会在X服务器启动时加载,然后系统会崩溃。 i915模块不会自动加载with our kernel configuration (这很诡异,不过我们没法改变它)。

3) 删除/boot/grub/menu.lst中kernel命令行里所有的“vga=”和“video=”选项。

使用方法

改变分辨率

也许你已经有GUI界面可以做这件事,并且它对LCD无效(它仅在最佳分辨率下最顺眼),不过无论如何:

xrandr -s 1280x1024

你可以将它加入到~/.xinitrc文件中。

过时信息

Modelines

使用gtf生成数值,然后编辑/etc/X11/xorg.conf,加入(范例)以下类似内容到"Monitor"部分:

Section "Monitor"
  Identifier "Monitor0"
  VendorName "GenericVendor"
  Modeline "800x600" 40.12 800 848 968 1056 600 601 605 628 #60Hz
EndSection

最后,加入以下内容“Device”部分,替换已有的“Driver”值:

  VideoRam 229376
  Option "CacheLines" "1980"
  Driver "intel"

计算VideoRam值

Note: You must calculate your own value for VideoRam based on your hardware. The VideoRam (in Kilobytes) is calculated by the difference between your prefetchable memory available and any non-prefetchable memory required by the card as provided by the output of "lspci -vv". Example:

00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Integrated Graphics Controller (rev 04) (prog-if 00 [VGA controller])

       Subsystem: Dell Device 0179
       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
       Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
       Latency: 0
       Interrupt: pin A routed to IRQ 16
       Region 0: Memory at dff00000 (32-bit, non-prefetchable) [size=512K]
       Region 1: I/O ports at e898 [size=8]
       Region 2: Memory at c0000000 (32-bit, prefetchable) [size=256M]
       Region 3: Memory at dfec0000 (32-bit, non-prefetchable) [size=256K]
       Expansion ROM at <unassigned> [disabled]
       Capabilities: [d0] Power Management version 2
               Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
               Status: D0 PME-Enable- DSel=0 DScale=0 PME-
       Kernel modules: intelfb

Prefetchable memory is 256M or 262144K, The non-prefetchable is 512K+256K=764K. So the correct value for VideoRam is:

262144 - 764 = 261380

(To convert your prefetchable in megabytes to kilobytes, it's just megabytes * 1024)

Smooth Compositing

Xorg configuration is relatively straightforward, but to ensure you have smooth compositing effects from Compiz on the Intel 945GM, you will need to add these lines into your Device section:

As the intel driver does not support XAA anymore you should not add the XAA stuff.

Option      "DRI"                    "True"
Option      "NoDDC"                  "True"
Option      "XAANoOffscreenPixmaps"  "True"
Option      "EnablePageFlip"         "True"
Option      "RenderAccel"            "True"
Option      "AccelMethod"            "XAA"

And ensure that you have the following somewhere:

Section "Extensions"
   Option "Composite" "Enable"
EndSection

Native 1400x1050

Install the driver:

# pacman -S xf86-video-i810

Edit your xorg.conf file:

Section "Device"
   Driver "i810"
...
 Section "Screen"
     SubSection "Display"
               Depth     16
               Modes "1400x1050" "1280x1024" "800x600"
...

Install the resolution tool:

# pacman -S 915resolution

Log out (Template:Keypress + Template:Keypress + Template:Keypress) and back in, then:

915resolution -l

Select the modes that you want to overwrite - like 49 and 45 in this case. If your needs differ, adjust accordingly:

915resolution 45 1280 1024 16
915resolution 49 1400 1050 16

Verify your changes:

915resolution -l

Restart X again. Remember, you will want to load 915resolution at startup:

  • Edit /etc/conf.d/915resolution
 # Enter the VBIOS mode to patch
 MODE="49"
 
 # Enter the desired resolution
 RESOLUTION="1400 1050"

Then add "915resolution" to the DAEMONS line in /etc/rc.conf.

过时的链接