![Skylake 集成显卡在 15.10 上无法运行](https://linux22.com/image/879429/Skylake%20%E9%9B%86%E6%88%90%E6%98%BE%E5%8D%A1%E5%9C%A8%2015.10%20%E4%B8%8A%E6%97%A0%E6%B3%95%E8%BF%90%E8%A1%8C.png)
过去几天我一直在网上搜索,试图让我的 Intel i5-6400 上的集成显卡正常工作,但至今没有成功。
我正在运行全新的 Ubuntu 15.10,并安装了 4.3.4 内核。我的 AMD R9 380 运行良好(使用开源驱动程序),但我想将其传递到虚拟机,因此我需要让集成的 i915 GPU 工作。
我有一个显示器,用 DVI 连接到 R9 380,用 VGA 线连接到集成显卡。在“显示”设置面板中,只检测到一个显示器,而实际上应该有两个。
有人知道如何修复这个问题吗?
当前内核:
$ uname -r
4.3.4-040304-generic
已识别集成 GPU:
$ dmesg | grep -i i915
5:[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.3.4-040304-generic root=/dev/mapper/vg--raid-lv--linux ro nomdmonddf nomdmonisw i915.preliminary_hw_support=1 intel_iommu=on
197:[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.3.4-040304-generic root=/dev/mapper/vg--raid-lv--linux ro nomdmonddf nomdmonisw i915.preliminary_hw_support=1 intel_iommu=on
748:[ 0.869204] i915 0000:00:02.0: enabling device (0000 -> 0003)
902:[ 1.485539] [drm] Initialized i915 1.6.0 20150731 for 0000:00:02.0 on minor 1
903:[ 1.524441] i915 0000:00:02.0: fb1: inteldrmfb frame buffer device
1063:[ 119.646979] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
$ sudo lshw -enable pci -class display
*-display
description: VGA compatible controller
product: Tonga PRO [Radeon R9 285/380]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:01:00.0
version: f1
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
configuration: driver=amdgpu latency=0
resources: irq:128 memory:c0000000-cfffffff memory:d0000000-d01fffff ioport:e000(size=256) memory:df100000-df13ffff memory:df140000-df15ffff
*-display
description: Display controller
product: Sky Lake Integrated Graphics
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm bus_master cap_list
configuration: driver=i915 latency=0
resources: irq:129 memory:de000000-deffffff memory:b0000000-bfffffff ioport:f000(size=64)
Display Server: X.Org
上面的内容对我来说看起来都很好。但是,以下命令显示确实存在问题。请注意以says开头的行FAILED: intel
。
$ inxi -b
System: Host: anthony-linux Kernel: 4.3.4-040304-generic x86_64 (64 bit) Desktop: Xfce 4.12.3
Distro: Ubuntu 15.10 wily
Machine: System: Gigabyte product: N/A
Mobo: Gigabyte model: H110M-S2H-CF v: x.x Bios: American Megatrends v: F1 date: 09/08/2015
CPU: Quad core Intel Core i5-6400 (-MCP-) speed/max: 799/3300 MHz
Graphics: Card-1: Intel Sky Lake Integrated Graphics
Card-2: Advanced Micro Devices [AMD/ATI] Tonga PRO [Radeon R9 285/380]
Display Server: X.Org 1.17.2 drivers: ati (unloaded: fbdev,vesa,radeon) FAILED: intel
Resolution: [email protected]
GLX Renderer: Gallium 0.4 on AMD TONGA (DRM 3.1.0, LLVM 3.6.2) GLX Version: 3.0 Mesa 11.0.2
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
Drives: HDD Total Size: 2060.4GB (22.5% used)
RAID: Devices: 1: /dev/md1 2: /dev/md0
Info: Processes: 247 Uptime: 41 min Memory: 1223.8/15993.4MB Client: Shell (bash) inxi: 2.2.16
编辑1:以下是人们要求的更多详细信息:
$ dpkg -l xserver-xorg-video-intel
ii xserver-xorg-video-intel 2:2.99.917+git20150808-0ubuntu4 amd64 X.Org X server -- Intel i8xx, i9xx display driver
编辑2:这是 xrandr 输出。请注意,AMD R9 380 有 1 个 DisplayPort、1 个 HDMI 和 2 个 DVI 输出。iGPU 有 1 个 VGA、1 个 DVI 和 1 个 HDMI。不确定为什么这里只列出了一个 DVI 输出,但很明显 iGPU 输出不在那里,因为 VGA 应该在列表中。
$ xrandr | grep connected
2:DisplayPort-1 disconnected (normal left inverted right x axis y axis)
3:HDMI-3 disconnected (normal left inverted right x axis y axis)
4:DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
编辑3:但系统似乎确实知道输出:
$ ls -l /sys/class/drm
total 0
lrwxrwxrwx 1 root root 0 Jan 24 18:51 card0 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-HDMI-A-2 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-HDMI-A-3 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-3
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-DP-2 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DP-2
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-DVI-D-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DVI-D-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-DVI-I-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DVI-I-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-HDMI-A-4 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-HDMI-A-4
lrwxrwxrwx 1 root root 0 Jan 24 18:53 controlD64 -> ../../devices/pci0000:00/0000:00:02.0/drm/controlD64
lrwxrwxrwx 1 root root 0 Jan 24 18:53 controlD65 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/controlD65
lrwxrwxrwx 1 root root 0 Jan 24 18:53 renderD128 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD128
lrwxrwxrwx 1 root root 0 Jan 24 18:53 renderD129 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD129
lrwxrwxrwx 1 root root 0 Jan 24 18:53 ttm -> ../../devices/virtual/drm/ttm
-r--r--r-- 1 root root 4.0K Jan 24 18:53 version
编辑4:在启动过程中,iGPU 输出似乎可以正常工作。我dmesg
在启动过程中获得了输出,但它在某个时刻停止了。iGPU 的输出在[dmr]
以下以 开头的行之后停止。以 开头的行在fbcon
其上不可见:
$ dmesg | grep -A3 "\[drm\] fb"
[ 1.357205] [drm] fb mappable at 0xC0C73000
[ 1.357810] [drm] vram apper at 0xC0000000
[ 1.358418] [drm] size 7299072
[ 1.359027] [drm] fb depth is 24
[ 1.359653] [drm] pitch is 6912
[ 1.360531] fbcon: amdgpudrmfb (fb1) is primary device
[ 1.360532] fbcon: Remapping primary device, fb1, to tty 1-63
以下是整个 Xorg.0.log 的内容:http://pastebin.com/BprgEdSj。下面是一些片段。第一个似乎都与 AMD GPU 有关:
$ grep '(EE)' /var/log/Xorg.0.log
15: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
73:[ 26.937] (EE) Failed to load module "fglrx" (module does not exist, 0)
123:[ 27.200] (EE) Failed to load module "fglrx" (module does not exist, 0)
751:[ 29.273] (EE) modeset(0): [DRI2] No driver mapping found for PCI device 0x1002 / 0x6939
752:[ 29.273] (EE) modeset(0): Failed to initialize the DRI2 extension.
756:[ 29.277] (EE) AIGLX: reverting to software rendering
以下是我手动挑选的一些部分:
$ less /var/log/Xorg.0.log (then manual copy/paste)
[ 27.200] (II) LoadModule: "intel"
[ 27.201] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 27.201] (II) Module intel: vendor="X.Org Foundation"
[ 27.201] compiled for 1.17.2, module version = 2.99.917
[ 27.201] Module class: X.Org Video Driver
[ 27.201] ABI class: X.Org Video Driver, version 19.0
[ 27.201] (II) UnloadModule: "intel"
[ 27.201] (II) Unloading intel
[ 27.201] (II) Failed to load module "intel" (already loaded, 0)
...
[ 27.210] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
...
[ 27.211] (II) intel(G0): Using Kernel Mode Setting driver: i915, version 1.6.0 20150731
[ 27.211] (II) intel(G0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20150808-0ubuntu4 (Robert Ancell <[email protected]>)
[ 27.211] (II) intel(G0): SNA compiled for use with valgrind
答案1
$ xrandr | grep connected
2:DisplayPort-1 disconnected (normal left inverted right x axis y axis)
3:HDMI-3 disconnected (normal left inverted right x axis y axis)
4:DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
Xorg 仅知道 3 个视频输出。
$ ls -l /sys/class/drm
total 0
lrwxrwxrwx 1 root root 0 Jan 24 18:51 card0 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-HDMI-A-2 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card0-HDMI-A-3 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-3
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-DP-2 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DP-2
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-DVI-D-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DVI-D-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-DVI-I-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-DVI-I-1
lrwxrwxrwx 1 root root 0 Jan 24 18:53 card1-HDMI-A-4 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1/card1-HDMI-A-4
内核已检测到 2 个视频卡,且均有多个输出。
$ grep '(EE)' /var/log/Xorg.0.log
751:[ 29.273] (EE) modeset(0): [DRI2] No driver mapping found for PCI device 0x1002 / 0x6939
752:[ 29.273] (EE) modeset(0): Failed to initialize the DRI2 extension.
756:[ 29.277] (EE) AIGLX: reverting to software rendering
AMD R9 285 卡已恢复使用软件渲染,因为无法识别 PCI ID 1002:6939。您可以通过升级 Radeon 驱动程序来解决这个问题,但对于 VGA 直通,您实际上不需要 Xorg 即可工作。
$ `grep 'Monitor name' /var/log/Xorg.0.log
[ 29.080] (II) modeset(0): Monitor name: W2252
[ 29.173] (II) intel(G0): Monitor name: W2252
两个驱动程序都检测到了监视器。
对于 AMD GPU 的 VGA 直通,您需要 Xorg 仅使用 Intel GPU。您可以创建一个xorg.conf
仅配置 Intel 设备的设备(Xorg :0 -configure
然后编辑并删除对 AMD 设备的引用)。或者,只需删除正在使用的非 Intel 驱动程序(apt-get purge xserver-xorg-video-modesetting
在本例中) - 但请注意,如果您没有视频,您可能必须从 USB 启动才能重新安装此包。
但在这种情况下,问题已通过配置 BIOS/UEFI 以使用 Intel iGPU 作为 POST 的默认选项而得到解决。这可能表明问题是由 Linux Skylake init 代码中的错误引起的,如果 BIOS 已经初始化了显示器,它会正确设置显示器,否则会失败。