Intel Graphics
From ArchWiki
Article summary |
---|
Information on Intel Graphics Cards/Chipsets |
Languages |
English |
Italiano |
简体中文 |
Contents |
Introduction
For use within the console (without X), see Uvesafb.
Since Intel supports X.Org with open-source drivers, and with X11's improvement over time, things now are essentially just plug-and-play.
Models
It is a popular mistake to think of "Intel 945G" and "Intel GMA 945" as being the same graphics chip with different names. As a matter of fact, the latter does not exist. Intel uses "GMA" to indicate the graphics core, or the GPU. Anything other than that is actually the model of the motherboard chipset, like "915G", "945GM", "G965" or "G45".
The more common GPUs and their corresponding motherboard chipsets are:
- Intel GMA 900 (910, 915)
- Intel GMA 950 (945)
The "i810" chipset (again, motherboard; not GPU) is actually really old and was manufactured long before the 9xx product line with which the GMA onboard-graphics branding began. Similarly, alternative names for the 910, 915 and 945 chips may include the i prefix.
See this for a list.
Drivers
- intel (Latest and greatest)
- intel-legacy (Old and obsolete)
It is highly recommended that you try the latest driver (plus KMS; see further below) before falling back to the legacy one.
Installation
Prerequisite: Xorg
# pacman -S xf86-video-intel
OR
# pacman -S xf86-video-intel-legacy
Configuration
There is no need for any kind of configuration ever since HAL has taken over. See Xorg input hotplugging for more information.
One thing that you should have already done from the start (not a configuration step per se) is to add your user to the relevant group:
# gpasswd -a username video
KMS (Kernel Mode Setting)
Previously, setting up the video card was the job of the X server. Because of this, it was not easily possible to have fancy graphics in virtual consoles. Also, each time a switch from X to a virtual console was made (Ctrl+Alt+F1), the server had to give control over the video card to the kernel, which was slow and caused flickering. The same "painful" process happened when the control was given back to the X server (Ctrl+Alt+F7).
With Kernel Mode Setting (KMS) , the kernel is now able to set the mode of the video card. This makes fancy graphics during bootup, virtual console and X fast switching possible, among other things.
KMS is a new technology which is still considered experimental at this time due to its incomplete support for all video cards. It is usable and stable for many, but as with all newer software, the possibility of bugs exists.
Several methods of enabling KMS exist. Note that for ANY method you use, you should ALWAYS disable any "vga=" and "video=" options in your bootloader. Also, it only works with chipsets that use the i915 DRM driver. The default acceleration under KMS is UXA.
The prefered way of enabling KMS is the Early start with the Simplest method.
Early start
By earlier start it is meant that KMS will kick-in right after grub. So almost all of the boot process will be done at native resolution. If you have a high resolution monitor, text will appear small.
Simplest method
This method is simple because you tell the kernel to use KMS from your bootloader. Because of this, it is easy to disable it temporarily for whatever reason you might have.
First, edit your boot loader configuration file and append "i915.modeset=1" to your "kernel" line. If you use grub (as probably everybody else), you should have an entry in /boot/grub/menu.lst like this:
# (0) Arch Linux title Arch Linux root (hd0,0) kernel /boot/vmlinuz26 root=/dev/[...] [...] i915.modeset=1 initrd /boot/kernel26.img
Note that "[...]" means anything already there, as it should change from installation to installation. Note that you should NOT have ANY video= or vga= argument AT ALL!!!
Second, add intel_agp and i915 modules to the MODULES line in /etc/mkinitcpio.conf:
MODULES="[...] intel_agp i915"
After editing the file, you need to recreate the img file. this is being done by using the command "mkinitcpio -g filename" The default img file in arch is /boot/kernel26.img. If you ever want to disable KMS, you can simply you can change the "i915.modeset" option to 0 in grub, without rebuilding anything. For this, turn on the machine and when you see grub's screen, hit a key to disable the timeout. Select the kernel you want to boot (probably the one already selected) and hit "e" for "edit". Now select the line starting with "kernel" and hit again "e" for editing. You can now edit the i915.modeset option and disable KMS by setting it to 0. Press enter and then "b" to boot. Note that this will be temporary, so at next reboot it will be enable again.
Alternative method
This requires rebuilding the initramfs each time you want to disable/enable KMS so can be tricky if for some reason KMS prevents the machine from booting...
First, add the following line to /etc/modprobe.d/modprobe.conf:
options i915 modeset=1
To disable modesetting with this alternative method (in case something is broken), just comment that line and regenerate your initramfs again.
Secondly, change the MODULES and FILES lines in /etc/mkinitcpio.conf to look like this (Don't actually add the "...", it stands for what was there before):
MODULES="[...] intel_agp i915" FILES="[...] /etc/modprobe.d/modprobe.conf"
Note for both "Simplest" and "Alternative"
For any of the two previous, you also need to regenerate your initramfs using
mkinitcpio -p kernel26
Again, make sure you remove all "vga=" and "video=" options from your kernel commandline in /boot/grub/menu.lst.
You should now get a framebuffer in your native resolution, X will launch faster and console switching will work almost instantly.
'Late' start
1) Add the following line to /etc/modprobe.d/modprobe.conf:
options i915 modeset=1
2) Change the MODULES line in /etc/rc.conf to look like this (Don't actually add the "...", it stands for what was there before):
MODULES=([...] intel_agp i915)
This is important. If you don't do it like this, the i915 driver will be loaded when the X server launches and things will crash. The i915 module is not autoloaded with our kernel configuration (which is weird, but we can't change it).
Again, remove all "vga=" and "video=" options from your kernel commandline in /boot/grub/menu.lst
See also
Some forums posts worth reading: http://bbs.archlinux.org/viewtopic.php?pid=522665#p522665 http://bbs.archlinux.org/viewtopic.php?id=69083
Usage
Change Resolution
You probably already have a GUI to do it, and it's useless for LCDs (they're only best at their optimal resolution), but anyway:
xrandr -s 1280x1024
You may add it to the ~/.xinitrc file.
Obsolete Information
Modelines
Use gtf to generate the values and then edit /etc/X11/xorg.conf, adding (for example) those values to the "Monitor" section:
Section "Monitor" Identifier "Monitor0" VendorName "GenericVendor" Modeline "800x600" 40.12 800 848 968 1056 600 601 605 628 #60Hz EndSection
Lastly, add the following to the "Device" section, replacing the existing "Driver" value if present:
VideoRam 229376 Option "CacheLines" "1980" Driver "intel"
Calculating your VideoRam Value
Note: According to the intel manpage, calculating your VideoRam manually is only necessary if you use a i810/i815 chipset. Any later version of the driver automatically sizes its memory allocation according to the features it needs to support, and therefore ignores the VideoRam option.
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
If Compiz works really slow, make sure your video card isn't blacklisted. To find out you need to follow steps on this page: http://forlong.blogage.de/entries/pages/Compiz-Check - it worked for me with Intel X3100 and now Compiz works really good. Remember glxgears isn't benchmark, I have only 300 FPS on that and Compiz works great (playing 1280x720 movie and having fun with the cube rotate in the meantime works fine - fast enough).
Native 1400x1050
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.