LINUX.ORG.RU

Проброс дискретного GPU VM. Зависание на старте.

 


0

1

Всем привет. Помогите пож начинающему пользователю линукса) Собственно, есть ноут, 2 GPU, Интегрированный Intel и дискретный Nvidia. Пытаюсь пробросить на гостевую машину Nvidia, а на хосте оставить Intel. VM Windows 11 без GPU запускается норм, однако как только добавляю Nvidia, зависает на старте загруки. Уже третий день гуглю, не могу найти причину(.

lspci -k:

0000:01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4050 Max-Q / Mobile] (rev a1)
	Subsystem: ASUSTeK Computer Inc. AD107M [GeForce RTX 4050 Max-Q / Mobile]
	Kernel driver in use: vfio-pci
	Kernel modules: nouveau, nvidia_drm, nvidia
0000:01:00.1 Audio device: NVIDIA Corporation Device 22be (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device 304d
	Kernel driver in use: vfio-pci
	Kernel modules: snd_hda_intel

VM Logs:

2023-10-30 16:24:25.793+0000: starting up libvirt version: 9.7.0, qemu version: 8.1.2, kernel: 6.5.8-arch1-1, hostname: archlinux
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin \
HOME=/var/lib/libvirt/qemu/domain-1-win11 \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-1-win11/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-1-win11/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-1-win11/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=win11,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-1-win11/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/x64/OVMF_CODE.secboot.4m.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/win11_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-8.1,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,hpet=off,acpi=on \
-accel kvm \
-cpu host,migratable=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff \
-global driver=cfi.pflash01,property=secure,value=on \
-m size=8388608k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":8589934592}' \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
-uuid e005f3ed-459f-4f6c-a0ab-1eaad739a8c6 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=32,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
-device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
-device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
-device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
-device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
-device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
-device '{"driver":"pcie-root-port","port":22,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x6"}' \
-device '{"driver":"pcie-root-port","port":23,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x2.0x7"}' \
-device '{"driver":"pcie-root-port","port":24,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x3"}' \
-device '{"driver":"pcie-root-port","port":25,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x3.0x1"}' \
-device '{"driver":"pcie-root-port","port":26,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x3.0x2"}' \
-device '{"driver":"pcie-root-port","port":27,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x3.0x3"}' \
-device '{"driver":"pcie-root-port","port":28,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x3.0x4"}' \
-device '{"driver":"pcie-root-port","port":29,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x3.0x5"}' \
-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.1","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/win11-5.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"discard":"unmap","driver":"qcow2","file":"libvirt-1-storage","backing":null}' \
-device '{"driver":"ide-hd","bus":"ide.0","drive":"libvirt-1-format","id":"sata0-0-0","bootindex":1}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=chrtpm,path=/run/libvirt/qemu/swtpm/1-win11-swtpm.sock \
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
-device '{"driver":"tpm-crb","tpmdev":"tpm-tpm0","id":"tpm0"}' \
-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-vnc 127.0.0.1:0,audiodev=audio1 \
-device '{"driver":"VGA","id":"video0","vgamem_mb":16,"bus":"pcie.0","addr":"0x1"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-device '{"driver":"vfio-pci","host":"0000:01:00.0","id":"hostdev0","bus":"pci.3","addr":"0x0"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
char device redirected to /dev/pts/2 (label charserial0)

journakctl:

Oct 30 19:24:25 archlinux systemd[1]: Listening on Virtual machine log manager socket.
Oct 30 19:24:25 archlinux systemd[1]: Started Virtual machine log manager.
Oct 30 19:24:25 archlinux systemd-machined[684]: New machine qemu-1-win11.
Oct 30 19:24:25 archlinux systemd[1]: Started Virtual Machine qemu-1-win11.
Oct 30 19:24:29 archlinux kernel: vfio-pci 0000:01:00.0: enabling device (0000 -> 0003)
Oct 30 19:24:29 archlinux kernel: x86/split lock detection: #AC: CPU 2/KVM/3938 took a split_lock trap at address: 0x7efbd050
Oct 30 19:24:29 archlinux kernel: x86/split lock detection: #AC: CPU 3/KVM/3939 took a split_lock trap at address: 0x7efbd050
Oct 30 19:25:50 archlinux telegram-desktop[1120]: qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
Oct 30 19:27:04 archlinux dbus-daemon[681]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.46' (uid=0 pid=4145 comm="sudo journalctl -b")
Oct 30 19:27:04 archlinux dbus-daemon[681]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Oct 30 19:27:05 archlinux sudo[4145]:   andrew : TTY=pts/0 ; PWD=/home/andrew ; USER=root ; COMMAND=/usr/bin/journalctl -b
Oct 30 19:27:05 archlinux sudo[4145]: pam_unix(sudo:session): session opened for user root(uid=0) by andrew(uid=1000)

journakctl -k:

Oct 30 19:12:50 archlinux kernel: NVRM: The NVIDIA probe routine was not called for 1 device(s).
Oct 30 19:12:50 archlinux kernel: NVRM: This can occur when a driver such as:
                                  NVRM: nouveau, rivafb, nvidiafb or rivatv
                                  NVRM: was loaded and obtained ownership of the NVIDIA device(s).
Oct 30 19:12:50 archlinux kernel: NVRM: Try unloading the conflicting kernel module (and/or
                                  NVRM: reconfigure your kernel without the conflicting
                                  NVRM: driver(s)), then try loading the NVIDIA kernel module
                                  NVRM: again.
Oct 30 19:12:50 archlinux kernel: NVRM: No NVIDIA devices probed.

Честно даже не совсем понимаю пока где искать. Для установки vfio использовал gpu-passthrough-manager.

Заранее спасибо.

Ответ на: комментарий от vbcnthfkmnth123

Я впринципе не могу дойти до ошибки 43, у меня ВМ виснет на этапе загрузки. По поводу 43 ошибки видел много где в гайдах про нее, вроде решаема. Попробовал установить Nouveau, ситуация не поменялась.

AndreyFrants
() автор топика
Ответ на: комментарий от AndreyFrants

Удачи с этим. Там придется дрочить вприсядку, чтобы оно так работало с игровой виделкартой. Насколько я помню в новых видяхах как 4050 там никак это ограничение не обойти..

vbcnthfkmnth123 ★★★★
()
Последнее исправление: vbcnthfkmnth123 (всего исправлений: 1)
Ответ на: комментарий от vbcnthfkmnth123

Дрочить вприсядку мне судя по всему нравится, раз я перешёл с вин на арч. Другой вопрос, что я впринципе не могу загрузить ВМ, значит дело ещё не в 43 ошибке.. Наверное…

AndreyFrants
() автор топика

Пробрось в виртуалку с линуксом. Если и так не загрузится, то хоть узнаешь, что не так. Если загрузится и видюху подхватит, то тогда эт не к нам =)

t184256 ★★★★★
()
Ответ на: комментарий от AndreyFrants

в итоге переустановил систему и все заработало

А что изменилось, что вдруг заработало, как думаешь? Правильный ответ сильно бы обогатил тему. )

krasnh ★★★
()
Последнее исправление: krasnh (всего исправлений: 1)