Steam for Linux Guide

Tutorial: SteamOS with KVM and real video card for GPU passthrough for Steam for Linux

Tutorial: SteamOS with KVM and real video card for GPU passthrough

Overview

Hi,for testing SteamOS, I build a virtual KVM Machine with GPU passthrough, now I can test SteamOS without reboot or a dedicaded harddisk for SteamOS.Video links are in English and German

Short Video Demo

Video Tutorial

English:

for preparation of the system, watch to the 6th minute

And now you can install Steam OS

German:

Für die Vorbereitung des System bitte dieses Videl bis zu 6ten Mintue schauen.

Und dann kann Steam OS installiert werden.

Short text Guide

What you need:

Hardware:

  • CPU with pci passthrough support, for intel vt-d and for AMD iommu
  • mainboard chipset with pci passthrough support, like CPU
  • GPU with UEFI boot support ( without UEFI boot support it’s possible, but you have to patch your kernel and it depends on your hole configuration.

Software:

  • Linux kernel with vfio support, you need some activated modules. My Tutorials are made with Debian 8.1 Jessie, it works without patching or other modifications.
  • qemu / kvm with vfio support

Backgroundinfo:

System preparation

BIOS

  • You have to activate vt-d or IOMMU support from BIOS, if there is no point to activate check the next to points, sometimes it’s workings but not official supported.
  • check your dmesg for activated iommu support in your kernel like here[www.linux-kvm.org]
    Intel

    dmesg | grep -e DMAR -e IOMMU … DMAR:DRHD base: 0x000000feb03000 flags: 0x0 IOMMU feb03000: ver 1:0 cap c9008020e30260 ecap 1000 …

    AMD

    dmesg | grep AMD-Vi … AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40 AMD-Vi: Lazy IO/TLB flushing enabled AMD-Vi: Initialized for Passthrough Mode …
  • if your dmesg has no activated iommu, you have to activate it in your kernel command line
    for Debian 8.x

    nano /etc/default/grub

    and change GRUB_CMDLINE_LINUX_DEFAULT

    from

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet”

    to

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet intel_iommu=on”

    then update your grub config with

    update-grub2

    and reboot

  • check again the dmesg for iommu support, if this is positive you can go to the next step, if not you have to check for a bios update.

GPU separation
  • If your system is ready to work with GPU passthrough you have to check your video card for UEFI boot, if your video card will not support UEFI please check the links above.
  • the best solution is to use two video cards, one for the host system and one for your guest system, I’m using my integrated video card from CPU for the host system and my Nvidia GTX 780 for my guest systems.
  • to separate the dedicated video card from the driver module, you can use pci_stub from kernel command line.

    to get the PCI port of your PCI device you can use lspci

    lspci … 01:00.0 VGA compatible controller: NVIDIA Corporation GK110 [GeForce GTX 780] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GK110 HDMI Audio (rev a1) …

    the GPU use the PCI Slot 01:00.0 and 01:00.1 for the Nvidia Audio device
    NOTE: It’s important to passthrough both devices to the virtual machine.

    for pci_stub, we need the IDs, with “lspci -n” we see this IDs

    lspci -n … 01:00.0 0300: 10de:1004 (rev a1) 01:00.1 0403: 10de:0e1a (rev a1) …

    Use the grub cmdline for pci_stub initializations

    nano /etc/default/grub

    change the ID’s from above lspci -n

    from

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet” ( or “quiet intel_iommu=on”)

    to

    GRUB_CMDLINE_LINUX_DEFAULT “quiet intel_iommu=on pci_stub.ids=10de:1004,10de:0e1a”

    after save start update-grub

    update-grub2

    Add pci_stub to the end of /etc/initramfs-tools/modules and update the initramfs

    update-initramfs -u

    reboot

    After reboot the video card should be separated from the system by pci_stub.

Sofwareinstallation
  • for Debian like systems you have to install qemu-kvm
    apt-get install qemu-kvm
  • and if your video card supports UEFI boot, you need OVMF, the best way ist to use the newer one from Debian SID [link]

    Download the .deb file and install

    dpkg -i ovmf_{version of file} _all.deb

  • after Hardware and Software is prepared, Download the SteamOS ISO file and run the script files from this blog

    Tutorial: SteamOS run in a KVM with physical GPU passthrough[kvm-exp.blogspot.com]

Have fun with testing.

SteamSolo.com