After installing QEMU, it takes 5+ minutes before desktop appears, and GPU passthrough does not work

Hello.

I started using Linux recently after getting myself a PC with 32 core CPU. Still a freshmen to most of this. I found that only this version of linux “Manjaro XFCE” woks with my PC! I tried others with nothing but problems and no boot issues!

I feel a bit comfortable with this distro., so I wanted to start using virtualisation (I need Windows 10 for some FEM/CFD work, and therefor I need to passthrough my GPU), and quickly found out that QEMU was the way to go, and I ended up following:
https://www.youtube.com/watch?v=KVDUs019IB8
That got me locked out of my PC.
Format, fresh system, and follow this;
https://www.youtube.com/watch?v=6KqqNsnkDlQ&t=592s
Which did not work well because the mouse was lagging when I set:
Video - to - VirtIO
The only thing that I liked is dedicating an SSD to a virtual machine!

So I wiped my system, and tryed:
https://www.youtube.com/watch?v=m4cHMIMc0Cs

Each time after I install QEMU, and after I restarted my host PC and enter the password, NOTHING happened for 5++ minutes before the desktop comes up!

I have now found this (recently :frowning: ):
[How to] Setting up QEMU/KVM with virt-manager
[[How to] Setting up QEMU/KVM with virt-manager](https://[How to] Setting up QEMU/KVM with virt-manager)

Really tired of whiping the system :frowning: I want a stable life.
To make sure that I did not do something wrong, I want to diagnose my system, or just know if it is even possible to have this done at all with this system (passthrough my GPU to the virtual machine)

Can anyone with knowledge about virtual machines help me diagnose this problem!

  • 5++ minutes before the desktop comes up after logging in!
  • GPU passthrough does not work

Many thanks in advance :slight_smile:

Edit (1)
from posting

uname -r
inxi -xx
inxi -xxG

to
inxi --full --admin --filter --width

PC spec:
inxi --full --admin --filter --width

System:
  Kernel: 6.6.26-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=c3918dd0-4642-4500-b1a8-3cae09e6e200 rw quiet splash apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 wm: xfwm4 v: 4.18.0
    with: xfce4-panel tools: xfce4-screensaver vt: 7 dm: LightDM v: 1.32.0
    Distro: Manjaro base: Arch Linux
Machine:
  Type: Desktop System: ZZZ product: ZZZ v: N/A
    serial: <superuser required>
  Mobo: ASUSTeK model: PRIME TRX40-PRO v: Rev 1.xx
    serial: <superuser required> part-nu: 12345 uuid: <superuser required>
    UEFI: American Megatrends v: 1701 date: 12/13/2022
Battery:
  Device-1: hidpp_battery_0 model: Logitech G604 Wireless Gaming Mouse
    serial: <filter> charge: 10% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: AMD Ryzen Threadripper 3970X bits: 64 type: MT MCP arch: Zen 2
    gen: 3 level: v3 note: check built: 2020-22 process: TSMC n7 (7nm)
    family: 0x17 (23) model-id: 0x31 (49) stepping: 0 microcode: 0x830107B
  Topology: cpus: 1x cores: 32 tpc: 2 threads: 64 smt: enabled cache:
    L1: 2 MiB desc: d-32x32 KiB; i-32x32 KiB L2: 16 MiB desc: 32x512 KiB
    L3: 128 MiB desc: 8x16 MiB
  Speed (MHz): avg: 2229 high: 3700 min/max: 2200/4549 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2200 2: 2200
    3: 2200 4: 2200 5: 2200 6: 2200 7: 2200 8: 2200 9: 2200 10: 2200 11: 2200
    12: 2200 13: 2200 14: 2200 15: 2200 16: 2200 17: 2200 18: 2200 19: 2599
    20: 2200 21: 2200 22: 2200 23: 2200 24: 2200 25: 2200 26: 2200 27: 2200
    28: 2200 29: 2200 30: 2200 31: 2200 32: 2196 33: 3700 34: 2200 35: 2200
    36: 2200 37: 2200 38: 2200 39: 2200 40: 2200 41: 2200 42: 2200 43: 2200
    44: 2200 45: 2200 46: 2200 47: 2200 48: 2200 49: 2200 50: 2200 51: 2200
    52: 2200 53: 2200 54: 2200 55: 2200 56: 2200 57: 2200 58: 2200 59: 2200
    60: 2200 61: 2200 62: 2200 63: 2195 64: 2200 bogomips: 472906
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP
    protection
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; STIBP:
    always-on; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU104GL [Quadro RTX 4000] driver: nvidia v: 550.67
    alternate: nouveau,nvidia_drm non-free: 550.xx+ status: current (as of
    2024-04; EOL~2026-12-xx) arch: Turing code: TUxxx process: TSMC 12nm FF
    built: 2018-2022 pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3
    speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:1eb1 class-ID: 0300
  Display: x11 server: X.org v: 1.21.1.12 compositor: xfwm4 v: 4.18.0 driver:
    X: loaded: nvidia gpu: nvidia display-ID: :0.0
    note: <missing: xdpyinfo/xrandr>
  Monitor-1: Unknown-1 size-res: N/A modes: 1024x768
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: kms_swrast surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.67 glx-v: 1.4
    direct-render: yes renderer: Quadro RTX 4000/PCIe/SSE2 memory: 7.81 GiB
Audio:
  Device-1: NVIDIA TU104 HD Audio driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f8 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK driver: N/A
    alternate: snd_hda_intel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 22:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: ASUSTek USB Audio driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 7-6:3
    chip-ID: 0b05:1918 class-ID: 0300
  API: ALSA v: k6.6.26-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: c000 bus-ID: 44:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp68s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Broadcom BCM4352 802.11ac Dual Band Wireless Network Adapter
    vendor: ASUSTeK PCE-AC56 Dual-Band driver: wl v: kernel modules: bcma pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 49:00.0 chip-ID: 14e4:43b1
    class-ID: 0280
  IF: wlp73s0 state: dormant mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
  IF-ID-2: virbr0SAM state: down mac: <filter>
  Info: services: NetworkManager,wpa_supplicant
Bluetooth:
  Device-1: ASUSTek ASUS USB-BT500 driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 9-2.1:5 chip-ID: 0b05:190e
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
  Local Storage: total: 4.39 TiB used: 420.97 GiB (9.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:3 vendor: Intel model: SSD
    size: 1.86 TiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 002C temp: 36.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung model: SSD
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 3B2QJXD7 temp: 40.9 C
    scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Crucial model: CT750MX300SSD1
    size: 698.64 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: R011 scheme: MBR
  ID-4: /dev/sdc maj-min: 8:32 vendor: Generic model: USB3.0 CRW -SD
    size: 29.81 GiB block-size: physical: 512 B logical: 512 B type: USB rev: 2.1
    spd: 480 Mb/s lanes: 1 mode: 2.0 tech: N/A serial: <filter> fw-rev: 1.00
Partition:
  ID-1: / raw-size: 1.82 TiB size: 1.79 TiB (98.37%) used: 420.96 GiB (23.0%)
    fs: ext4 dev: /dev/nvme1n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 51.9 C mobo: N/A gpu: nvidia temp: 38 C
  Fan Speeds (rpm): N/A gpu: nvidia fan: 30%
Info:
  Memory: total: 128 GiB note: est. available: 125.64 GiB
    used: 13.34 GiB (10.6%)
  Processes: 937 Power: uptime: 23h 17m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 1 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 50.25 GiB services: upowerd,xfce4-power-manager
    Init: systemd v: 255 default: graphical tool: systemctl
  Packages: 1335 pm: dpkg pkgs: 0 pm: pacman pkgs: 1311 libs: 346
    tools: pamac,yay pm: flatpak pkgs: 24 Compilers: clang: 16.0.6 gcc: 13.2.1
    Shell: Bash v: 5.2.26 running-in: xfce4-terminal inxi: 3.3.34

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

I’m not one that can actually help you,
but:
don’t be stingy with the inxi information

Do you actually have only one graphics card?

This forum link you gave
is not about GPU passthrough.

Probably no one will watch videos you tried to follow to point out where they may fall short.

Have a look at the Arch wiki for GPU passthrough.

1 Like

It would be useful to tell which windows exactly are you trying to run. I have not tried 11 under qemu and only slimmed versions of 10 because i have too little ram and i do not really need it, since i am dual booting anyway. It can be wrong choice of virtual bios, or the video, or some cpu flags/passthrough. Do not know how the thing with tpm is, but the probability is low.
2 things that are more probable: the boot order, maybe the VM is trying to boot from network?? Or a CD image that is not there (in that case there is an error, but who knows). Also, maybe the windows itself is scanning the network and looking for a shared folder or something. I remember i had some problems with the virtual lan adapter, it might be worth toggling the options, virtio/e1000, etc. Also, the network service was not turned on by default. See Edit - connection details in the main Virtmanager window.

And another small note - make sure you choose KVM as connector. It gives near native performance.

1 Like

I have now edited the post.

Yes, the CPU does not have any either.

This will be my next tutorial to try regardless :slight_smile:

That’s not at all required, I just want to know if someone has had anything similar to my problems. I am expecting a lot of suffering before getting things to work.

No :frowning: I have a lot of difficulties reading. I want to go the easy way / the “tutorial way” first.

First thing is, the 5++ minutes happens on the host PC, not the virtual machine, and it only happens after:
sudo pacman -Syy qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat ebtables iptables

Windows 10, because I heard that Windows 11 tpm is troublesome!

Boot order is correct. Just the “SSD” to boot from & nothing else.

I tried every network trick suggested on the internet :confused:

That too is something that I played with. The virtual machine is still laggy.

I tried that, & I tried “NAT-bridge”

Try instead:

sudo pacman -Syu qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat ebtables iptables

-Syu will perform an update while installing those packages.
Please don’t use -Syy to install anything.

Cheers.

3 Likes

post the output of

groups

a good source is this one:

check his yt-channel for more tutorials

2 Likes

Then that is already the end of it (for GPU passthrough) - as far as I know.

PCI passthrough via OVMF - ArchWiki

You just need to read and check for the prerequisites in the first two paragraphs.

I have installed and used Windows 10 in VirtualBox and qemu/kvm and did not have a problem.
Have not used them for a long time, but still have the disk images backed up in case I may need them again.

Just an observation:
your screenshot shows the name LXC - I don’t know what to make of that

1 Like

I believe this is accurate. This review, as an example, mentions nothing about graphics, and it’s otherwise fairly thorough; I’m not looking beyond this article, but perhaps someone else might;

1 Like

https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers

1 Like

groups
sys network power libvirt lp wheel i

THIS made me sad. All the suffering that I could have avoided :frowning:
Awsome video :smiley: Thank you so much for sharing this :hugs:

I just read that & I agree with you.
Never did I ever get “a hint” anywhere that I must:

PCI passthrough via OVMF

The Open Virtual Machine Firmware (OVMF) is a …, it is now possible to passthrough a graphics card,… .

Provided you have a desktop computer with a spare GPU you can dedicate to the host… .

I need to buy a graphics card :frowning:

Avoid Nvidia (personal opinion). There are plenty of AMD (amdgpu) graphics cards available to choose from.

That is all. Cheers.

1 Like

think also to update your UEFi motherboard

1 Like

Specifically, the BIOS (if needed), and any mainboard-specific firmware or drivers for Linux (there likely won’t be many of those).

1 Like

For sure :100: a 6900 or a 7900, if I could find a cheap one.

Thank you all who participated :slight_smile:
Your help is much appreciated :slight_smile:
Sorry for the mod that had to edit my post, I’ll do better next time, I used “Quote”
instead of Code

@stephane I’ll also look at updating the motherboard, and thank you for the link :hugs:

Good day to you all

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.