Difference between revisions of "Intel graphics (正體中文)"

From ArchWiki
Jump to: navigation, search
m
(wikify some external links, use https for archlinux.org)
(22 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
[[Category: 正體中文]]
 +
[[Category: Graphics (正體中文)]]
 +
[[Category: X Server (正體中文)]]
 +
[[Category: HOWTOs (正體中文)]]
 +
{{translateme}}
 +
[[cs:Intel]]
 +
[[en:Intel]]
 +
[[es:Intel]]
 +
[[fr:Intel]]
 +
[[hu:Intel]]
 +
[[it:Intel]]
 +
[[ru:Intel]]
 +
[[zh-CN:Intel]]
 
{{Article summary start| Summary}}
 
{{Article summary start| Summary}}
{{Article summary text|Information on Intel Graphics Cards/Chipsets}}
+
{{Article summary text|Intel顯示卡及晶片資訊}}
{{Article summary heading|Languages}}
+
{{i18n_entry|English|Intel}}
+
{{i18n_entry|Italiano|Intel (Italiano)}}
+
{{i18n_entry|简体中文|Intel (简体中文)}}
+
{{i18n_entry|正體中文|Intel (正體中文)}}
+
 
{{Article summary end}}
 
{{Article summary end}}
  
[[Category: Graphics (English)]][[Category: X Server (English)]][[Category: HOWTOs (English)]]
+
''在終端機下使用(不使用X視窗),請參閱[[Uvesafb]].''
[[Category: Graphics (正體中文)]][[Category: X Server (正體中文)]][[Category: HOWTOs (正體中文)]]
+
  
 
== 前言 ==
 
== 前言 ==
''在終端機下使用(不使用X視窗),請同時注意[[Uvesafb]].''
+
自從 Intel 提供並支援開源驅動後,Intel的顯示卡現在已能隨插即用。
 
+
自從 Intel 支援開源驅動後,Intel的顯卡大致上為接上即啟用。
+
  
 
=== 模組 ===
 
=== 模組 ===
一般常把"Intel 945G"和"Intel GMA 945"視為相同的顯示晶片。實際上,"intel GMA 945"並不存在。Intel使用"GMA"代表繪圖核心,即GPU。任何不含"GMA"的都是主機板晶片,像"915G","945GM","G45"都屬主機板晶片。
+
一般常把"Intel 945G"和"Intel GMA 945"視為相同的顯示晶片。
 +
實際上,"intel GMA 945"並不存在。Intel使用"GMA"代表繪圖核心,即GPU。
 +
任何不含"GMA"的都是'''主機板晶片''',像"915G","945GM","G45"都屬主機板晶片。
  
 
常見的繪圖核心與其對應的主機板晶片如下:
 
常見的繪圖核心與其對應的主機板晶片如下:
Line 26: Line 33:
 
"i810"(主機板晶片,非GPU)是非常舊的晶片,其製造時間比9xx主機板晶片系列還早。相同的,910, 915, 945晶片的名字可能會在前面加個"i"
 
"i810"(主機板晶片,非GPU)是非常舊的晶片,其製造時間比9xx主機板晶片系列還早。相同的,910, 915, 945晶片的名字可能會在前面加個"i"
  
列表詳見[http://en.wikipedia.org/wiki/Intel_GMA#Table_of_GMA_graphics_cores_and_chipsets this]
+
列表詳見[[Wikipedia:Intel_GMA#Table_of_GMA_graphics_cores_and_chipsets | Intel_GMA表]]
  
=== Drivers ===
+
=== 驅動程式 ===
* intel (latest and greatest)
+
* intel (最新且最佳的)
* intel-legacy (old and obsolete, incompatible with newer xorg-server implementations)
+
* intel-legacy (過時的,無法與新的 xorg-server 相容)
  
It is highly recommended that you try the latest driver before falling back to legacy support.
+
強烈建議優先使用較新的驅動程式。
  
== Installation ==
+
== 安裝 ==
Prerequisite: [[Xorg]]
+
前罝套件: [[Xorg]]
 
   
 
   
 +
執行
 +
 
  # pacman -S xf86-video-intel
 
  # pacman -S xf86-video-intel
  
OR
+
  
 
  # pacman -S xf86-video-intel-legacy
 
  # 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|Xorg input hotplugging]] for more information.
+
當有安裝 HAL 套件時, 便無須任何的配置即可使用。
 +
更多資訊請參閱[[Xorg_input_hotplugging|Xorg input hotplugging]]
  
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
+
  # gpasswd -a ''username'' video
  
== KMS (Kernel Mode Setting) ==
+
== KMS (核心模式設定) ==
  
[[KMS]] is supported by Intel chipsets that use the i915 DRM driver and is now enabled by default as of kernel v2.6.32.
+
[[KMS]]以藉由 i915 DRM 驅動程式來支援Intel的晶片,同時核心版本2.6.32預設為啟用。自xf86-video-intel 2.10版本開始[https://www.archlinux.org/news/484/ 強制啟用 KMS]。KMS通常是在核心被啟動(bootstrapped)後才被初始化。但也可以在核心啟動時就啟用 KMS,讓整個開機流程運作在原生(native)解析度之下。
  
'''Important:''' When using KMS, you ''must'' remove any references to "vga=" or "video=" from the kernel commandline in /boot/grub/menu.lst
+
'''注意''':在啟動KMS的狀況下,你''必須''從/boot/grub/menu.lst的核心命令列中移除任何 "vga=" or "video=" 參數值。
  
=== Early start ===
+
把 /etc/mkinitcpio.conf 的 MODULES="[...]" 中加入 {{Ic|intel_agp}} 和 {{Ic|i915}} 模組:
KMS is typically initialized after the kernel is bootstrapped. It is possible however to enable KMS during bootstrap itself, allowing the entire boot process to run at native resolution. There are currently two methods to achieve this:
+
  
==== Simplest method ====
+
MODULES="'''intel_agp i915'''"
This method is simple because it enables KMS in the bootloader. Using this method it is easy to disable KMS temporarily if/when necessary.
+
  
Edit the boot loader configuration file and append "i915.modeset=1" to your "kernel" line. For example, users of [[GRUB]] would add the option to /boot/grub/menu.lst:
+
再重建 initramfs:
  # (0) Arch Linux
+
  # mkinitcpio -p linux
title  Arch Linux
+
root  (hd0,0)
+
kernel /boot/vmlinuz26 root=/dev/... '''i915.modeset=1'''
+
initrd /boot/kernel26.img
+
  
Now add the '''intel_agp''' and '''i915''' modules to the MODULES line in /etc/mkinitcpio.conf:
+
如果你想要停用 KMS,不需要重建任何東西,只要編輯[[GRUB]]的 {{ic|/boot/grub/menu.lst}} 在kernel的參數列加入 '''i915.modeset=0'''. See [[kernel parameters]].
MODULES="'''intel_agp i915'''"
+
  
Finally, regenerate the initramfs:
+
如果你想要停用 KMS 而不需編輯menu.lst,你可以在開機看到grub選單時,按下任何鍵使其停止倒數,在欲修改的選單項目前按"e"去編輯。然後再選取"kernel"列,再壓"e"後加入"'''i915.modeset=0'''"。改完之後,按"enter"確認,再按"b"即可以停用KMS方式啟動核心。切記這方法只適用於單次暫時停用KMS,之後再開機KMS仍會設為啟用。需要永久性設為停用請修改{{ic|/boot/grub/menu.lst}}。
$ sudo mkinitcpio -p kernel26
+
  
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.
+
=== 其他 ===
 +
* [[KMS]] - Arch wiki article on kernel mode setting
 +
* Arch Linux forums: [https://bbs.archlinux.org/viewtopic.php?id=69083 HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel]
 +
* Arch Linux forums: [https://bbs.archlinux.org/viewtopic.php?pid=522665#p522665 Intel 945GM, Xorg, Kernel - performance]
  
==== 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:
+
=== Setting scaling mode ===
options i915 modeset=1
+
To disable mode-setting with this alternative method (in case something is broken), just comment that line and regenerate the 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):
+
This can be useful for some full screen applications.
  MODULES="[...] '''intel_agp i915'''"
+
xrandr --output LVDS1 --set PANEL_FITTING param
FILES="[...] '''/etc/modprobe.d/modprobe.conf'''"
+
where <tt>param</tt> can be
 +
* <tt>center</tt>: resolution will be kept exactly as defined, no scaling will be made,
 +
* <tt>full</tt>: scale the resolution so it uses the entire screen or
 +
* <tt>full_aspect</tt>: scale the resolution to the maximum possible but keep the aspect ratio.
 +
If it does not work, you can try
 +
  xrandr --output LVDS1 --set "scaling mode" param
 +
where <tt>param</tt> is one of <tt>"Full"</tt>, <tt>"Center"</tt> or <tt>"Full aspect"</tt>.
  
Now regenerate the initramfs:
+
=== Workaround for bug with opening laptop lid ===
$ sudo mkinitcpio -p kernel26
+
==== Solution #1 ====
 +
On laptops with Intel video chip you can face the issue with not working X display after you close lid to make the machine suspend and than open it back. See bug https://bugs.freedesktop.org/show_bug.cgi?id=24970 for more details.
  
=== See also ===
+
Here is a way to work it around. The recipe is based on similar one from Fedora "Common bugs" page: https://fedoraproject.org/wiki/Common_F12_bugs#Display_cannot_be_reactivated_if_it_enters_sleep_mode_with_laptop_lid_closed
* [[KMS]] - Arch wiki article on kernel mode setting
+
 
* Arch Linux forums: [http://bbs.archlinux.org/viewtopic.php?id=69083 HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel]
+
{{Note|This workaround will work only in single-user system, you can make it work for multiple users by adding procedure of checking which user put machine to suspend state.}}
* Arch Linux forums: [http://bbs.archlinux.org/viewtopic.php?pid=522665#p522665 Intel 945GM, Xorg, Kernel - performance]
+
Install acpid:
 +
 
 +
{{Ic|pacman -S acpid}}
 +
 
 +
After that place acpid before hal in DAEMONS section of your {{ic|/etc/rc.conf}} file.
 +
 
 +
Than create a file {{ic|/etc/acpi/actions/reset-display.sh}} with the following contents:
 +
 
 +
  #!/bin/bash
 +
  PATH="/bin:/usr/bin:/sbin:/usr/sbin"
 +
  export DISPLAY=:0.0
 +
  sleep 10
 +
  if grep open /proc/acpi/button/lid/LID/state
 +
  then
 +
    su "$(getent passwd $UID | cut -d: -f1)" -c "xrandr --output LVDS1 --off"
 +
    su "$(getent passwd $UID | cut -d: -f1)" -c "xrandr --output LVDS1 --auto"
 +
  fi
 +
 
 +
 
 +
where <tt>$UID</tt> is UID of the user who put laptop to suspend mode (you). The main difference from original Fedora method is <tt>sleep</tt> operator usage. Without it the lid button state will not be updated by the moment it checking by {{ic|reset-display.sh}} script, in some cases smaller delay (for example 3 seconds) will work when running on AC power and will not work with battery power, 10 seconds works always. Do not forget to make the script executable:
 +
 
 +
  #chmod +x /etc/acpi/actions/reset-display.sh
 +
 
 +
Than we need to assign the action to LID switch event. Add the following line to {{ic|/etc/acpi/handler.sh}} file under <tt>button/lid)</tt> code:
 +
 
 +
  /etc/acpi/actions/reset-display.sh
 +
 
 +
Now you can reboot your laptop or just restart daemons in the following order:
 +
 
 +
  #/etc/rc.d/hal stop
 +
  #/etc/rc.d/acpid start
 +
  #/etc/rc.d/hal start
 +
 
 +
==== Solution #2 ====
 +
 
 +
An easier, less reliable workaround is to simply re-suspend the computer and wake it again.  This will often correct the glitch and return the X desktop to a working state.
 +
 
 +
=== KMS Issue: console is limited to small area ===
 +
 
 +
One of the low-resolution video ports may be enabled on boot which is causing the terminal to utilize a small area of the screen.
 +
To fix, explicitly disable the port with an i915 module setting.  For example, add the following to the end of the kernel line in /boot/grub/menu.lst:
 +
 
 +
  video=SVIDEO-1:d
 +
 
 +
If that doesn't work, you may also try disabling TV1 or VGA1 instead of SVIDEO-1.

Revision as of 15:43, 4 December 2012

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Intel graphics (正體中文)#)
Template:Article summary start

Template:Article summary text Template:Article summary end

在終端機下使用(不使用X視窗),請參閱Uvesafb.

前言

自從 Intel 提供並支援開源驅動後,Intel的顯示卡現在已能隨插即用。

模組

一般常把"Intel 945G"和"Intel GMA 945"視為相同的顯示晶片。 實際上,"intel GMA 945"並不存在。Intel使用"GMA"代表繪圖核心,即GPU。 任何不含"GMA"的都是主機板晶片,像"915G","945GM","G45"都屬主機板晶片。

常見的繪圖核心與其對應的主機板晶片如下:

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

"i810"(主機板晶片,非GPU)是非常舊的晶片,其製造時間比9xx主機板晶片系列還早。相同的,910, 915, 945晶片的名字可能會在前面加個"i"

列表詳見 Intel_GMA表

驅動程式

  • intel (最新且最佳的)
  • intel-legacy (過時的,無法與新的 xorg-server 相容)

強烈建議優先使用較新的驅動程式。

安裝

前罝套件: Xorg

執行

# pacman -S xf86-video-intel

# pacman -S xf86-video-intel-legacy

配置

當有安裝 HAL 套件時, 便無須任何的配置即可使用。 更多資訊請參閱Xorg input hotplugging

但請記得把你的使用者加入對應的群組:

# gpasswd -a username video

KMS (核心模式設定)

KMS以藉由 i915 DRM 驅動程式來支援Intel的晶片,同時核心版本2.6.32預設為啟用。自xf86-video-intel 2.10版本開始強制啟用 KMS。KMS通常是在核心被啟動(bootstrapped)後才被初始化。但也可以在核心啟動時就啟用 KMS,讓整個開機流程運作在原生(native)解析度之下。

注意:在啟動KMS的狀況下,你必須從/boot/grub/menu.lst的核心命令列中移除任何 "vga=" or "video=" 參數值。

把 /etc/mkinitcpio.conf 的 MODULES="[...]" 中加入 intel_agpi915 模組:

MODULES="intel_agp i915"

再重建 initramfs:

# mkinitcpio -p linux

如果你想要停用 KMS,不需要重建任何東西,只要編輯GRUB/boot/grub/menu.lst 在kernel的參數列加入 i915.modeset=0. See kernel parameters.

如果你想要停用 KMS 而不需編輯menu.lst,你可以在開機看到grub選單時,按下任何鍵使其停止倒數,在欲修改的選單項目前按"e"去編輯。然後再選取"kernel"列,再壓"e"後加入"i915.modeset=0"。改完之後,按"enter"確認,再按"b"即可以停用KMS方式啟動核心。切記這方法只適用於單次暫時停用KMS,之後再開機KMS仍會設為啟用。需要永久性設為停用請修改/boot/grub/menu.lst

其他

提示與技巧 (翻譯中)

Setting scaling mode

This can be useful for some full screen applications.

xrandr --output LVDS1 --set PANEL_FITTING param

where param can be

  • center: resolution will be kept exactly as defined, no scaling will be made,
  • full: scale the resolution so it uses the entire screen or
  • full_aspect: scale the resolution to the maximum possible but keep the aspect ratio.

If it does not work, you can try

xrandr --output LVDS1 --set "scaling mode" param

where param is one of "Full", "Center" or "Full aspect".

Workaround for bug with opening laptop lid

Solution #1

On laptops with Intel video chip you can face the issue with not working X display after you close lid to make the machine suspend and than open it back. See bug https://bugs.freedesktop.org/show_bug.cgi?id=24970 for more details.

Here is a way to work it around. The recipe is based on similar one from Fedora "Common bugs" page: https://fedoraproject.org/wiki/Common_F12_bugs#Display_cannot_be_reactivated_if_it_enters_sleep_mode_with_laptop_lid_closed

Note: This workaround will work only in single-user system, you can make it work for multiple users by adding procedure of checking which user put machine to suspend state.

Install acpid:

pacman -S acpid

After that place acpid before hal in DAEMONS section of your /etc/rc.conf file.

Than create a file /etc/acpi/actions/reset-display.sh with the following contents:

 #!/bin/bash
 PATH="/bin:/usr/bin:/sbin:/usr/sbin"
 export DISPLAY=:0.0
 sleep 10 
 if grep open /proc/acpi/button/lid/LID/state
 then
   su "$(getent passwd $UID | cut -d: -f1)" -c "xrandr --output LVDS1 --off" 
   su "$(getent passwd $UID | cut -d: -f1)" -c "xrandr --output LVDS1 --auto" 
 fi


where $UID is UID of the user who put laptop to suspend mode (you). The main difference from original Fedora method is sleep operator usage. Without it the lid button state will not be updated by the moment it checking by reset-display.sh script, in some cases smaller delay (for example 3 seconds) will work when running on AC power and will not work with battery power, 10 seconds works always. Do not forget to make the script executable:

 #chmod +x /etc/acpi/actions/reset-display.sh

Than we need to assign the action to LID switch event. Add the following line to /etc/acpi/handler.sh file under button/lid) code:

 /etc/acpi/actions/reset-display.sh

Now you can reboot your laptop or just restart daemons in the following order:

 #/etc/rc.d/hal stop
 #/etc/rc.d/acpid start
 #/etc/rc.d/hal start

Solution #2

An easier, less reliable workaround is to simply re-suspend the computer and wake it again. This will often correct the glitch and return the X desktop to a working state.

KMS Issue: console is limited to small area

One of the low-resolution video ports may be enabled on boot which is causing the terminal to utilize a small area of the screen. To fix, explicitly disable the port with an i915 module setting. For example, add the following to the end of the kernel line in /boot/grub/menu.lst:

 video=SVIDEO-1:d

If that doesn't work, you may also try disabling TV1 or VGA1 instead of SVIDEO-1.