12

I have found a guide that tells me to do the following to get GPU pass through working on 20.04

apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager ovmf

lspci -nn returns

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104 [GeForce RTX 3060 Ti Lite Hash Rate] [10de:2489] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GA104 High Definition Audio Controller [10de:228b] (rev a1)

/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on kvm.ignore_msrs=1 vfio-pci.ids=10de:2489,10de:228b"

Then

update-grub

However when I reboot back I get a plain black screen. Is the process different for 22.04? i9-12900k is the CPU

1
  • Thank you so very much. I spent hours trying to get vfio and iommu to work and it was only when I tried your line that it worked: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on kvm.ignore_msrs=1 vfio-pci.ids=10de:2489,10de:228b" Nov 30, 2022 at 18:37

1 Answer 1

22

GPU PASSTHROUGH GUIDE FOR UBUNTU 22.04 LTS AND LATER

This guide was tested on Ubuntu 22.04 LTS, 22.10, 23.04, 23.10 with Nouveau driver and the following system configuration:

  • MSI® motherboard Z170A
  • Intel® Core™ i5-6600 Processor
  • GeForce GTX 1650 AERO ITX 4G OC.

Attention! This guide is only relevant for Nouveau driver. Please read the text carefully before you start system changes.

HARDWARE SPECIFICATION REQUIRED FOR THIS GUIDE

For Intel based system:

For AMD based system:

  • Motherboard with Integrated Graphics (for manipulations)

  • CPU with AMD-V, AMD-Vi and Integrated Graphics

  • Discrete Graphics Card with GPU passthrough support (for passthrough)

  • Monitor with two inputs like Displayport, D-SUB, DVI, HDMI or switcher box with monitor or two monitors.

See list of IOMMU-supporting hardware (list may not be complete).

Important: To improve guest machine productivity, install the guest operating system on an additional physical disk (passthrough solution). Also You will need 8GB RAM for operating system (OS) and 8GB RAM for guest machine, the 16GB RAM may significantly increase your HDD's or SSD's performance and lifetime.

REQUIRED STEPS

STEP 1. Enable Hardware-assisted virtualization in the BIOS

  • For Intel based system enable Intel Virtualization Tech (VT-x) and Intel VT-D Tech

  • For AMD based system enable SVM Mode.

STEP 2. Set the BIOS to use the Integrated Graphics as the primary boot device

Attention! If you boot the system with designed for passthrough PCI-Express Graphics Device, error code 43 will appear.

STEP 3. Check for IOMMU Support on your CPU

For AMD processor:

$ cat /proc/cpuinfo | grep --color svm

For Intel processor:

$ cat /proc/cpuinfo | grep --color vmx

You should see the highlighted text svm or vmx.

STEP 4. Enable IOMMU

$ sudo nano /etc/default/grub

Add the following options to GRUB_CMDLINE_LINUX_DEFAULT=""

For AMD processor:

amd_iommu=on kvm.ignore_msrs=1

For Intel processor:

intel_iommu=on kvm.ignore_msrs=1

STEP 5. Update GRUB

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

STEP 6. Reboot your system

STEP 7. Check that IOMMU is enabled

$ sudo dmesg | grep -i -e DMAR -e IOMMU

You should see message like below:

[    0.123456] pci 0000:09:00.0: Adding to iommu group 1
[    0.234567] pci 0000:0a:00.0: Adding to iommu group 2
[    0.345678] DMAR: Intel(R) Virtualization Technology for Directed I/O

STEP 8. Find your device

$ lspci -nnk

You should see text like below:

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117 [GeForce GTX 1650] [10aa:10bb] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. [MSI] TU117 [GeForce GTX 1650] [0101:a1a1]
    Flags: bus master, fast devsel, latency 0, IRQ 151, IOMMU group 1
    Memory at de000000 (32-bit, non-prefetchable) [size=16M]
    Memory at c0000000 (64-bit, prefetchable) [size=256M]
    Memory at d0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    Expansion ROM at 000c0000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: nouveau
    Kernel modules: nvidiafb, nouveau

01:00.1 Audio device [0403]: NVIDIA Corporation Device [01cc:01ee] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device [0202:a2a2]
    Flags: bus master, fast devsel, latency 0, IRQ 17, IOMMU group 1
    Memory at df080000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

If You see text "Kernel driver in use: nvidia" like below:

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117 [GeForce GTX 1650] [10aa:10bb] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] TU117 [GeForce GTX 1650] [0101:a1a1]
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation Device [01cc:01ee] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device [0202:a2a2]
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

your system uses NVIDIA Proprietary Drivers. You need to remove all old video drivers. Here is a recipe which removes all old video drivers, and reinstalls nouveau:

$ sudo nvidia-settings --uninstall
$ sudo apt-get remove --purge nvidia*
$ sudo apt-get remove --purge xserver-xorg-video-nouveau
$ sudo apt-get remove --purge xserver-xorg-video-nv
$ sudo apt-get install nvidia-common
$ sudo apt-get install xserver-xorg-video-nouveau
$ sudo apt-get install xserver-xorg-video-all
$ sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri
$ sudo apt-get install --reinstall xserver-xorg-core
$ sudo dpkg-reconfigure xserver-xorg

or run the following command:

$ software-properties-gtk --open-tab=4

select the option “X.Org X server -- Nouveau display driver from xserver-xorg-video-nouveau (open source)”

Run autoremove:

$ sudo apt autoremove

Then reboot your system and repeat the STEP 8.

STEP 9. Create a new file called vfio.conf

$ sudo nano /etc/modprobe.d/vfio.conf

Add the following lines with your device IDs from the STEP 8:

blacklist nouveau
blacklist snd_hda_intel
options vfio-pci ids=10aa:10bb,01cc:01ee

STEP 10. Update the existing initramfs

$ sudo update-initramfs -u

STEP 11. Reboot your system

STEP 12. Make sure everything is OK

$ lspci -nnk

You should see text like below, the lines “Kernel driver in use: nouveau” and “Kernel driver in use: snd_hda_intel” should not be present in the text:

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117 [GeForce GTX 1650] [10aa:10bb] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] TU117 [GeForce GTX 1650] [0101:a1a1]
    Kernel modules: nvidiafb, nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation Device [01cc:01ee] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device [0202:a2a2]
    Kernel modules: snd_hda_intel

STEP 13. Use VirtManager to create a new guest machine

Install KVM

$ sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils

Add user

Note: For newer versions of Linux kernels, try libvirt.

$ sudo adduser username libvirtd

If you have group issue "adduser: The group `libvirtd' does not exist." try:

$ sudo addgroup libvirtd

Install VirtManager

$ sudo apt-get install virt-manager

Create new guest machine with a custom configuration.

$ virt-manager

If you get a "make sure the libvirtd daemon is running` error, reboot and try again.

Image 01

Image 02

Image 03

Image 04

Optional: To install the guest operating system on an additional physical disk, uncheck the box "Enable storage for this virtual machine"

Image 05

Image 06

You must:

  1. select the "Q35" chipset and "UEFI
    x86_64:/usr/share/OVMF/OVMF_CODE_4M.ms.fd" firmware or similar

Image 07

  1. add PCI Host Devices for GPU passthrough

Image 08

Image 09

Image 10

Optional: To install the guest operating system on an additional physical disk, select Host Device – physical SSD M.2 or SATA 3.0 PCIe Gen3 x1 card for SATA SSD/HDD

  1. set QXL video driver and SPICE client for display with "Address"
    listen type.

Image 11

Image 12

Image 13

STEP 14. Edit the guest machine

$ virsh list --all

$ sudo virsh edit YourGuestMachineName

Add the following lines:

<vendor_id state='on' value='1234567890ab'/>
<kvm>
 <hidden state='on'/>
</kvm>
<ioapic driver='kvm'/>

The end result should look something like:

<features>
  <acpi/>
  <apic/>
  <hyperv>
    <relaxed state='on'/>
    <vapic state='on'/>
    <spinlocks state='on' retries='8191'/>
    <vendor_id state='on' value='1234567890ab'/>
  </hyperv>
  <kvm>
    <hidden state='on'/>
  </kvm>
  <vmport state='off'/>
  <ioapic driver='kvm'/>
</features>

Once your done editing, use CTRL+x to save the changes.

STEP 15. Run the guest machine

Optional: If you are installing the guest operating system on an additional physical disk, start the guest machine and hit the BIOS entry key F2 at the appropriate time. Set the physical disk device as bootable.


NOTE

If you want to use the PCI-Express Graphics Device as the primary boot device, do the following:

$ sudo nano /etc/modprobe.d/vfio.conf

Change the following lines with your device IDs from the STEP 8:

blacklist nouveau
blacklist snd_hda_intel
options vfio-pci ids=10aa:10bb,01cc:01ee

with:

#blacklist nouveau
#blacklist snd_hda_intel
#options vfio-pci ids=10aa:10bb,01cc:01ee

Update the existing initramfs

$ sudo update-initramfs -u

Reboot your system and set the BIOS to use the PCI-Express Graphics Device as the primary boot device.

SEE ALSO

GUIDE: Creating a qcow2 disk image file on another partition.

TROUBLESHOOTING

Problem: The emulator may not have search permissions for the path '/*.qcow2'

Action:

  • Run virt-manager with sudo privileges or use chown, chgrp, chmod commands to fix. See the STEPS from this GUIDE.

Problem: Error starting domain: Cannot access storage file '/*.qcow2' (as uid:10101, gid:101): Permission denied

Action:

  • Run virt-manager with sudo privileges or use chown, chgrp, chmod commands to fix. See the STEPS from this GUIDE.

Problem: Gnome login screen is not displayed after rebooting the system.

Action:

  • It is possible that your system is booting with integrated graphics, while the vaio.conf file is missing, is empty, has incorrect text or the lines described in step 9 start with # character. Check step 9.

Problem: The guest machine start normally but I see a black screen on the output of PCI-Express Graphics Device.

Action:

  • check the cable connections and the settings of your monitor

  • check the steps 1, 2, 14

  • install the correct device driver on Windows

  • uninstall and reinstall the device driver on Windows

  • update the device driver on Windows


Problem: When using a USB redirector, devices such as a webcam, USB audio interface, USB HDD/SSD not work correctly.

Action:

  • Use an additional PCIe USB card, necessarily with IOMMU-support (PCIe card passthrough solution).

Problem: Intermittent sound with crackling on guest machine with Windows 10 operating system.

Action:

  • use generic kernel
  • Disable WiFi in Ubuntu
  • to improve guest machine performance, set CPU governor on Ubuntu operating system to "Performance"
  • if you are using the HDA (ICH9) or HDA (ICH6) model with built in sound card set the number of vCPUs to half the number of CPUs of the logical host
  • if you are using an additional PCIe Gen3 x4 USB 3.2 card (PCIe card passthrough solution) with an USB audio interface, set processor topology manually (sockets, cores, threads) referring to physical CPU topology
  • if you are using an additional PCIe Gen3 x4 USB 3.2 card (PCIe card passthrough solution) with an USB audio interface, try different audio interface driver version
  • if the operating system Ubuntu has been converted to Ubuntu Studio, try reverting all changes
  • install clean Ubuntu operating system and try again.

Problem: My guest machine freezes consequently my USB audio interface crashing (for passthrough solution using an additional PCIe Gen3 x4 USB 3.2 card).

Action:

  • Make sure the root directory has approximately 8 GB of free space

  • Remove unused virtual hardware from your guest machine (Sound, Network, Controllers, Channel, USB Redirection)

  • In Virtual Machine Manager go to Edit > Connection Details and uncheck 'On Boot' via Virtual Networks tab

On Boot

  • Reboot your system

  • Disable WiFi in Ubuntu

  • Set CPU governor on Ubuntu operating system to "Performance"

Power Profiles


  • Install tuned

See Virtualization Tuning and Optimization Guide

$ sudo apt install tuned
  • Experimentally run the commands below

(You will need these commands every time you boot your PC)

$ sudo tuned-adm profile virtual-host && sudo systemctl enable tuned && tuned-adm active

For Ubuntu 23.04, 23.10

  • Run the following commands

$ virt-manager

$ htop -t -F libvirtd

The result should look something like:

  [Main] [I/O]
    PID△USER       PRI  NI  VIRT   RES   SHR S  CPU% MEM%   TIME+  Command
    976 root        20   0 1602M 36044 22348 S   0.0  0.2  0:01.32 ├─ /usr/sbin/libvirtd --timeout 120
    .
    .
    999 root        20   0 1602M 36044 22348 S   0.0  0.2  0:00.00 │  ├─ /usr/sbin/libvirtd --timeout 120
   1001 root        20   0 1602M 36044 22348 S   0.0  0.2  0:00.00 │  └─ /usr/sbin/libvirtd --timeout 120
   5905 username    20   0  140M  132M  3584 R  50.0  0.0  0:00.10 │  │     └─ htop -t -F libvirt
  • Run the following commands with the lowest PID value for libvirtd

$ sudo renice -20 -g <PID>

$ sudo chrt -a -r -p 99 <PID>
  • Run the following command

$ htop -t -F libvirtd

The end result should look something like:

  [Main] [I/O]
    PID△USER       PRI  NI  VIRT   RES   SHR S  CPU% MEM%   TIME+  Command
    976 root        RT -20 1602M 36044 22348 S   0.0  0.2  0:01.32 ├─ /usr/sbin/libvirtd --timeout 120
    .
    .
    999 root        RT -20 1602M 36044 22348 S   0.0  0.2  0:00.00 │  ├─ /usr/sbin/libvirtd --timeout 120
   1001 root        RT -20 1602M 36044 22348 S   0.0  0.2  0:00.00 │  └─ /usr/sbin/libvirtd --timeout 120
   5905 username    20   0  140M  132M  3584 R  50.0  0.0  0:00.10 │  │     └─ htop -t -F libvirt
  • Run your guest machine

For Ubuntu 22.04 LTS, 22.10

Note: Perhaps after Ubuntu 22.04 LTS, 22.10 update the process will become similar to the process for Ubuntu 23.04 or 23.10.

  • Run your guest machine

  • Run the following command


$ htop -t

The result should look something like:

  [Main] [I/O]
    PID▽USER       PRI  NI  VIRT   RES   SHR S  CPU% MEM%   TIME+  Command
      2 root        20   0     0     0     0 S   0.0  0.0  0:00.00 kthreadd
  10011 root        20   0     0     0     0 S   0.0  0.0  0:01.17 ├─ 9998
  10005 root        20   0     0     0     0 S   0.0  0.0  0:00.11 ├─ kvm-nx-lpage-recovery-9998
  10004 root         0 -20     0     0     0 I   0.0  0.0  0:00.00 └─ kvm
      1 root        20   0  166M 13300  7344 S   0.0  0.1  0:04.02 init
   9998 libvirt-qe  20   0 11.1G 8371M 11796 S  93.0 52.7  2h35:34 ├─ qemu-system-x86_64 -name guest=username,debug-threads=on -S -object {"qom-type":"secret","
  18086 libvirt-qe  20   0 11.1G 8371M 11796 S   0.0 52.7  0:00.00 │  ├─ worker
  10012 libvirt-qe  20   0 11.1G 8371M 11796 S   0.0 52.7  0:20.20 │  ├─ SPICE Worker
  10010 libvirt-qe  20   0 11.1G 8371M 11796 S   9.3 52.7 18:42.97 │  ├─ CPU 3/KVM
  10009 libvirt-qe  20   0 11.1G 8371M 11796 S  27.9 52.7 18:31.20 │  ├─ CPU 2/KVM
  10008 libvirt-qe  20   0 11.1G 8371M 11796 R  18.6 52.7 25:01.04 │  ├─ CPU 1/KVM
  10007 libvirt-qe  20   0 11.1G 8371M 11796 R   9.3 52.7  1h08:06 │  ├─ CPU 0/KVM
  10006 libvirt-qe  20   0 11.1G 8371M 11796 S   0.0 52.7  0:25.50 │  ├─ IO mon_iothread
  10002 libvirt-qe  20   0 11.1G 8371M 11796 S   0.0 52.7  0:00.11 │  └─ qemu-system-x86_64 -name guest=username,debug-threads=on -S -object {"qom-type":"secret
   9990 root        20   0 80140 13292 11496 S   0.0  0.1  0:00.00 ├─ virtlogd
   1644 username    20   0 19456 10288  7352 S   0.0  0.1  0:00.58 ├─ systemd --user
   9903 username    20   0  937M 89440 39952 S   0.0  0.5  0:40.61 │  └─ python3 /usr/bin/virt-manager
   9908 username    20   0  937M 89440 39952 S   0.0  0.5  0:07.74 │     ├─ virt-manager
   9907 username    20   0  937M 89440 39952 S   0.0  0.5  0:00.00 │     ├─ dconf worker
   9906 username    20   0  937M 89440 39952 S   0.0  0.5  0:00.00 │     ├─ gdbus
   9904 username    20   0  937M 89440 39952 S   0.0  0.5  0:00.00 │     └─ gmain
    960 root        20   0 1526M 34408 19836 S   0.0  0.2  0:22.20 └─ libvirtd
  10001 root        20   0 1526M 34408 19836 S   0.0  0.2  0:08.64    ├─ vm-username
   1014 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.06    ├─ udev-event
    990 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ gdbus
    989 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ gmain
    986 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    985 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    984 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    983 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    982 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    975 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.22    ├─ prio-rpc-libvir
    974 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.22    ├─ prio-rpc-libvir
    973 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.23    ├─ prio-rpc-libvir
    972 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.21    ├─ prio-rpc-libvir
    971 root        20   0 1526M 34408 19836 S   0.0  0.2  0:00.23    ├─ prio-rpc-libvir
    970 root        20   0 1526M 34408 19836 S   0.0  0.2  0:02.15    ├─ rpc-libvirtd
    969 root        20   0 1526M 34408 19836 S   0.0  0.2  0:02.11    ├─ rpc-libvirtd
    968 root        20   0 1526M 34408 19836 S   0.0  0.2  0:02.19    ├─ rpc-libvirtd
    967 root        20   0 1526M 34408 19836 S   0.0  0.2  0:02.09    ├─ rpc-libvirtd
    966 root        20   0 1526M 34408 19836 S   0.0  0.2  0:02.04    └─ rpc-libvirtd

  • Set NI (nice) value -5 for all root processes (You will need this every time you start or reboot your operating system)

$ sudo renice -5 -u root
  • Set NI (nice) value -20 for qemu-system-x86_64 (9998), virt-manager, libvirtd, kvm-nx-lpage-recovery-****, kvm, virtlogd commands (You will need this every time you start your guest machine)

display all the running threads for commands qemu-system-x86_64 (9998), virt-manager, libvirtd

example: $ sudo ps -Ljf <PID>
$ ps -Ljf 9998 9903 960

for commands qemu-system-x86_64 (9998), virt-manager, libvirtd run:

example: $ sudo renice -20 -g <PGID>
$ sudo renice -20 -g 9997 9903 960

for commands kvm-nx-lpage-recovery-9998, kvm, virtlogd run:

example: $ sudo renice -20 <PID>
$ sudo renice -20 10005 10004 9990
  • Set the commands kvm-nx-lpage-recovery-9998, kvm, qemu-system-x86_64 (9998), virtlogd, virt-manager, libvirtd to real-time (You will need this every time you start your guest machine)

$ sudo chrt -a -r -p 99 10005
$ sudo chrt -a -r -p 99 10004
$ sudo chrt -a -r -p 99 9998
$ sudo chrt -a -r -p 99 9990
$ sudo chrt -a -r -p 99 9903
$ sudo chrt -a -r -p 99 960
  • Run htop

$ htop -t

The end result should look something like:

  [Main] [I/O]
    PID▽USER       PRI  NI  VIRT   RES   SHR S  CPU% MEM%   TIME+  Command
      2 root        20  -5     0     0     0 S   0.0  0.0  0:00.00 kthreadd
  10011 root        RT -20     0     0     0 S   0.0  0.0  0:01.17 ├─ 9998
  10005 root        RT -20     0     0     0 S   0.0  0.0  0:00.11 ├─ kvm-nx-lpage-recovery-9998
  10004 root        RT -20     0     0     0 I   0.0  0.0  0:00.00 └─ kvm
      1 root        20  -5  166M 13300  7344 S   0.0  0.1  0:04.02 init
   9998 libvirt-qe  RT -20 11.1G 8371M 11796 S  93.0 52.7  2h35:34 ├─ qemu-system-x86_64 -name guest=username,debug-threads=on -S -object {"qom-type":"secret","
  18086 libvirt-qe  RT -20 11.1G 8371M 11796 S   0.0 52.7  0:00.00 │  ├─ worker
  10012 libvirt-qe  RT -20 11.1G 8371M 11796 S   0.0 52.7  0:20.20 │  ├─ SPICE Worker
  10010 libvirt-qe  RT -20 11.1G 8371M 11796 S   9.3 52.7 18:42.97 │  ├─ CPU 3/KVM
  10009 libvirt-qe  RT -20 11.1G 8371M 11796 S  27.9 52.7 18:31.20 │  ├─ CPU 2/KVM
  10008 libvirt-qe  RT -20 11.1G 8371M 11796 R  18.6 52.7 25:01.04 │  ├─ CPU 1/KVM
  10007 libvirt-qe  RT -20 11.1G 8371M 11796 R   9.3 52.7  1h08:06 │  ├─ CPU 0/KVM
  10006 libvirt-qe  RT -20 11.1G 8371M 11796 S   0.0 52.7  0:25.50 │  ├─ IO mon_iothread
  10002 libvirt-qe  RT -20 11.1G 8371M 11796 S   0.0 52.7  0:00.11 │  └─ qemu-system-x86_64 -name guest=username,debug-threads=on -S -object {"qom-type":"secret
   9990 root        RT -20 80140 13292 11496 S   0.0  0.1  0:00.00 ├─ virtlogd
   1644 username    20   0 19456 10288  7352 S   0.0  0.1  0:00.58 ├─ systemd --user
   9903 username    RT -20  937M 89440 39952 S   0.0  0.5  0:40.61 │  └─ python3 /usr/bin/virt-manager
   9908 username    RT -20  937M 89440 39952 S   0.0  0.5  0:07.74 │     ├─ virt-manager
   9907 username    RT -20  937M 89440 39952 S   0.0  0.5  0:00.00 │     ├─ dconf worker
   9906 username    RT -20  937M 89440 39952 S   0.0  0.5  0:00.00 │     ├─ gdbus
   9904 username    RT -20  937M 89440 39952 S   0.0  0.5  0:00.00 │     └─ gmain
    960 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:22.20 └─ libvirtd
  10001 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:08.64    ├─ vm-username
   1014 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.06    ├─ udev-event
    990 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ gdbus
    989 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ gmain
    986 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    985 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    984 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    983 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    982 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.00    ├─ rpc-admin
    975 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.22    ├─ prio-rpc-libvir
    974 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.22    ├─ prio-rpc-libvir
    973 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.23    ├─ prio-rpc-libvir
    972 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.21    ├─ prio-rpc-libvir
    971 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:00.23    ├─ prio-rpc-libvir
    970 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:02.15    ├─ rpc-libvirtd
    969 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:02.11    ├─ rpc-libvirtd
    968 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:02.19    ├─ rpc-libvirtd
    967 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:02.09    ├─ rpc-libvirtd
    966 root        RT -20 1526M 34408 19836 S   0.0  0.2  0:02.04    └─ rpc-libvirtd

Use 'q' to stop

  • If the issue is not completely resolved try to use fewer CPU cores. Referring to physical CPU topology set the number of cores to half. For example, the Intel® Core™ i5-6600 Processor has 4 cores. To use half number of cores set CPU topology to 1 sockets, 2 cores, 1 threads.
  • Increase the buffer size for your audio interface's ASIO driver.

Problem: Heavy load on the CPU when accessing the qcow2 disk image (Virtual Disk). Intermittent sound with crackling on virtual machine using sample libraries.

Action:

  • set virtual disk cache mode to unsafe
  • passthrough an additional physical SSD M.2 or passthrough an additional SATA 3.0 PCIe Gen3 x1 card for SATA SSD/HDD.

Problem: USB devices (HDD/SSD, Webcam, Midi keyboard) stop responding after a few minutes inactivity on a Windows 10 system.

Action:

  • disable USB Selective Suspending via Power Options

USB Selective Suspending

  • prevent the Windows 10 OS to turn off Generic SuperSpeed USB Hub, Generic USB Hub, USB Root Hub devices to save power via Device Manager.

USB Hub Power Management


REFERENCES


10
  • 1
    Just going to leave this here... I've followed this wonderful guide several times, and it is by far the best on the internet. Finally though I ran into an issue after using it. I was getting: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID) Which led me to this page: forum.proxmox.com/threads/… So if you follow this and still get this PCI error... adding pcie_aspm=off to the list on Step 4. fixed it
    – stevens
    Oct 5, 2023 at 19:40
  • Is "blacklist" in step 9 needed?
    – jw_
    Nov 7, 2023 at 23:04
  • In step 12, should the "kernel driver in use:" message become "kernel driver in use:vfio-pci" instead of disappear?
    – jw_
    Nov 7, 2023 at 23:06
  • If you are using Ubuntu 22.04 LTS, 22.10 or 23.04 the lines “blacklist nouveau” and “blacklist snd_hda_intel” are required in step 9. The lines “Kernel driver in use: nouveau” and “Kernel driver in use: snd_hda_intel” should not be present in the text in step 12. Note that if you are using different Linux distribution or an earlier version of Ubuntu, the process and texts displayed may be different.
    – TACHMALEX
    Nov 9, 2023 at 8:00
  • @TACHMALEX both are true for me in 22.04 with dual GPU
    – jw_
    Nov 9, 2023 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .