hostnamectl; # tested with
 Static hostname: workstation
Operating System: Debian GNU/Linux 13 (trixie)        
          Kernel: Linux 6.12.30-amd64
    Architecture: x86-64
  Hardware Model: Gigabyte B550 Aorus Elite AX V2 rev-1 Socket AM4

# gpu used
nvidia RTX 5060 Ti 16GByte

the idea

  • start windows-gaming-vm and never have to dual boot or leave GNU Linux 😀
    • windows: more desease than software, the only way how windows shall be run: virtualized, in a sandbox, with snapshots, because too much can go wrong X-D (ever heared of 0xC004F211, no? be happy, it basically means windows wants to be “reactivated” whenever there is a MINOR hardware change like MAC of NIC or a new GPU #wtf
    • basically being able to use GNU Linux and windows-gaming on the same pc AT THE SAME TIME 😀
    • maybe even share GPU between VMs that can make use of CUDA cores
    • the idea is to have a dedicated GPU to be pci-passed-through to a windows VM in order to be used for gaming
    • already making use of this advantage… as currently there is a 3D benchmark running on the vm while editing that wordpress post (having 2x mouse and 2x keyboards attached = it is literarily like using 2x PCs but it’s actually only 1x PC)
  • so GNU Linux would run on the host WHILE a gaming VMs using the GPU are running at the same time (there is some PRO feature disabled per default by nvidia that would allow even GPU sharing between VMs?)
    • GNU Linux shall use the excellent onboard dual monitor out of Gigabyte B550 (1x HDMI and 1x DisplayPort)
      • please note that the Gigabyte B550 considers primary display to be the monitor that is DisplayPort connected (!) either to onboard or GPU at PCIe1, even if IGU “forced” is selected
      • so connect the user’s primary monitor to DisplayPort of onboard Gigabyte B550 (if monitor has only HDMI consider an adapter)
      • there might be another problem: when a dedicated GPU is installed on Gigabyte B550, it ALWAYS uses the dedicated PCIe attached GPU as default monitor output 🙁
        • which in the worst case means: unplug monitor from NVIDIA GPU, start pc, replug monitor to NVIDIA GPU X-D (so Gigabyte B550 EFI_BIOS + NVIDIA basically are able to detect, that a monitor cable is connected, no matter if monitor is powered on or off… and then proceed to use the NVIDIA GPU as default monitor output X-D)
      • also note that monitor cables (no matter VDI, DisplayPort or HDMI) are prone to electro magnetic interference so place them away from power cables and other forces of electro magnetic interference

PS: every beginning is hard… as might be known is the GNU Linux support of nvidia not great (it has hopefully gotten better) so on first install of the GPU of course no drivers could work with the GPU (black screen) (Linus f*** you nvidia)

messing with UEFI_BIOS to ensure all required hardware options are enabled

check CPU support: ensure CPU supports hardware virtualization (Intel VT-x or AMD-V) and that it’s enabled in your UEFI_BIOS settings.

  • Check KVM kernel module:
    lsmod | grep kvm

    on the host system, there should be “kvm_intel” or “kvm_amd” and “kvm” loaded

  • lsmod | grep kvm
    kvm_amd               217088  0
    kvm                  1396736  1 kvm_amd
    irqbypass              12288  1 kvm
    ccp                   163840  1 kvm_amd
    
    lsmod|grep vfio
    vfio_pci               16384  0
    vfio_pci_core          94208  1 vfio_pci
    vfio_iommu_type1       45056  0
    vfio                   61440  3 vfio_pci_core,vfio_iommu_type1,vfio_pci
    irqbypass              12288  2 vfio_pci_core,kvm
    
    
  • check for virtualization support: run
    • lscpu | grep Virtualization
      Virtualization: AMD-V

otherwise virt-manager might complain like: “Unable to add device: unsupported configuration: Emulator ‘/usr/bin/qemu-system-x86_64’ does not support virt type ‘kvm'”

disable all nvidia drivers on host

this will prevent GNU Linux from “grabbing” the device and trying to use it (per default only 1x OS can use the GPU at a time)

echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf;
echo 'blacklist nvidia' >> /etc/modprobe.d/blacklist.conf;
echo 'blacklist nvidiafb' >> /etc/modprobe.d/blacklist.conf;

gathering info

# list all installed available GPUs
apt update && apt install lshw
lshw -C display
  *-display UNCLAIMED       
       description: VGA compatible controller
       product: NVIDIA Corporation
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0 <- this is how it will show up in virt-manager
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vga_controller cap_list
       configuration: latency=0
       resources: memory:b0000000-bfffffff memory:d0000000-d1ffffff ioport:f000(size=128) memory:d4000000-d407ffff memory:d4080000-d40bffff memory:c0000000-cfffffff memory:d2000000-d3ffffff
  *-display
       description: VGA compatible controller
       product: Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:09:00.0
       logical name: /dev/fb0
       version: c9
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=amdgpu latency=0 resolution=1920,1080
       resources: irq:32 memory:e0000000-efffffff memory:d8000000-d81fffff ioport:d000(size=256) memory:f8a00000-f8a7ffff memory:c0000-dffff

# get more details
lspci|grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation Device 2d04 (rev a1) <- dedicated GPU
09:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c9) <- onboard iGPU of AMD Ryzen5600G

# this is probably for audio output over HDMI
01:00.1 Audio device: NVIDIA Corporation Device 22eb (rev a1)

# more details
lspci -v|less
# then search for /NVIDIA
01:00.0 VGA compatible controller: NVIDIA Corporation Device 2d04 (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device 5351
        Flags: fast devsel, IRQ 105, IOMMU group 9
        Memory at b0000000 (64-bit, prefetchable) [size=256M]
        Memory at d0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at f000 [size=128]
        Expansion ROM at d4000000 [disabled] [size=512K]
        Capabilities: [40] Power Management version 3
        Capabilities: [48] MSI: Enable- Count=1/16 Maskable+ 64bit+
        Capabilities: [60] Express Legacy Endpoint, IntMsgNum 0
        Capabilities: [9c] Vendor Specific Information: Len=14 <?>
        Capabilities: [b0] MSI-X: Enable- Count=9 Masked-
        Capabilities: [100] Secondary PCI Express
        Capabilities: [12c] Latency Tolerance Reporting
        Capabilities: [134] Physical Resizable BAR
        Capabilities: [140] Virtual Resizable BAR
        Capabilities: [14c] Data Link Feature <?>
        Capabilities: [158] Physical Layer 16.0 GT/s <?>
        Capabilities: [188] Physical Layer 32.0 GT/s <?>
        Capabilities: [1b8] Advanced Error Reporting
        Capabilities: [200] Lane Margining at the Receiver
        Capabilities: [248] Alternative Routing-ID Interpretation (ARI)
        Capabilities: [250] Single Root I/O Virtualization (SR-IOV)
        Capabilities: [2a4] Vendor Specific Information: ID=0001 Rev=1 Len=014 <?>
        Capabilities: [2bc] Power Budgeting <?>
        Capabilities: [2f4] Device Serial Number e6-xx-xx-xx-xx-xx-xx-xx
        Kernel modules: nouveau

01:00.1 Audio device: NVIDIA Corporation Device 22eb (rev a1)
        Subsystem: NVIDIA Corporation Device 0000
        Flags: bus master, fast devsel, latency 0, IRQ 109, IOMMU group 9
        Capabilities: [40] Power Management version 3
        Capabilities: [48] MSI: Enable- Count=1/1 Maskable+ 64bit+
        Capabilities: [60] Express Endpoint, IntMsgNum 0
        Capabilities: [9c] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Data Link Feature <?>
        Capabilities: [10c] Advanced Error Reporting
        Capabilities: [154] Alternative Routing-ID Interpretation (ARI)
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

lspci -vnns 01:00.0; # get more details
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:2d04] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:5351]
	Flags: fast devsel, IRQ 105, IOMMU group 9
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	Memory at d0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at f000 [size=128]
	Expansion ROM at d4000000 [disabled] [size=512K]
	Capabilities: [40] Power Management version 3
	Capabilities: [48] MSI: Enable- Count=1/16 Maskable+ 64bit+
	Capabilities: [60] Express Legacy Endpoint, IntMsgNum 0
	Capabilities: [9c] Vendor Specific Information: Len=14 <?>
	Capabilities: [b0] MSI-X: Enable- Count=9 Masked-
	Capabilities: [100] Secondary PCI Express
	Capabilities: [12c] Latency Tolerance Reporting
	Capabilities: [134] Physical Resizable BAR
	Capabilities: [140] Virtual Resizable BAR
	Capabilities: [14c] Data Link Feature <?>
	Capabilities: [158] Physical Layer 16.0 GT/s <?>
	Capabilities: [188] Physical Layer 32.0 GT/s <?>
	Capabilities: [1b8] Advanced Error Reporting
	Capabilities: [200] Lane Margining at the Receiver
	Capabilities: [248] Alternative Routing-ID Interpretation (ARI)
	Capabilities: [250] Single Root I/O Virtualization (SR-IOV)
	Capabilities: [2a4] Vendor Specific Information: ID=0001 Rev=1 Len=014 <?>
	Capabilities: [2bc] Power Budgeting <?>

lspci -vnns 01:00.1
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:22eb] (rev a1)
	Subsystem: NVIDIA Corporation Device [10de:0000]
	Flags: bus master, fast devsel, latency 0, IRQ 109, IOMMU group 9
	Capabilities: [40] Power Management version 3
	Capabilities: [48] MSI: Enable- Count=1/1 Maskable+ 64bit+
	Capabilities: [60] Express Endpoint, IntMsgNum 0
	Capabilities: [9c] Vendor Specific Information: Len=14 <?>
	Capabilities: [100] Data Link Feature <?>
	Capabilities: [10c] Advanced Error Reporting
	Capabilities: [154] Alternative Routing-ID Interpretation (ARI)
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel


allowing device to be passed through

su - root
vim /etc/default/grub
# If you change this file or any /etc/default/grub.d/*.cfg file,
# run 'update-grub' afterwards to update /boot/grub/grub.cfg.
# For full documentation of the options in these files, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Debian} ) 2>/dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="ipv6.disable=1 amd_iommu=on iommu=pt pci_stub.ids=10de:2d04,10de:22eb pci=nommconf"

# activate changes
update-grub2

adding GPU to vm

  • create a new windows vm (10 or 11)
  • install windows
  • in virt-manager go to details and add NVIDIA PCI device to vm
  • possible problems:
    • virt-manager: “not viable” “Please ensure all devices within the iommu_group are bound to their vfio bus driver”
      • also pass through the 2nd NVIDIA (hdmi audio) device to the vm
    • virt-manager: “vfio 0000:01:00.0: hardware reports invalid configuration, MSIX PBA outside of specified BAR”
      • possible fix
      • possible fix in UEFI_BIOS enable Re-Size BAR Support (leave it on Auto should be fine):
  • it might be required to update UEFI_BIOS in order to get this option?

not sure

if this setting is also required

in summary: fazit: resume: does it work?

after all this hazzle… does it work?

yes but… unexpected results and benchmarks?

  • gaming on GNU Linux VM: Desktops that use wayland will profit from high framerate (x11 based not)
    • when gaming on GNU Linux Debian 13 vm + gnome desktop (wayland) it is unclear how to make detect and use both VGA devices (virt-manager RedHat VGA AND NVIDIA) so it only outputs on virt-manager where framerates are bad and also for some reasons controls are very sluggish X-D (even when passing through mouse + keyboard via USB)
  • so next to test is Ubuntu 24 stay tuned
    • problem seems to be secure boot: (secureboot)
      • when modifying the vm xml config: (src) there is IMMEDIATE output on the GPU Monitor… but Ubuntu fails to boot, otherwise no output on th GPU Monitor
        • <os firmware="efi">
            <type arch="x86_64" machine="pc-q35-9.2">hvm</type>
            <firmware>
             <feature enabled="yes" name="enrolled-keys"/>
             <feature enabled="yes" name="secure-boot"/>
            </firmware>
    • (it requires to redownload all those massively big Gigabytes of game files over a limited bandwith starlink connection X-D = takes days)
  • so next to test is Arch GNU Linux stay tuned
  • gaming on Windows 10 vm: it nicely detects both monitors the kvm RedHat virtual VGA device AND the NVIDIA GPU and outputs on both monitors (while only the directly to NVIDIA connected monitor is capable of outputting the desired framerates)
    • audio works as long as virt-manager window is open (in background)
    • it is REQUIRED to have another set of keyboard + mouse (or gamepad) attached to host PC and also USB-pass-through those for responsive gaming

[+] it is really cool to have basically “two-PCs-in-one” this allows to have mail client open or other activity while the game-pc is running on screen2, so if this works it would be the new default 😀

[?] audio works as long as

  • the virtual spice gpu is still there (in windows: “extend screen”) and the vm window is opened and stays open through virt-manager (it can be in the background but it needs to be open)
  • in windows “device management” “gerätemanager” disable “NVIDIA High Definition Audio” and “NVIDIA Virtual Audio Device (Wave Extensible) (WDM)” to make it use the default kvm “High Definition Audio Device”

[-] now comes a lot of BIG BUTs

GNU Linux drivers?

GNU Linux Debian 12 how to install NVIDIA 5060 drivers

windows drivers?

for windows it’s rather simple just get the correct driver by filling out this mask (user has to know the details of GPU very well)

Links:

GNU Linux – how to – kvm qemu pci pass through – GPU Graphic Card or other PCI device – Windows Games on GNU Linux

valve employs psychologists

We work together in person, in Bellevue, WA, USA

Apply now!

As a company focused on making sure our customers have a good experience, Valve employs psychologists to help guide that work. We’re always looking for talented folks to add to our team. Psychologists at Valve use their knowledge of experimental design, research methods, statistics, and human behavior to help us with a wide variety of initiatives across the company. Some projects that Valve psychologists have worked on in the past include:

  • Crafting compelling gameplay experiences for future Valve titles
  • Providing insights on human behavior to improve customer experiences on Steam, our game distribution platform
  • Conducting statistical analyses on Valve’s gameplay, financial, and company data to identify patterns of behavior
  • Researching compelling new hardware technologies
  • Designing experiments to evaluate various gameplay hypotheses and design choices
  • Improving existing playtesting methodologies
  • Developing innovative ways of acquiring data to answer questions about Valve’s products and business practices

The psychologists that we currently have at Valve have a graduate degree in Psychology or related field; advanced knowledge of statistics; proven experience applying research skills to the development of consumer products and services; research experience in cognitive, social, human factors, and related fields in psychology; and proficiency in programming languages such as C++, Python, SQL, and PHP.

Interested? Send us your resume.

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin