vfio support?

Message
Author
skallal
Posts: 258
Joined: Fri Jul 28, 2023 12:47 pm

vfio support?

#1 Post by skallal »

I've been experimenting with VMs lately after finally getting my bridge network working. I've been running the flagship OS from the Redmond outfit (W11Pro) and have done most all the possible performance tweaks. One annoying issue is random audio pops and it seems vfio is a possible fix. This is a common audio symptom on Windows KVM guests so I'm in good company.

Discovered vfio is not a download, but compiled into the kernel and lsmod tells me is not there. I don't want to start customizing the kernel if possible.

My audio originally had pulse enabled and had some conflicts last summer so I went to pipewire. Don't recall the details. But a recent test install of MX 23 XFCE on the same bare metal has fewer audio packages installed than my main daily driver install does. Mention this because the audio on a VM guest is no better than the host audio. My host audio sounds fine, but not an audio buff either.

So what's the easiest my to get vfio for testing?

Code: Select all

Snapshot created on: 20240223_1545
System:
  Kernel: 6.1.0-18-amd64 [6.1.76-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-18-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.2_x64 Libretto July 24  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop System: LENOVO product: 10MK0036US v: ThinkCentre M910s
    serial: <superuser required> Chassis: type: 3 serial: <superuser required>
  Mobo: LENOVO model: 3106 v: SDK0J40705 WIN 3425076170358 serial: <superuser required>
    UEFI-[Legacy]: LENOVO v: M1AKT59A date: 10/27/2023
CPU:
  Info: model: Intel Core i5-6500 bits: 64 type: MCP arch: Skylake-S gen: core 6 level: v3
    note: check built: 2015 process: Intel 14nm family: 6 model-id: 0x5E (94) stepping: 3
    microcode: 0xF0
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 900 min/max: 800/3600 scaling: driver: intel_pstate governor: powersave
    cores: 1: 900 2: 900 3: 900 4: 900 bogomips: 25599
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: KVM: Split huge pages
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT disabled
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  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: IBRS, IBPB: conditional, STIBP: disabled, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: Intel HD Graphics 530 vendor: Lenovo driver: i915 v: kernel arch: Gen-9
    process: Intel 14n built: 2015-16 ports: active: DP-2 empty: DP-1, DP-3, HDMI-A-1, HDMI-A-2
    bus-ID: 00:02.0 chip-ID: 8086:1912 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
  Monitor-1: DP-2 model: Asus VE278 serial: <filter> built: 2012 res: 1920x1080 hz: 60 dpi: 82
    gamma: 1.2 size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes: max: 1920x1080
    min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 530 (SKL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel 200 Series PCH HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel
    bus-ID: 00:1f.3 chip-ID: 8086:a2f0 class-ID: 0403
  API: ALSA v: k6.1.0-18-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6 chip-ID: 8086:15b7 class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: br0 state: up speed: 1000 Mbps duplex: unknown mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
  IF-ID-3: virbr0 state: down mac: <filter>
  IF-ID-4: vnet0 state: unknown speed: 10 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 912.9 GiB used: 512.59 GiB (56.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 840 Series size: 232.89 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 6B0Q scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: Crucial model: CT480BX500SSD1 size: 447.13 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 054 scheme: MBR
  ID-3: /dev/sdc maj-min: 8:32 type: USB model: USB DISK 3.2 size: 232.89 GiB block-size:
    physical: 512 B logical: 512 B type: N/A serial: <filter> rev: PMAP scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 447.13 GiB size: 439.04 GiB (98.19%) used: 264.54 GiB (60.3%) fs: ext4
    dev: /dev/sdb1 maj-min: 8:17
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 4 GiB used: 956 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 33.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 3334 pm: dpkg pkgs: 3298 libs: 1813 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 36
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bullseye main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://la.mirrors.clouvider.net/debian bookworm-updates main contrib non-free
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://la.mirrors.clouvider.net/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free
    3: deb http://deb.debian.org/debian bookworm main contrib
    4: deb http://deb.debian.org/debian bookworm-updates main contrib
  Active apt repos in: /etc/apt/sources.list.d/docker.list
    1: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list
    1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/microsoft-edge.list
    1: deb [arch=amd64] https://packages.microsoft.com/repos/edge/ stable main
  Active apt repos in: /etc/apt/sources.list.d/microsoft-prod.list
    1: deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/debian/11/prod bullseye main
  Active apt repos in: /etc/apt/sources.list.d/mono-official-vs.list
    1: deb https://download.mono-project.com/repo/debian vs-buster main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://la.mxrepo.com/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/onlyoffice.list
    1: deb https://download.onlyoffice.com/repo/debian squeeze main
  Active apt repos in: /etc/apt/sources.list.d/ookla_speedtest-cli.list
    1: deb [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] https://packagecloud.io/ookla/speedtest-cli/debian/ bookworm main
    2: deb-src [signed-by=/etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg] https://packagecloud.io/ookla/speedtest-cli/debian/ bookworm main
  Active apt repos in: /etc/apt/sources.list.d/scootersoftware.list
    1: deb [signed-by=/usr/share/keyrings/scootersoftware-keyring.gpg] https://www.scootersoftware.com/ bcompare4 non-free
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
Info:
  Processes: 323 Uptime: 1d 37m wakeups: 10 Memory: 31.24 GiB used: 14.89 GiB (47.7%) Init: systemd
  v: 252 target: graphical (5) default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)

User avatar
CharlesV
Administrator
Posts: 8062
Joined: Sun Jul 07, 2019 5:11 pm

Re: vfio support?

#2 Post by CharlesV »

Have you tried loading a newer kernel?

You can always just boot back to the kernel that you have now, but I would try a later one.

I am also a firm believer that the liquorix kernel is much better for desktops, and many issues have been 'fixed' in loading one. Specifically, I have found 6.4.15, 6.5.11 and 6.6.12 all to be very good. (These are the ones that have seemed to run 'best' on my machines - but honestly all have been pretty good! )

I prefer to hang back a bit on the latest kernels, so I have not tried the 6.7 kernels yet, however they are now up into the 6.7.5 , 6 and 8 range, so I will be checking them out shortly :-)
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

skallal
Posts: 258
Joined: Fri Jul 28, 2023 12:47 pm

Re: vfio support?

#3 Post by skallal »

@CharlesV

I see there's a very long Windows 10 topic on the forum. Well after a few months of mostly MX Linux, I started test driving Windows 11 Pro in KVM. My Lenovo is now up to 32 GB RAM and the W11 VM is given 16 GB. Frankly an i5 quad core is kind of light for a VM host machine with a Windows guest. I've managed to enable most all of the possible performance enhancements including pinning all CPU cores, virtio disk driver vs sata, among others. At first the VM was nearly unusable. But now it's good for average usage though nothing to write home about.

Most of all the search hits for Windows performance on KVM point to VFIO. So that's the reason for this post.

But since this is a Linux forum, let me say I think Windows 11 is a step down from 10. Even if you ignore the hardware restrictions, the usability has taken a hit. It does has UI polish no doubt. It's harder to do simple tweaks than before if at all. The only real motivation for the upgrade is the imminent planned demise of W10 some 19 months from now.

Back to the kernel. Guess I'll give the Liquorix kernel another try. Last tested it on my 13 year now Acer Gateway machine with a 2011 BIOS and had some issues. My Lenovo has a BIOS dated 10/2023. While it's not 2 year old hardware, the BIOS is recent.

User avatar
CharlesV
Administrator
Posts: 8062
Joined: Sun Jul 07, 2019 5:11 pm

Re: vfio support?

#4 Post by CharlesV »

ya, personally I have found that win 11 runs like crap unless you remove ALL the garbage and dont load everything and its brother - which windows does by default. I also believe win10 is better / faster.. but .. oh well.

I have the following routines:
- remove all "apps" that ms adds (xbox, skype, radios, players, games, dropbox, onedrive, teams etc etc. )
- turn OFF all apps that auto start!! (especially edge, and pretty much 100% of anything loading that isnt required! )
- tweak power settings to performance!
- change it's paging method to one I calculate.
- there is only one antivirus I will install - eset.

As for the KVM.. I only use VirtualBox, so I wont be too much help on what works better / best for KVM... And frankly, my win installs all work very well on my i7-9700K and i7-13700 using 16gb ram and based on WD Black nvme's!
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
dolphin_oracle
Developer
Posts: 22725
Joined: Sun Dec 16, 2007 12:17 pm

Re: vfio support?

#5 Post by dolphin_oracle »

Code: Select all

modinfo vfio
says the modules are present on the debian stable kernel 6.1.0-18
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

skallal
Posts: 258
Joined: Fri Jul 28, 2023 12:47 pm

Re: vfio support?

#6 Post by skallal »

dolphin_oracle wrote: Mon Mar 11, 2024 6:01 pm

Code: Select all

modinfo vfio
says the modules are present on the debian stable kernel 6.1.0-18
Well guess I do have vfio! I ran

Code: Select all

lsmod | grep -i vfio
and returned nothing. I suspect there could be some parameters to be added to grub? Back to the search engines...

Post Reply

Return to “Hardware /Configuration”