i have an asus n550jv laptop with the following output from lspci -nn | grep "VGA|3D"
:
00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06)
01:00.0 3D controller [0302]: NVIDIA Corporation GK107M [GeForce GT 750M] [10de:0fe4] (rev ff)
i want to run a windows 8.1 vm with vga-passthrough so i don't have to dualboot. i've read that you need a card with a dedicated output port but i haven't figured out why and there've been some posts on forums indicating that it might work yet.
i'm trying to run the vm with this command:
qemu-system-x86_64 -enable-kvm -M q35 -m 4096 -cpu host \
-smp 4,sockets=1,cores=4,threads=2 \
-bios /usr/share/ovmf/OVMF.fd \
-usb -usbdevice tablet \
-soundhw hda \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,x-vga=on \
-drive file=/home/duke/windows.img,id=disk,format=raw -device ide-hd,bus=ide.0,drive=disk \
-drive file=/home/duke/Downloads/windows.iso,id=isocd -device ide-cd,bus=ide.1,drive=isocd \
-vga vmware \
-boot menu=on
i want to use vga-passthrough but i keep getting errors about x-vga:
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,x-vga=on: vfio: Device does not support requested feature x-vga qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,x-vga=on: vfio: failed to get device 0000:01:00.0
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,x-vga=on: Device 'vfio-pci' could not be initialized
i found on the arch vga-passthrough thread this information:
This means that either a) your kernel does not support CONFIG_VFIO_PCI_VGA or b) the device is not a VGA device. To test a):
$ grep CONFIG_VFIO_PCI_VGA /boot/config-
uname -r
To test b):
$ lspci -s 2:00.0 | grep VGA
If you have Intel host graphics, you still need the i915 patch for your kernel. If you Radeon host graphics, you need the other VGA arbiter patch. Both of these have been referenced in the last few pages, IIRC.
i get CONFIG_VFIO_PCI_VGA=y
for (a). in my case (b) is lspci -s 1:00.0 | grep VGA
and it doesn't output anything since my nvidia card is listed as a "3d controller" so i have questions:
will the i915 patch or ovmf support my nvidia card which is listed as a 3d controller?
- if not, is there any way to get the nivida card recognized as vga-compatible?
is running ovmf as simple as setting
-bios /usr/share/ovmf/OVMF.fd
?why is
-vga=none
required for vga assignment?- if
-vga=none
really is required then is there any other way to actually see the screen? for example could i redirect the nvidia card to the hdmi port or have the nvidia card completely takeover the laptop screen?
- if
i also get errors for alsa/pulse, a bunch of them get spit out that generally follow
alsa: Could not initialize ADCk
alsa: Failed to open `default':
alsa: Reason: Connection refused
Home directory not accessible: Permission denied
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
i know this is because root doesn't have access to user-level pulse but i don't want to run pulse at system-level, is there a way for pulseaudio to work without having to launch it in system mode?
if not, i'm having issues enabling system mode anyway. There's an explanation here and pulseaudio --system
works but i can't connect any clients to the pulse server, i keep getting errors like ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access denied
.