昨天,经过六个月的稳定运行,我将 Debian 10 盒子升级到了 Debian 4.19.98-1+deb10u1 (2020-04-27)。我正在该机器上运行 KVM 虚拟机管理程序和 Windows 10 Pro 作为虚拟机。 Win VM 使用来自 Intel(R) Core(TM) i5-9600K CPU 的 i915 图形适配器。这种设置相对简单,而且工作起来很有魅力。
虚拟机管理器中的 PCI 直通仍然有效(即可以识别 PCI 地址并且可以将适配器添加到 VM),但 Windows 只将 PCI 图形设备识别为通用“视频控制器”,并且无法为其找到合适的驱动程序。我认为该问题可能与 Debian 无法正确识别 PCI 设备有关。
Debian 系统日志在升级过程中出现以下消息引起了我的注意,但我不完全理解这些 *ERROR* 消息具体与什么相关。显然,它与 i915 显卡有关,但到底是什么问题呢?我知道没有连接显示器(我使用 RDP 连接到 Windows 10 Pro VM...)。
任何建议将不胜感激。
Aug 15 10:56:10 server kernel: [9133931.108810] vfio-pci 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
Aug 15 10:56:10 server kernel: [9133931.129199] DMAR: Setting identity map for device 0000:00:02.0 [0x8b800000 - 0x8fffffff]
Aug 15 10:56:10 server kernel: [9133931.129248] [drm] VT-d active for gfx access
Aug 15 10:56:10 server kernel: [9133931.129249] [drm] Replacing VGA console driver
Aug 15 10:56:10 server kernel: [9133931.130210] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Aug 15 10:56:10 server kernel: [9133931.130211] [drm] Driver supports precise vblank timestamp query.
Aug 15 10:56:10 server kernel: [9133931.131579] i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_04.bin
Aug 15 10:56:10 server kernel: [9133931.131912] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
Aug 15 10:56:11 server kernel: [9133932.247060] [drm] failed to retrieve link info, disabling eDP
Aug 15 10:56:11 server kernel: [9133932.247340] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well always-on refcount/domain refcount mismatch (refcount
8/domains refcount 0)
Aug 15 10:56:11 server kernel: [9133932.247352] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well DC off refcount/domain refcount mismatch (refcount 8/
domains refcount 0)
Aug 15 10:56:11 server kernel: [9133932.247363] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well power well 2 state mismatch (refcount 8/enabled 0)
Aug 15 10:56:11 server kernel: [9133932.247372] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well power well 2 refcount/domain refcount mismatch (refco
unt 8/domains refcount 0)
Aug 15 10:56:11 server kernel: [9133932.247382] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well DDI A/E IO power well refcount/domain refcount mismatch (refcount 8/domains refcount 0)
Aug 15 10:56:11 server kernel: [9133932.247392] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well DDI B IO power well refcount/domain refcount mismatch (refcount 8/domains refcount 0)
Aug 15 10:56:11 server kernel: [9133932.247401] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well DDI C IO power well refcount/domain refcount mismatch (refcount 8/domains refcount 0)
Aug 15 10:56:11 server kernel: [9133932.247411] [drm:intel_power_domains_verify_state [i915]] *ERROR* power well DDI D IO power well refcount/domain refcount mismatch (refcount 8/domains refcount 0)
Aug 15 10:56:11 server kernel: [9133932.261129] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.261765] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.262406] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.263041] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.263682] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.264355] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.265029] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.265679] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.266374] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.267072] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.267751] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.268436] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.269117] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.269814] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.270511] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.271192] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.271870] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.272542] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.273258] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.273952] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.274605] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.275284] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.275972] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.276592] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.277287] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.277981] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.278682] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.279458] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.280238] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.280986] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.281725] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.282517] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0x00000000
Aug 15 10:56:11 server kernel: [9133932.282593] [drm] Initialized i915 1.6.0 20180719 for 0000:00:02.0 on minor 2
Aug 15 10:56:11 server kernel: [9133932.283978] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
Aug 15 10:56:11 server kernel: [9133932.284039] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input31
Aug 15 10:56:11 server kernel: [9133932.284142] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Aug 15 10:56:11 server kernel: [9133932.301972] [drm] Cannot find any crtc or sizes
Aug 15 10:56:11 server kernel: [9133932.319310] [drm] Cannot find any crtc or sizes
Aug 15 10:56:11 server kernel: [9133932.336871] [drm] Cannot find any crtc or sizes
dmesg | grep i915
我还附上了重启后 i915 图形适配器似乎被识别的片段。有趣的是,只有当我在启动过程中连接显示器时才会出现这种情况,否则相同的命令将返回 nil。是不是在没有连接显示器的情况下 Debian 无法识别或禁用 i915 显卡?
有什么方法可以防止 Linux 在没有连接显示器时停用图形适配器吗?
Aug 15 13:13:49 server kernel: [ 1.749350] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
Aug 15 13:13:49 server kernel: [ 1.749376] i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_04.bin
Aug 15 13:13:49 server kernel: [ 1.749661] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
Aug 15 13:13:49 server kernel: [ 2.298395] [drm] Initialized i915 1.6.0 20180719 for 0000:00:02.0 on minor 0
Aug 15 13:13:49 server kernel: [ 3.235635] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
更新
我刚刚意识到 Debian 不再使用我之前安装的非免费 Intel 显卡驱动程序,从这个 lshw 片段可以看出,它也只使用通用 Intel 驱动程序:
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=vfio-pci latency=0
resources: irq:134 memory:aa000000-aaffffff memory:90000000-9fffffff ioport:6000(size=64) memory:c0000-dffff
更新2
在注意到“初学者的错误”之后又向前迈出了一步。我应该跑apt-get dist-upgrade
,而不仅仅是apt-get upgrade
。现在系统正在运行Debian 4.19.132-1 (2020-07-24)。
我清除并重新安装firmware-misc-nonfree
,但即使我只有“已经是最新版本(20190114-2)”。这真的是最新版本吗?但 i915 驱动程序似乎被 Debian 识别(参见倒数第二行):
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:132 memory:aa000000-aaffffff memory:90000000-9fffffff ioport:6000(size=64) memory:c0000-dffff
更新3
即使从buster-backports安装了整个firmware-linux-nonfree软件包后:
deb http://deb.debian.org/debian buster-backports main contrib non-free
apt-get update
apt-get -t buster-backports install firmware-linux-nonfree
我无法像更新之前一样将图形适配器正确移交给 Windows。 :(
我注意到的一件事是日期20180719当我运行时在第 4 行dmesg | grep i915
:
[ 1.791551] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[ 1.791733] i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_04.bin
[ 1.799002] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[ 3.684845] [drm] Initialized i915 1.6.0 20180719 for 0000:00:02.0 on minor 0
[ 4.856056] i915 0000:00:02.0: fb1: inteldrmfb frame buffer device
[ 5.601611] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
虽然apt list --installed | grep nonfree
返回日期20190717:
firmware-linux-nonfree/buster-backports,now 20190717-2~bpo10+1 all [installed]
firmware-misc-nonfree/buster-backports,now 20190717-2~bpo10+1 all [installed]