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

From ArchWiki
Jump to: navigation, search
m (See also)
(wikify some external links, use https for archlinux.org)
(15 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表]]
  
 
=== 驅動程式 ===
 
=== 驅動程式 ===
Line 35: Line 42:
  
 
== 安裝 ==
 
== 安裝 ==
須: [[Xorg]]
+
前罝套件: [[Xorg]]
 
   
 
   
 +
執行
 +
 
  # pacman -S xf86-video-intel
 
  # pacman -S xf86-video-intel
  
Line 45: Line 54:
 
== 配置 ==
 
== 配置 ==
  
自從有了HAL之後,便無須任何的配置即可使用。
+
當有安裝 HAL 套件時, 便無須任何的配置即可使用。
[[Xorg_input_hotplugging|Xorg input hotplugging]]了解更多
+
更多資訊請參閱[[Xorg_input_hotplugging|Xorg input hotplugging]]
  
 
但請記得把你的使用者加入對應的群組:
 
但請記得把你的使用者加入對應的群組:
  
  # gpasswd -a username video
+
  # gpasswd -a ''username'' video
  
 
== KMS (核心模式設定) ==
 
== KMS (核心模式設定) ==
  
[[KMS]]以藉由 i915 DRM 驅動程式來支援Intel的晶片,同時核心版本2.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)解析度之下。
  
'''重要!!''' 在啟動KMS的狀況下,你''必須''從/boot/grub/menu.lst的核心命令列中移除任何 "vga=" or "video=" 參考值。
+
'''注意''':在啟動KMS的狀況下,你''必須''從/boot/grub/menu.lst的核心命令列中移除任何 "vga=" or "video=" 參數值。
  
=== 早期啟動 ===
+
把 /etc/mkinitcpio.conf 的 MODULES="[...]" 中加入 {{Ic|intel_agp}} 和 {{Ic|i915}} 模組:
KMS是在內核自舉(bootstrapped)後初始化。然而KMS也可以在自舉(bootstrap)的過程中開啟,而使整個開機流程在一個正常的解析度下進行。目前有下列兩個方法可以達到此目的。
+
  
==== 最簡便的方法 ====
+
MODULES="'''intel_agp i915'''"
因為本方法在bootloader中開啟KMS,所以較為簡便。此方法也可以在需要的時候輕易地暫時關閉KMS。
+
  
一、編輯開機載入配置(boot loader configuration)在核心列的最後加上"i915.modeset=1"。
+
再重建 initramfs:
 +
# mkinitcpio -p linux
  
例:
+
如果你想要停用 KMS,不需要重建任何東西,只要編輯[[GRUB]]的 {{ic|/boot/grub/menu.lst}} 在kernel的參數列加入 '''i915.modeset=0'''. See [[kernel parameters]].
使用[[GRUB]]並在/boot/grub/menu.lst:中做此調整
+
  
# (0) Arch Linux
+
如果你想要停用 KMS 而不需編輯menu.lst,你可以在開機看到grub選單時,按下任何鍵使其停止倒數,在欲修改的選單項目前按"e"去編輯。然後再選取"kernel"列,再壓"e"後加入"'''i915.modeset=0'''"。改完之後,按"enter"確認,再按"b"即可以停用KMS方式啟動核心。切記這方法只適用於單次暫時停用KMS,之後再開機KMS仍會設為啟用。需要永久性設為停用請修改{{ic|/boot/grub/menu.lst}}。
title  Arch Linux
+
root  (hd0,0)
+
kernel /boot/vmlinuz26 root=/dev/... '''i915.modeset=1'''
+
initrd /boot/kernel26.img
+
  
二、在/etc/mkinitcoip.conf中的MODULES=""加入'''intel_agp''' 和 '''i915'''
+
=== 其他 ===
MODULES="'''intel_agp i915'''"
+
* [[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]
  
三、再製造 initramfs
+
== 提示與技巧 (翻譯中) ==
$ sudo mkinitcpio -p kernel26
+
  
如果你想要停用KMS,只需要把grub中"i915.modeset"值改0即可,並不需要重建任何東西。你可以在看到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 <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>.
  
此方法,再你每次想要改變是否啟用KMS時,都需要再製造initramfs。因此,可能會在你想要在開機時即停用KMS時造成不便。
+
=== 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.
  
ㄧ、在/etc/modprobe.d/modprobe.conf 中加入 options i915 modeset=1
+
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
如果是要停用則註解掉這行(加#於行首),在重新製造initramfs即可。
+
  
二、把/etc/mkinitcpio.conf的MODULES="[...]"中加入'''intel_agp i915'''",FILES="[...]“中加入 '''/etc/modprobe.d/modprobe.conf'''",[...]代表其可能有其他內容,請不要真的把...加入
+
{{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:
  
三、再製造 initramfs
+
{{Ic|pacman -S acpid}}
$ sudo mkinitcpio -p kernel26
+
  
=== 其他 ===
+
After that place acpid before hal in DAEMONS section of your {{ic|/etc/rc.conf}} file. 
* [[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]
+
Than create a file {{ic|/etc/acpi/actions/reset-display.sh}} with the following contents:
* Arch Linux forums: [http://bbs.archlinux.org/viewtopic.php?pid=522665#p522665 Intel 945GM, Xorg, Kernel - performance]
+
 
 +
  #!/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.