powerhouse wrote: talos_d wrote:
Thank you for creating this tutorial,I am new to linux but was able to make it work with a low spec set up(cpu-g4560,gtx960 for passthrough and intel igfx for host).
My next goal is to make it work within in a windowed mode so I wont have to switch inputs physically on my monitor,I found this video- https://www.youtube.com/watch?v=d3HL9x0CEtY
on youtube but I wasn't
able to figure out how he made it work.
as far as I can tell he used the vga qxl-sdl command to somehow make a virtual monitor and used mirroring monitors to mirror what is on the monitor output to the virtual monitor,he also used obs but I dont quite understand for what.
I you have any insight I would really appreciate it.
That is good to hear that it worked. Would you be willing to share your script?
I saw the video but don't understand Russian. It looks to me that he is running a laptop, but that is only a guess looking at the qemu command.
I have no experience with screen mirroring, sorry. Your guess is as good as mine. His use of acpitable is something I haven't explored yet.
Hope you find a way to mirror your screen.
The script is preety much exactly yours except I removed the last 4 lines after os installation:
Code: Select all
if ps -A | grep -q $vmname; then
echo "$vmname is already running." &
# use pulseaudio
cp /usr/share/OVMF/OVMF_VARS.fd /tmp/my_vars.fd
-name $vmname,process=$vmname \
-machine type=q35,accel=kvm \
-cpu host,kvm=off \
-smp 4,sockets=1,cores=2,threads=2 \
-m 12G \
-mem-path /dev/hugepages \
-balloon none \
-rtc clock=host,base=localtime \
-vga none \
-serial none \
-parallel none \
-soundhw hda \
-usb -usbdevice host:056a:00b4 -usbdevice host:046d:c52e -usbdevice host:0781:556b \
-device vfio-pci,host=01:00.0,multifunction=on \
-device vfio-pci,host=01:00.1 \
-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd \
-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
-boot order=dc \
-device virtio-scsi-pci,id=scsi \
-drive id=disk0,if=virtio,cache=none,format=raw,file=/media/user/win.img \
-drive file=/home/user/ISOs/Win10_1703_English_x64.iso,id=isocd,format=raw,if=none -device scsi-cd,drive=isocd \
-drive file=/home/user/Downloads/virtio-win-0.1.126.iso,id=virtiocd,format=raw,if=none -device ide-cd,bus=ide.1,drive=virtiocd \
-netdev type=tap,id=net0,ifname=tap0,vhost=on \
-device virtio-net-pci,netdev=net0,mac=00:16:3e:00:01:0 \
Did a benchmark with 3dmark firestrike and there is very little overhead,photoshop and blender(which is my main reason for doing this) are working smoothly.
I also figured out what the russian dude did in my previous post and was able to run the vm in windowed mode with the passthroughed gpu...well kind of,its seems windows is a little laggy on the qxl fake screen.
If anyone is interested here is how you can make it work:after completing the gpu passthrough with the above script I replaced the lines-
This will load a fake monitor into your vm and qemu should start in windowed mode using the qxl adapter with the physical output of your monitor
being the second monitor/graphics adapter in the vm.
As you start the vm under device manager you will see two graphics adapters-the passthrouged card and microsoft basic adapter.
I updated the the latter with these drivers:http://people.redhat.com/vrozenfe/qxlwddm/
(version 0.11 or 0.12 worked for me) which
changed the microsoft basic adapter to Redhat qxl controller.
After that you need to set the monitor with the real card as your main monitor under display settings and choose extend monitors
under the same panel.I was able to run photoshop in the windowed display within linux with a decent performance but there seems to be a small mouse lag which the qxl
display has even running only by itself and is maybe caused by windows 10 not being fully compatible with the windows 8 qxl driver.
Mirroring displays issues:a better option than extending the screens would be to duplicate them using the project option located on the lower right in the taskbar panel
but that did not work for me for whatever reason.In the video I shared he solved it by downloading obs(a streaming program) and streamed a preview in fullscreen
of the real monitor with encoding disabled within the qxl window-this worked for me but with an unbearable lag(might be that my cpu is not good enough).
I might try to check and see how this works on windows 8,1 which the qxl driver version is designed for,it was really cool to see windows within linux and being able to
mouse grab go full screen and then exit without switching outputs,this is probably not a solution for gaming but its adequate for photoshop/programs that require light 3d acceleration.