Standard-GPU-Gerät für Xorg / GDM nach PCI-Passthrough ändern?

746
Leonard Lee

Das Intel Corporation HD Graphics 510Gerät sollte für das Ubuntu-Hostsystem verwendet werden.

Das NVIDIA Corporation GP107Gerät war für den KVM-Gebrauch reserviert.

Das Ubuntu-Hostsystem kann nicht ordnungsgemäß verwendet werden Intel Corporation HD Graphics 510, um eine Verbindung zum X-Server herzustellen. Können wir das Problem umgehen?

Der sudo systemctl start gdmBefehl bewirkt, dass der TTY kontinuierlich blinkt und schwer zu verwenden ist.

Sudokatze / etc / default / grub | grep CMDLINE

GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity nouveau.runpm=0" GRUB_CMDLINE_LINUX="rd.modules-load=vfio-pci intel_iommu=on" 

cat /etc/modprobe.d/local.conf

options vfio-pci ids=10de:1c81,10de:0fb9 options vfio-pci disable_vga=1 

Sudo Update-Grub

Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.15.0-32-generic Found initrd image: /boot/initrd.img-4.15.0-32-generic Found linux image: /boot/vmlinuz-4.15.0-30-generic Found initrd image: /boot/initrd.img-4.15.0-30-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin done 

Sudo Update-Initramfs -u

update-initramfs: Generating /boot/initrd.img-4.15.0-32-generic 

systemctl neu starten

cat ~ / .local / share / xorg / Xorg.0.log

[ 876.205] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_3253 [ 876.206] (II) xfree86: Adding drm device (/dev/dri/card0) [ 876.208] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0 [ 876.214] (--) PCI: (0:0:2:0) 8086:1902:1462:7995 rev 6, Mem @ 0xdd000000/16777216, 0xb0000000/268435456, I/O @ 0x0000f000/64 [ 876.214] (--) PCI:*(0:1:0:0) 10de:1c81:1462:8c97 rev 161, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/131072 [ 876.214] (II) LoadModule: "glx" [ 876.214] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so 

lspci -tvnnk

-[0000:00]-+-00.0 Intel Corporation Skylake Host Bridge/DRAM Registers [8086:190f] +-01.0-[01]--+-00.0 NVIDIA Corporation GP107 [GeForce GTX 1050] [10de:1c81] | \-00.1 NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] +-02.0 Intel Corporation HD Graphics 510 [8086:1902] +-08.0 Intel Corporation Skylake Gaussian Mixture Model [8086:1911] +-14.0 Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f] +-14.2 Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131] +-16.0 Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a] +-17.0 Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102] +-1d.0-[02]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] +-1f.0 Intel Corporation Sunrise Point-H LPC Controller [8086:a143] +-1f.2 Intel Corporation Sunrise Point-H PMC [8086:a121] +-1f.3 Intel Corporation Sunrise Point-H HD Audio [8086:a170] \-1f.4 Intel Corporation Sunrise Point-H SMBus [8086:a123] 

lspci -nnks 01:00

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050] [10de:1c81] (rev a1) Subsystem: Micro-Star International Co., Ltd. [MSI] GP107 [GeForce GTX 1050] [1462:8c97] Kernel driver in use: vfio-pci Kernel modules: nvidiafb, nouveau 01:00.1 Audio device [0403]: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] (rev a1) Subsystem: Micro-Star International Co., Ltd. [MSI] GP107GL High Definition Audio Controller [1462:8c97] Kernel driver in use: vfio-pci Kernel modules: snd_hda_intel 

lspci -nnks 00:02

00:02.0 Display controller [0380]: Intel Corporation HD Graphics 510 [8086:1902] (rev 06) Subsystem: Micro-Star International Co., Ltd. [MSI] HD Graphics 510 [1462:7995] Kernel driver in use: i915 Kernel modules: i915 

gpu-manager.log:

log_file: /var/log/gpu-manager.log last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot can't access /run/u-d-c-nvidia-was-loaded file can't access /opt/amdgpu-pro/bin/amdgpu-pro-px Looking for nvidia modules in /lib/modules/4.15.0-32-generic/updates/dkms Looking for amdgpu modules in /lib/modules/4.15.0-32-generic/updates/dkms Is nvidia loaded? no Was nvidia unloaded? no Is nvidia blacklisted? no Is intel loaded? yes Is radeon loaded? no Is radeon blacklisted? no Is amdgpu loaded? no Is amdgpu blacklisted? no Is amdgpu versioned? no Is amdgpu pro stack? no Is nouveau loaded? no Is nouveau blacklisted? yes Is nvidia kernel module available? no Is amdgpu kernel module available? no Vendor/Device Id: 8086:1902 BusID "PCI:0@0:2:0" Is boot vga? no Vendor/Device Id: 10de:1c81 BusID "PCI:1@0:0:0" Is boot vga? yes Skipping "/dev/dri/card0", driven by "i915" Skipping "/dev/dri/card0", driven by "i915" Skipping "/dev/dri/card0", driven by "i915" Found "/dev/dri/card0", driven by "i915" output 0: card0-HDMI-A-1 Number of connected outputs for /dev/dri/card0: 1 Does it require offloading? yes last cards number = 2 Has amd? no Has intel? yes Has nvidia? yes How many cards? 2 Has the system changed? No Unsupported discrete card vendor: 8086 Nothing to do 

Xorg.0.log:

$ cat ~/.local/share/xorg/Xorg.0.log [ 2684.239] X.Org X Server 1.19.6 Release Date: 2017-12-20 [ 2684.244] X Protocol Version 11, Revision 0 [ 2684.246] Build Operating System: Linux 4.4.0-119-generic x86_64 Ubuntu [ 2684.247] Current Operating System: Linux ab350n2 4.15.0-32-generic #35-Ubuntu SMP Fri Aug 10 17:58:07 UTC 2018 x86_64 [ 2684.247] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-32-generic root=UUID=87ad8dee-9975-11e8-a30b-309c230abb92 ro rd.modules-load=vfio-pci intel_iommu=on maybe-ubiquity [ 2684.251] Build Date: 13 April 2018 08:07:36PM [ 2684.253] xorg-server 2:1.19.6-1ubuntu4 (For technical support please see http://www.ubuntu.com/support) [ 2684.254] Current version of pixman: 0.34.0 [ 2684.258] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 2684.258] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 2684.265] (==) Log file: "/home/$USER/.local/share/xorg/Xorg.0.log", Time: Tue Aug 21 11:35:44 2018 [ 2684.267] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 2684.267] (==) No Layout section. Using the first Screen section. [ 2684.267] (==) No screen section available. Using defaults. [ 2684.267] (**) |-->Screen "Default Screen Section" (0) [ 2684.267] (**) | |-->Monitor "<default monitor>" [ 2684.267] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 2684.267] (==) Automatically adding devices [ 2684.267] (==) Automatically enabling devices [ 2684.267] (==) Automatically adding GPU devices [ 2684.267] (==) Automatically binding GPU devices [ 2684.267] (==) Max clients allowed: 256, resource mask: 0x1fffff [ 2684.267] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist. [ 2684.267] Entry deleted from font path. [ 2684.267] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist. [ 2684.267] Entry deleted from font path. [ 2684.267] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist. [ 2684.267] Entry deleted from font path. [ 2684.267] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist. [ 2684.267] Entry deleted from font path. [ 2684.267] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist. [ 2684.267] Entry deleted from font path. [ 2684.267] (==) FontPath set to: /usr/share/fonts/X11/misc, /usr/share/fonts/X11/Type1, built-ins [ 2684.267] (==) ModulePath set to "/usr/lib/xorg/modules" [ 2684.267] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 2684.267] (II) Loader magic: 0x564f402c8020 [ 2684.267] (II) Module ABI versions: [ 2684.267] X.Org ANSI C Emulation: 0.4 [ 2684.267] X.Org Video Driver: 23.0 [ 2684.267] X.Org XInput driver : 24.1 [ 2684.267] X.Org Server Extension : 10.0 [ 2684.268] (++) using VT number 5  [ 2684.269] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_3253 [ 2684.270] (II) xfree86: Adding drm device (/dev/dri/card0) [ 2684.270] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0 [ 2684.271] (--) PCI: (0:0:2:0) 8086:1902:1462:7995 rev 6, Mem @ 0xdd000000/16777216, 0xb0000000/268435456, I/O @ 0x0000f000/64 [ 2684.271] (--) PCI:*(0:1:0:0) 10de:1c81:1462:8c97 rev 161, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/131072 [ 2684.271] (II) LoadModule: "glx" [ 2684.272] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so [ 2684.272] (II) Module glx: vendor="X.Org Foundation" [ 2684.272] compiled for 1.19.6, module version = 1.0.0 [ 2684.272] ABI class: X.Org Server Extension, version 10.0 [ 2684.272] (==) Matched nouveau as autoconfigured driver 0 [ 2684.272] (==) Matched modesetting as autoconfigured driver 1 [ 2684.272] (==) Matched fbdev as autoconfigured driver 2 [ 2684.272] (==) Matched vesa as autoconfigured driver 3 [ 2684.272] (==) Assigned the driver to the xf86ConfigLayout [ 2684.272] (II) LoadModule: "nouveau" [ 2684.272] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so [ 2684.272] (II) Module nouveau: vendor="X.Org Foundation" [ 2684.272] compiled for 1.19.3, module version = 1.0.15 [ 2684.272] Module class: X.Org Video Driver [ 2684.272] ABI class: X.Org Video Driver, version 23.0 [ 2684.272] (II) LoadModule: "modesetting" [ 2684.272] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so [ 2684.272] (II) Module modesetting: vendor="X.Org Foundation" [ 2684.272] compiled for 1.19.6, module version = 1.19.6 [ 2684.272] Module class: X.Org Video Driver [ 2684.272] ABI class: X.Org Video Driver, version 23.0 [ 2684.272] (II) LoadModule: "fbdev" [ 2684.272] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so [ 2684.272] (II) Module fbdev: vendor="X.Org Foundation" [ 2684.272] compiled for 1.19.3, module version = 0.4.4 [ 2684.272] Module class: X.Org Video Driver [ 2684.272] ABI class: X.Org Video Driver, version 23.0 [ 2684.272] (II) LoadModule: "vesa" [ 2684.272] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so [ 2684.273] (II) Module vesa: vendor="X.Org Foundation" [ 2684.273] compiled for 1.19.3, module version = 2.3.4 [ 2684.273] Module class: X.Org Video Driver [ 2684.273] ABI class: X.Org Video Driver, version 23.0 [ 2684.273] (II) NOUVEAU driver Date: Fri Apr 21 14:41:17 2017 -0400 [ 2684.273] (II) NOUVEAU driver for NVIDIA chipset families : [ 2684.273] RIVA TNT (NV04) [ 2684.273] RIVA TNT2 (NV05) [ 2684.273] GeForce 256 (NV10) [ 2684.273] GeForce 2 (NV11, NV15) [ 2684.273] GeForce 4MX (NV17, NV18) [ 2684.273] GeForce 3 (NV20) [ 2684.273] GeForce 4Ti (NV25, NV28) [ 2684.273] GeForce FX (NV3x) [ 2684.273] GeForce 6 (NV4x) [ 2684.273] GeForce 7 (G7x) [ 2684.273] GeForce 8 (G8x) [ 2684.273] GeForce GTX 200 (NVA0) [ 2684.273] GeForce GTX 400 (NVC0) [ 2684.273] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 2684.273] (II) FBDEV: driver for framebuffer: fbdev [ 2684.273] (II) VESA: driver for VESA chipsets: vesa [ 2684.273] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted) [ 2684.391] (EE) [drm] Failed to open DRM device for pci:0000:01:00.0: -19 [ 2684.391] (WW) Falling back to old probe method for modesetting [ 2684.391] (II) modeset(1): using default device [ 2684.391] (II) Loading sub module "fbdevhw" [ 2684.391] (II) LoadModule: "fbdevhw" [ 2684.391] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 2684.391] (II) Module fbdevhw: vendor="X.Org Foundation" [ 2684.391] compiled for 1.19.6, module version = 0.0.2 [ 2684.392] ABI class: X.Org Video Driver, version 23.0 [ 2684.392] (EE) open /dev/fb0: Permission denied [ 2684.392] (WW) Falling back to old probe method for fbdev [ 2684.392] (II) Loading sub module "fbdevhw" [ 2684.392] (II) LoadModule: "fbdevhw" [ 2684.392] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 2684.392] (II) Module fbdevhw: vendor="X.Org Foundation" [ 2684.392] compiled for 1.19.6, module version = 0.0.2 [ 2684.392] ABI class: X.Org Video Driver, version 23.0 [ 2684.392] (EE) open /dev/fb0: Permission denied [ 2684.392] vesa: Ignoring device with a bound kernel driver [ 2684.392] (WW) Falling back to old probe method for vesa [ 2684.392] (II) modeset(G0): using drv /dev/dri/card0 [ 2684.392] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support [ 2684.392] (EE) Screen 0 deleted because of no matching config section. [ 2684.392] (II) UnloadModule: "modesetting" [ 2684.392] (EE) Screen 1 deleted because of no matching config section. [ 2684.392] (II) UnloadModule: "fbdev" [ 2684.392] (II) UnloadSubModule: "fbdevhw" [ 2684.392] (EE) Screen 1 deleted because of no matching config section. [ 2684.392] (II) UnloadModule: "vesa" [ 2684.392] (EE) Fatal server error: [ 2684.392] (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices [ 2684.392] (EE) [ 2684.392] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 2684.392] (EE) Please also check the log file at "/home/$USER/.local/share/xorg/Xorg.0.log" for additional information. [ 2684.392] (EE) [ 2684.423] (EE) Server terminated with error (1). Closing log file. 
0
Es gibt keine Fehlermeldung in Ihrem Protokoll. Ihr Host verwendet die NVIDIA-Grafikkarte. Passthrough schlägt daher wahrscheinlich fehl. Daniel B vor 5 Jahren 0
@DanielB, danke für die schnelle Antwort. Ich habe die folgenden Änderungen (im ersten Beitrag aktualisiert) auf das Ubuntu-Hostsystem angewendet, um die NVIDIA-GPU zu deaktivieren und PCI-Passthrough zuzulassen. Welche zusätzlichen Schritte sind für den korrekten PCI-Passthrough erforderlich? Leonard Lee vor 5 Jahren 0
Vielleicht habe ich falsch gelesen. Auf jeden Fall zeigt Ihr Ausschnitt von Xorgs Protokoll nichts Nützliches. Bitte geben Sie das vollständige Protokoll und ggf. das GDM-Protokoll an. Daniel B vor 5 Jahren 0

1 Antwort auf die Frage

1
Daniel B

Nun, es sieht so aus, als würde Xorg die NVIDIA-Karte trotzdem verwenden. Haben Sie versucht anzugeben, welche GPU Xorg verwenden soll ?

X startet nicht nach dem Aktivieren von vfio_pci

Dies hängt damit zusammen, dass die Host-GPU als sekundäre GPU erkannt wird. X schlägt daher fehl oder stürzt ab, wenn versucht wird, einen Treiber für die Gast-GPU zu laden. Um dies zu umgehen, ist eine Xorg-Konfigurationsdatei erforderlich, die die BusID für die Host-GPU angibt. Die korrekte BusID kann von lspci oder dem Xorg-Protokoll abgerufen werden. Quelle →

/etc/X11/xorg.conf.d/10-intel.conf

Section "Device" Identifier "Intel GPU" Driver "modesetting" BusID "PCI:0:2:0" EndSection 

Falls xorg.conf.dnoch nicht vorhanden, erstellen Sie es einfach.

Danach sollte Xorg nicht mehr versuchen, die NVIDIA-Grafikkarte zu verwenden. Auf der Arch-Wiki-Seite werden andere Probleme aufgelistet, die Sie im weiteren Verlauf Ihres Interesses möglicherweise interessieren.