Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gpu_accelerated_vm_with_kvm [31.10.2018 06:27] – [3rd Try: Nice DCV] Pascal Suter | gpu_accelerated_vm_with_kvm [29.01.2023 22:39] (current) – [Re-Try RDP + passthrough] Pascal Suter | ||
---|---|---|---|
Line 162: | Line 162: | ||
in order to get the middle mous button (wheel) to click, i had to modify the config of my citrix receiver on my client machine. I had to edit the file '' | in order to get the middle mous button (wheel) to click, i had to modify the config of my citrix receiver on my client machine. I had to edit the file '' | ||
===== GPU Forwarding for KVM ===== | ===== GPU Forwarding for KVM ===== | ||
+ | First of all you need to enable VT-d and VT-x or they might be also called something like Intel Virtualization tech, in the BIOS. without these guys you won't be able to load the vfio module later on. | ||
+ | |||
Helpful links: | Helpful links: | ||
* [[https:// | * [[https:// | ||
Line 287: | Line 289: | ||
qemu-system-x86_64 -enable-kvm -k de-ch -name windows -drive format=raw, | qemu-system-x86_64 -enable-kvm -k de-ch -name windows -drive format=raw, | ||
+ | | ||
+ | as far as speed goes, this worked out a lot better, however i could not get DCV to run reliably. | ||
+ | |||
+ | this time i've created a snapshot prior to installing DCV and i later cloned that snapshot to install RGS on a " | ||
+ | qemu-system-x86_64 -enable-kvm -k de-ch -name windows -drive format=raw, | ||
+ | |||
+ | RGS runs smooth and windows feels reasonably fast too with the SSD as storage behind it. however, When the vm is left running over night usually the next morning it hangs or is so slow that one often can't even shut it down properly. I don't know why that is, i've deactivated all power saving features of windows, screen blanking etc. but I still have this issue. The machine hangs the same when I connect vie windows RDP. Also in those cases where i can still see something, I usually get alot of horizontal lines as artefacts on the screen both with RGS and RDP. The only solution is then to shut down the VM and start it again, a Reboot (instead of a power cycle) will make the VM fast again but the Artefacts remain. so there is definately something wrong with my VM here. This needs further investigation! | ||
+ | |||
+ | ==== LVM stuff ==== | ||
+ | just as a quick side note: here is how you create and revert to a snapshot in lvm. using dd you can also copy a snapshot into a new lvm volume if the new volume is at least the size of the snapshotted one. | ||
+ | |||
+ | create a snapshot: | ||
+ | lvcreate -s -L 50G -n win10base / | ||
+ | revert to a snapshot: | ||
+ | lvconvert --merge / | ||
+ | |||
+ | ==== using a vm with just the forwarded GPU ==== | ||
+ | this is the ultimate goal. so far i could not get this to work, whenver i booted a vm without a emulated graphics card i could no longer connect to it. and it was hard to debug as i had no " | ||
+ | |||
+ | to start a vm without a emulated graphics card, use '' | ||
+ | |||
+ | | ||
+ | |||
+ | ==== stability issues ==== | ||
+ | i go to the point where whenever i booted my DCV VM the HOST system rebooted or rather reset! Finally I found a workaround that fixed this issue: I bought a little dummy hdmi display emulator which is basically an HDMI plug that you plug into the output of the graphics card and it emulates a display. Since i had no adapters readily available for my K1200 i switched to a GTX 1050Ti which i had in my other pc. So far it works the same as the K1200 did. DCV now starts and is usable same as RGS was before. However i Still have the issue, where after about a day or so, when i log back into my VM i get horizontal black lines across my remote desktop which move around as i re-size the window but stay stady " | ||
+ | |||
+ | I have now updated my Bios hosts bios to the latest version (it was actually quite outdated already) and have also enabled Coherency support for the IOMMU stuff in the bios. I usually don't like changing two parameters at once to sovle an issue, but for now lets just try it as it takes at least a day to reproduce the problem.. i can then roll back the bios setting and see if it was the update alone that resolved the issue should my current trials be successful. | ||
+ | |||
+ | ===== Re-Try RDP + passthrough ===== | ||
+ | the key to a smooth user experience as far as framerate etc. goes seems to be to use AVC444 which on Windows supports NVENC (using the Nvidia Card to encode the video stream for RDP) | ||
+ | |||
+ | to enable this on the windows side: | ||
+ | - Open Run (Win+R). Type gpedit.msc | ||
+ | - Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment | ||
+ | - Enable " | ||
+ | - Enable " | ||
+ | |||
+ | |||
+ | on the client side with xrdp, get the latest version (i worked with 3.0) from https:// | ||
+ | / | ||
+ | |||
+ | to verify that nvenc is being used, open the task manager and go to the performance tab. the GPU should show video encoding workload. | ||
+ | |||
+ |