Intel图形卡
From ArchWiki
Article summary |
---|
Intel图形显示卡/芯片组 |
可用语言 |
English |
Italiano |
简体中文 |
Contents |
介绍
关于在终端(不使用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。
驱动
- intel (最新最好的)
- intel-legacy (较旧过时的)
在退回使用legacy版本前,你应该最好使用一下最新驱动,(加上KMS,稍后说明)。在任何情况之下,都无需xorg.conf。最经常的抱怨是GMA 950/945(GM)及之前的系列,新驱动的2D和3D慢得惊人。不过,现在看来已经不是这样了。当前一般的比较(并不很可靠):
--------------- | 2D Rendering | glxgears (FPS w/ Compiz) | glxgears (FPS w/o Compiz) | Games (w/ Compiz) | Games (w/o Compiz) | Blender (w/ Compiz) | Blender (w/o Compiz) |
---|---|---|---|---|---|---|---|
intel w/ KMS | Good | 200~ | 800~ (stopped via WM) | OK | Slightly Faster (stopped via WM) | Slightly Slow | OK (stopped via WM) |
intel-legacy | Fair | 300~ | 900~ (disabled via Xorg) | Slow | OK (disabled via Xorg) | OK | Smooth (disabled via Xorg) |
pre-intel * | Good | 900~ | 1500~ (disabled via Xorg) | Slow | Smooth (disabled via Xorg) | Slow | Smooth (disabled via Xorg) |
"Compiz"指的是"compositing","pre-intel"指的是"i810; XGL Era".
如果上述信息在某些案例中完全相反,也不会令人惊讶,特别是拥有较高频率和内存速度的桌面芯片组。不过通常,公认的Linux下的瓶颈是驱动本身。
安装
在安装了xorg之后安装:
# pacman -S xf86-video-intel
或者
# pacman -S xf86-video-intel-legacy
配置
自从换用了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) 用"mkinitcpio -p kernel26"重新生成initramfs。
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 (Ctrl + Alt + Backspace) 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.