IGVT-g: Difference between revisions
imported>Samueldr m Adds external resource link about that feature |
imported>Gnidorah No edit summary |
||
| Line 8: | Line 8: | ||
== NixOS configuration == | == NixOS configuration == | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
/etc/nixos/configuration.nix | |||
boot.kernelPackages = pkgs.linuxPackages_4_16; | boot.kernelPackages = pkgs.linuxPackages_4_16; | ||
boot.kernelParams = [ "i915.enable_gvt=1" ]; | boot.kernelParams = [ "i915.enable_gvt=1" ]; | ||
| Line 27: | Line 26: | ||
]; | ]; | ||
virtualisation.libvirtd.enable = true; | virtualisation.libvirtd.enable = true; | ||
users.extraUsers. | users.extraUsers.user.extraGroups = [ "libvirtd" ]; | ||
</nowiki>}} | |||
== Create or destroy VGPU == | == Create or destroy VGPU == | ||
| Line 61: | Line 60: | ||
=== Bare Qemu === | === Bare Qemu === | ||
<syntaxHighlight lang="sh"> | |||
qemu-system-x86_64 \ | qemu-system-x86_64 \ | ||
-enable-kvm \ | -enable-kvm \ | ||
| Line 68: | Line 68: | ||
-serial stdio \ | -serial stdio \ | ||
-display gtk,gl=on \ | -display gtk,gl=on \ | ||
-device vfio-pci,sysfsdev=/sys/bus/mdev/devices/ | -device vfio-pci,sysfsdev=/sys/bus/mdev/devices/a297db4a-f4c2-11e6-90f6-d3b88d6c9525,x-igd-opregion=on | ||
</syntaxHighlight> | |||
=== libvirtd === | === libvirtd === | ||
If using virt-manager, create new or open existing VM. Its impossible to remove primary QXL videocard, but it will conflict, so change it to Cirrus. | If using virt-manager, create new or open existing VM. Its impossible to remove primary QXL videocard, but it will conflict, so change it to Cirrus. | ||
sudo -E virsh edit '''win10''' | {{file|sudo -E virsh edit '''win10'''|xml|<nowiki> | ||
<domain type='kvm | <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0> | ||
<!-- ... --> | |||
<devices> | <devices> | ||
<!-- ... --> | |||
<graphics type='spice'> | <graphics type='spice'> | ||
<listen type='none'/> | <listen type='none'/> | ||
<!-- choose renderer via virt-manager --> | |||
<gl enable='yes'/> | <gl enable='yes'/> | ||
</graphics> | </graphics> | ||
< | <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci'> | ||
<source> | |||
<address uuid= | <address uuid='a297db4a-f4c2-11e6-90f6-d3b88d6c9525'/> | ||
</source> | |||
<!-- assign to first available slot --> | |||
<address type='pci' domain='0x0000' bus='0x00' slot= | <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> | ||
</hostdev> | </hostdev> | ||
</devices> | </devices> | ||
<qemu:commandline> | <qemu:commandline> | ||
<qemu:arg value='-set'/> | <qemu:arg value='-set'/> | ||
<qemu:arg value='device. | <qemu:arg value='device.hostdev0.x-igd-opregion=on'/> | ||
</qemu:commandline> | </qemu:commandline> | ||
</domain> | </domain> | ||
Finally use sudo virt-viewer --attach '''win10''' | Finally use sudo virt-viewer --attach '''win10''' | ||