[Guide] Remote Gaming on Unraid

0. Overview

We will be using a combination of hardware and software to remote-ize your gaming setup! You’ll be able to access your gaming “rig” anywhere, on a variety of devices. Since we’re all social distancing, why not do it together? This gaming setup will also allow for remote “local” co-op gameplay as well. It’s easy to set up, easy to manage, and a fun project that everyone will enjoy!

Beware, this guide will be a little more dense than usual. That said, I’ve done my best to outline all of the steps in detail, so it should be fairly easy to follow along. As always, if you have questions feel free to ask!

Things this setup allows you to do:

  • Use your main PC as a HTPC with a simple client, such as Nvidia Shield, AppleTV, Raspberry Pi, etc.
  • Stream games from your PC to any web browser on any PC
  • Stream your PC around the house on your phone, tablet, or laptop
  • Stream your PC on the go, outside of the house on your phone, tablet, or laptop
  • Play co-op games with your friends (they don’t have to own the game!)
    Great for games like Overcooked, Divinity Original Sin 2, Mario Party, racing games, and more.
  • Video edit or 3D design remotely
  • Watch videos with a group of friends without synclounge or watch2gether
15 Likes

1. Table of Contents (clickable links)

  1. Overview
  2. Table of contents
  3. Hardware Requirements
    1. Host System (Unraid)
    2. Client System(s)
    3. Network
  4. Software Requirements
    1. General Use
    2. Host System (Unraid)
    3. Client System(s)
  5. Other Things to Note
    1. Host hardware
    2. Client Hardware
  6. Hardware Recommendations & Guide Setup
    1. CPU Comparisons
    2. GPU Comparisons
    3. Sample CPU + GPU Configurations
    4. Accessories
      1. Controllers
        1. 8bitdo controllers
        2. Xbox style controllers
        3. Nintendo Switch style controllers
        4. Playstation style controllers
      2. Mouse/Keyboard
    5. Guide Setup
  7. Preparing Unraid
    1. Housekeeping
    2. Configure CPU Isolation
    3. Configure Network Settings
    4. Configure VM Manager
    5. Make changes to the BIOS
    6. Configure Shares
    7. Prepare GPU BIOS for passthrough
      1. The easy/lazy way
      2. The direct way
  8. Configure and Install the VM
    1. Download and transfer the software to the Unraid server
    2. Go to the VMs tab and create a new VM
    3. Start the VM
    4. Install Windows
    5. Configure Windows and Install Software
      1. Install virtio guest tools
      2. Add a password
      3. Configure auto-login
      4. Change your VM’s name
    6. Verify Windows logs in automatically
  9. Pass through your GPU (and other hardware)
    1. Shut down your VM
    2. Determine device IDs
    3. Edit syslinux.cfg
    4. Reboot your Unraid server
    5. Edit the VM
    6. Boot the VM
  10. Install Drivers and Hosting Software
    1. Use RDP
    2. Verify Device Functionality
    3. Install Graphics Drivers
  11. Configure Hosting Software
    1. General
    2. Graphics
    3. Parsec
    4. Rainway
    5. Steamlink
  12. Network Configuration
    1. Reserve a static IP for your VM
    2. Identify Ports needed by your Applications
    3. Create Aliases for IPs and Ports
    4. Forward Ports
  13. Potential Issues
    1. Issue: No sound from Parsec
  14. Experimental Performance Settings
    1. Re-enable Hyper-V with XML code
    2. Overclock your GPU
  15. Benchmarks
    1. F1 2019
    2. Metro Last Light Redux
    3. Rise of the Tomb Raider
    4. Forza Horizon 4
7 Likes

2. Hardware Requirements

1. Host system (Unraid) (click me)
  1. 2-4 cores you can dedicate to a VM
    (6-8 cores + higher clock speed preffered for higher end setups)
  2. 8GB (8192MB) free RAM you can dedicate to a VM
    (12GB-16GB preffered for higher end setups)
  3. 1GbE NIC
    (you can use your primary Unraid NIC)
  4. 128GB or greater disk space on a SSD
    (cache SSD OK, unassigned SSD preferred)
  5. GPU you can passthrough to a VM
    (Intel/AMD iGPU OK, AMD/Nvidia discrete GPU preffered)
  6. HDMI/DVI/DP dummy plug (one for each GPU in use, HDMI preferred if your GPU supports it)
2. Client system(s) (click me)
  1. System has hardware h.264 decode compatibility (h.265/HEVC preferred)
  2. Sound output of some sort
  3. Network connectivity (1GbE NIC highly preferred for local use)
  4. Bluetooth support for controllers (you can use one of these adapters if you need one)
3. Network (click me)
  1. If you want to use this setup remotely, you need to be able to port forward a range of ports on your router.
    pfSense will be covered in this guide, and general information about port forwarding will also be provided.
  2. Your Unraid server must have a wired connection to make this remotely worthwhile (even if it’s just 100Mb). Otherwise, wireless to wireless latency and throughput will be extremely poor.

>>Return to table of contents<<

1 Like

3. Software Requirements

1. General use (click me)
  1. Windows 10 ISO
  2. HxD
    For editing VBIOS
2. Host system (Unraid) (click me)
  1. Unraid
  2. virtio windows integration software/drivers
    (available through Unraid UI)
  3. For non-Quadro Nvidia GTX and RTX cards, you need an appropriate VBIOS
    (this will be covered later here)
  4. MSI Afterburner
    (for discrete AMD/Nvidia GPU overclocking & monitoring)
  5. Ninite (Installs 7zip, Google Chrome, Classic Start, Steam,
    WinDirStat, and TeamViewer)
  6. Parsec
  7. Rainway

Below is a table showing which clients can be used with each host application. There’s some crossover, so it’s worthwhile to have as many host apps set up on the machine as possible to cover your bases.

Desktop (Native) Desktop (Web) Xbox PS4 Apple TV (tvOS) Nvidia Shield (Android TV) iOS Android Raspberry Pi
Parsec Yes No No No No Yes No Yes Yes
Rainway No Yes Yes (beta) No No No Yes Yes No
Steam Yes No No No Yes Yes Yes Yes Yes
Moonlight Yes No No No Yes Yes Yes Yes Yes
3. Client system(s) (click me)
  1. Remote Desktop client (Windows built-in RDP client works fine)
  2. Parsec
  3. Rainway
  4. SteamLink App or Steam RemotePlay via desktop client
  5. Moonlight Game Streaming
    (Only available with Nvidia GTX/RTX GPUs with GeForce experience)

>>Return to table of contents<<

4. Other Things to Note

1. Host hardware (click me)
  1. Use wired networking when possible
  2. Use a unassigned SSD for your main OS and important games
    Use an unassigned HDD for larger games and bulk storage
    Do not use the array or cache drives for storage if possible
  3. Pass through storage devices to the VM directly instead of using a VDISK
    (note that using a VDISK is OK, and allows you to run multiple VMs of a single SSD, but performance sensitive applications hosted on the disk (such as emulators) may suffer)
  4. Higher clock speed CPUs help significantly with remote play and gaming in general
  5. Nvidia GPUs generally have better hardware encoding compared to AMD, especially Turing/RTX series cards - this will increase the client quality significantly
2. Client hardware (click me)
  1. Use wired networking when possible
  2. As with the Intel QuickSync Transcoding guide, it’s the fastest, best looking, and cheapest client available. Use 7th-gen and higher for best quality.
    Yes, the HP 290 works great as a client. It even has WiFi and Bluetooth built in!

>>Return to table of contents<<

1 Like

5. Hardware Recommendations & Guide Setup

1. CPU Comparisons (click me)
  • Encoding Quality ranges from Poor, Sub-par, Average, Great, to Excellent.
  • Encoding Quality only matters if:
    1. You don’t have a GPU and want to use Parsec
    2. You want to encode via CPU while rendering games on your GPU with Rainway.
      Otherwise, I wouldn’t worry about it.
  • Single Core Passmark is a relative score to determined how well a CPU can handle gaming.
  • Recommended Remote instances is per physical CPU. (double it if you have dual sockets!)
  • This is by no means an exhaustive list of compatible or suggested CPUs, just something to reference.
Brand Socket Model (link) Cores / Threads iGPU Encoding Quality Rec. Remote Instances Turbo Clock (GHz) Single Core Passmark Multi-Core Passmark Expected Price
AMD AM4 Ryzen 9 3900X 12/24 No N/A 3 4.60 2722 32775 $439.99
AMD AM4 Ryzen 7 3700X 8/16 No N/A 2-3 4.40 2684 22767 $293.98
AMD AM4 Ryzen 7 2700X 8/16 No N/A 2-3 4.30 2440 17691 $260.64
AMD AM4 Ryzen 5 3600X 6/12 No N/A 1-2 4.40 2661 18309 $204.99
AMD AM4 Ryzen 5 3600 6/12 No N/A 1-2 4.20 2575 17805 $174.99
AMD AM4 Ryzen 5 2600 6/12 No N/A 1-2 3.90 2274 13391 $119.99
AMD AM4 Ryzen 5 1600 (AF) 6/12 No N/A 1-2 3.60 2087 12366 $85.00
AMD AM4 Ryzen 3 3200G 4/4 Yes Great 1 4.00 2260 7261 $99.99
AMD AM4 Athlon 3000G 2/4 Yes Great 1 3.50 2076 4613 $54.24
Intel 1151-2 Core i9-9900K 8/16 Yes Excellent 2-3 5.00 2990 18944 $504.99
Intel 1151-2 Core i7-8700K 6/12 Yes Great 1-2 4.70 2768 13918 $387.99
Intel 1151-2 Core i7-9700K 8/8 Yes Excellent 1 4.90 2900 14757 $369.99
Intel 1151-2 Core i5-9600K 6/6 Yes Excellent 1 4.60 2849 11178 $219.99
Intel 1151-2 Core i5-9400 6/6 Yes Excellent 1 4.10 2518 9460 $184.99
Intel 1151-2 Core i3-8100 4/4 Yes Great 1 3.60 2277 6280 $118.85
Intel 1151-2 Pentium Gold G5400 2/4 Yes Great 1 3.70 2277 3779 $62.34
Intel 1151-1 Core i7-7700k 4/8 Yes Great 1 4.50 2777 9823 $320.00
Intel 1151-1 Core i5-7600K 4/4 Yes Great 1 4.20 2505 6592 $250.00
Intel 1151-1 Core i7-6700K 4/8 Yes Average 1 4.20 2563 9116 $200.00
Intel 1151-1 Core i5-6600k 4/4 Yes Average 1 3.90 2377 6488 $150.00
Intel 1150 Core i7-4790K 4/8 Yes Subpar 1 4.40 2499 8241 $200.00
Intel 1150 Core i5-4690K 4/4 Yes Subpar 1 3.90 2151 5577 $95.00
Intel 1155 Xeon E3-1270 V2 4/8 No N/A 1 3.90 2136 6569 $70.00
Intel 1155 Core i7-3770 4/8 Yes Poor 1 3.90 2058 6400 $70.00
Intel 1155 Xeon E3-1265L v2 4/8 Yes Poor 1 3.50 1649 4869 $55.00
Intel 1155 Xeon E3-1230 V2 4/8 No N/A 1 3.70 1980 6224 $40.00
Intel 2011 Xeon E5-2687W V2 8/16 No N/A 2-3 4.00 2032 16478 $180.00
Intel 2011 Xeon E5-2667 V2 8/16 No N/A 2-3 4.00 1994 16120 $130.00
Intel 2011 Xeon E5-2680 V2 10/20 No N/A 3 3.60 1812 15746 $130.00
Intel 2011 Xeon E5-2670 V2 10/20 No N/A 3 3.30 1650 15031 $85.00
Intel 2011 Xeon E5-2637 V2 4/8 No N/A 1 3.80 1968 9465 $25.00
Intel 2011 Xeon E5-2690 8/16 No N/A 2-3 3.80 1829 13980 $68.00
Intel 2011 Xeon E5-2680 8/16 No N/A 2-3 3.50 1657 12654 $49.00
Intel 2011 Xeon E5-2643 4/8 No N/A 1 3.50 1794 8479 $15.00
Intel 2011 Xeon E5-1650 V2 6/12 No N/A 1-2 3.90 1992 12691 $75.00
Intel 2011 Xeon E5-1620 v2 4/8 No N/A 1 3.90 1957 9498 $24.00
2. GPU Comparisons (click me)
  • Encoding Quality ranges from Poor, Sub-par, Average, Great, to Excellent.
  • Encoding Quality is very important. The difference between “Great” and “Excellent” isn’t huge, but it is noticeable.
  • HEVC Encode support is highly recommended. It minimizes network bandwidth usage while retaining quality. Newer cards have better HEVC support that use less resources and provide higher levels of detail.
  • Maximum Recommended Resolution is simply a recommendation, not a limitation. For 1440p, you must be on a wired connection. 4K is only really possible on the highest end setups.
  • Maximum Recommended Detail is the level of detail you can expect your games to run at. Remember, if you’re encoding on the GPU, you can expect slightly lower performance on average compared to a bare metal gaming setup.
  • This is by no means an exhaustive list of compatible or suggested GPUs, just something to reference.
Brand Model (link) JDM’s Advice Encoding Quality HEVC Encode Max Rec. Resolution Max Rec. Detail Expected Price
AMD RX 470 4GB Good value. Average Yes 1080p Medium $65.00
AMD RX 480 4GB Average Yes 1080p Medium $90.00
AMD RX 480 8GB Average Yes 1080p Medium/High $115.00
AMD RX 580 8GB Average Yes 1080p Medium/High $115.00
AMD R9 Fury 4GB Good value. Average No 1080p High $120.00
AMD R9 Nano 4GB Average No 1080p High $165.00
AMD Vega 56 8GB Flash Vega 64 BIOS Average Yes 1440p High/Ultra $200.00
AMD RX 5500 XT 8GB Average Yes 1080p High $200.00
AMD RX 5600 XT 6GB Great Yes 1080p High/Ultra $270.00
AMD RX 5700 8GB Great Yes 1440p High $330.00
AMD RX 5700 XT 8GB Great Yes 1440p High/Ultra $350.00
Nvidia GTX 970 "4"GB Average Yes 1080p Medium $100.00
Nvidia GTX 980 4GB Average Yes 1080p Medium/High $150.00
Nvidia GTX 980ti 6GB Average Yes 1080p High $210.00
Nvidia GTX 1060 3GB Great Yes 1080p Medium $115.00
Nvidia GTX 1060 6GB Great Yes 1080p Medium $150.00
Nvidia GTX 1070 8GB Best under $200. Great Yes 1440p High $200.00
Nvidia GTX 1080 8GB Best under $300. Great Yes 1440p High/Ultra $280.00
Nvidia GTX 1080ti 11GB Great Yes 1440p Ultra $440.00
Nvidia GTX 1660 6GB Excellent Yes 1080p Medium/High $215.00
Nvidia GTX 1660 Super 6GB Best value! Excellent Yes 1080p High $229.00
Nvidia RTX 2060 6GB Excellent Yes 1440p High $290.00
Nvidia RTX 2060 Super 8GB Excellent Yes 1440p High/Ultra $375.00
Nvidia RTX 2070 8GB Best high end. Excellent Yes 1440p High/Ultra $360.00
Nvidia RTX 2070 Super 8GB Excellent Yes 1440p Ultra $460.00
Nvidia Quadro P400 Great Yes 720p Low/Medium $85.00
Nvidia Quadro P2000 Don’t waste $$. Great Yes 1080p Medium $400.00
3. Sample CPU + GPU Configurations (click me)

These are just some sample configs that I threw together to get you thinking. Generally speaking, this is a guide where you can “run what you brung” and upgrade later based on your needs.

Cheap 1080p System Budget Build

Brand Model (link) Encoding Quality Rec. Remote Instances Max Rec. Resolution Max Rec. Detail Expected Price
Intel Xeon E5-1620 v2 N/A 1 $24.00
AMD RX 470 4GB Average 1080p Medium $65.00
Generic 16GB DDR3 ECC REG $32.00
Total $121.00

Dual 1080p System Budget Build

Brand Model (link) Encoding Quality Rec. Remote Instances Max Rec. Resolution Max Rec. Detail Expected Price
AMD Ryzen 5 1600 (AF) N/A 1-2 $85.00
AMD RX 470 4GB Average 1080p Medium $65.00
AMD RX 470 4GB Average 1080p Medium $65.00
Generic 16GB DDR4 RAM $68.00
Total $283.00

High Performance & Quality 1080p Build

Brand Model (link) Encoding Quality Rec. Remote Instances Max Rec. Resolution Max Rec. Detail Expected Price
Intel Core i5-9600K Excellent 1 $219.99
Nvidia GTX 1660 Super 6GB Excellent 1080p High $229.00
Generic 16GB DDR4 RAM $68.00
Total $516.99

High Performance & Quality Dual 1440p Build

Brand Model (link) Encoding Quality Rec. Remote Instances Max Rec. Resolution Max Rec. Detail Expected Price
Intel i9-9900K Excellent 2-3 $504.99
Nvidia RTX 2070 8GB Excellent 1440p High/Ultra $360.00
Nvidia GTX 1080 8GB Great 1440p High $200.00
Generic 32GB DDR4 RAM $139.99
Total $1,204.98
4. Accessories (click me)
  1. Controllers
    Ideally, you’re looking for something with X-Input that has 4 buttons, 4 triggers, dpad, dual analog sticks, L3/R3, and select/start.
    Controllers listed below are all X-Input, and [Full] or [Partial] button support.
    My main recommendation will be 8bitdo controllers. They have by far the best analog sticks and triggers of any controller and triggers, and button quality on part with the rest. They also serve multiple purposes, with most featuring Nintendo Switch, Android, iOS, MacOS, Linux, and of course Windows compatibility. Most feature USB-C as well.
    I personally use the SN30 Pro+ Wireless and I cannot recommend it enough.
    1. 8bitdo controllers
      1. SN30 Pro+ Wireless [Full]
        Modern/Classic combo style, all black + classic color schemes
      2. SN30 Pro Wireless [Full]
        It’s like the Pro+ without the handles
      3. SN30 Pro Wired [Full]
        Same as above, but wired.
      4. N30 Pro Wireless [Full]
        Compact style controller, Genesis/Gamecube color schemes
      5. Lite Wireless [Full]
        Dual D-pad instead of Dual Analog, and super cheap. I love this little thing!
      6. Zero 2 Wireless [Partial]
        Tiny Boi - great for games with limited control needs like 2D platformers
    2. Xbox Style
      1. Official Xbox One Wireless [Full]
        It’s the standard controller! You can’t really go wrong with it.
      2. PowerA Xbox One Wired [Full]
      3. VOYEE Xbox 360 Wired [Full]
        If for some reason you want a 360 style controller…
    3. Nintendo Switch Style
      1. Official Nintendo Switch Pro Controller Wireless [Full]
      2. PowerA Enhanced Wireless [Full]
      3. PowerA Wired [Full]
    4. Playstation Style
      1. Official Playstation Dualshock 4 [Full]
        Not native X-Input, you need to use DS4 windows
  2. Mouse and Keyboard
    1. Logitech K400/K400 Plus - Couch/TV use
      USB wireless with unifying receiver
    2. Logitech K830 - Couch/TV use
      USB w/ unifying receiver and Bluetooth wireless
    3. Microsoft Wireless AIO - Couch/TV use
    4. Amazon Basics AIO - Couch/TV use
5. Guide Setup (click me)

This guide is less about what hardware to use, and more of how to set it up. Take my hardware with a grain of salt, you definitely don’t need anything this high end. It just really depends on what your goals are.
This setup below is what will be referenced in the rest of the guide.

  1. CPU: AMD R9 3900X
  2. CPU cooler: AMD Wraith Prism LED
  3. Motherboard: ASUS Prime X570-Pro
  4. RAM: 64GB DDR4 3000
  5. GPU 1: Zotac RTX 2070 Mini
  6. GPU 2: Nvidia Quadro P2000
  7. Fans: Arctic P12 PWM PST 5-pack
  8. Case: Cooler Master N400
  9. Cache drive: 1TB Silicon Power 2.5" SATA SSD
  10. Storage: 5x12TB WD Easystore, 3x10TB WD Easystore
  11. VM SSD: Intel 660p 2TB NVMe SSD

>>Return to table of contents<<

1 Like

:warning: The guide assumes that you have a functioning Unraid server with a GPU attached, and a dummy plug installed into the GPU. It also assumes that you have the ability to restart your Unraid sever a couple of times, as noted in the guide. :warning:

6. Preparing Unraid

1. First, some housekeeping. (click me)
  1. Update Unraid to the most recent public version.
    (Tools>Update OS)
    This guide was prepared using 6.8.3.
  2. Install Community Applications if you haven’t already.
    Simply paste https://raw.githubusercontent.com/Squidly271/community.applications/master/plugins/community.applications.plg
    into your Plugins/Install Plugin section.
  3. Dynamix has quite a few useful applications that we can use. You can install these from the (newly added) Apps tab.
    1. Dynamix System Information
    2. Dynamix System Statistics
    3. Dynamix System Temperature
    4. Dynamix SSD TRIM
  4. Install the Unassigned Devices and Unassigned Devices Plus plugin.
  5. Install the Fix Common Problems Plugin.
  6. Open “Fix Common Problems” from the Plugins tab.
    1. Scan and address any warnings or errors found.
  7. Go to the Tools tab. Click “Docker Safe New Perms” and click “Yes I want to do this” and then start. Leave the dialog box open and let it finish.
    Do not run this if you have a preclear in progress or if the mover is running. Wait for those processes to finish first.
2. Configure CPU Isolation (click me)
  1. Turn off running VMs and and Dockers, then turn off the VM and Docker services in Settings>Docker, and Settings>VM Manager.
  2. Go to Settings>System Settings>CPU Pinning then scroll down to CPU Isolation.
    Cores that are highlighted are isolated from the Unraid host. (therefore dedicated to VM/Docker use) Unraid itself only needs a few cores to operate at peak performance. In my case, I have a few cores to spare, so this is what mine looks like. In the case of a 6 or 8 core system, one or two physical or logical cores is enough. Unraid/Linux prefer to use lower cores, so leave 0/1 for the host and isolate the rest.
    This requires an Unraid host restart. Do not restart now, there are more changes that require a restart.
3. Configure Network Settings (click me)
  1. Go to Settings>Network settings
    I’m recommending disabling bonding, but leaving bridging enabled. My network interface looks like this.
    (I have the IP address reserved in the router, so I don’t have static enabled here.)
4. Configure VM Manager (click me)
  1. Navigate to Settings>VM Manager
  2. You can change the Default VM and ISO storage path if you want, otherwise just leave these default.
  3. Download the VirtIO driver if you haven’t already.
  4. Select the network bridge that corresponds to the network interface we configured earlier.
    In most cases it’s “br0”
  5. Set PCIe ACS override to “Both”.
    This requires an Unraid host restart. You should restart after this step.
5. Make changes to the BIOS of your Unraid server (click me)

These settings will vary with each platform, so you’re on your own for the most part.

  1. Disable UEFI boot, only allow booting from Legacy devices.
    Ensure that the Flash device is still first in your boot order.
  2. Enable IOMMU if your motherboard has a section for it.
  3. Enable VT-D, VT-X, and/or AMD-V if available.
  4. Save changes (usually F10) and boot Unraid.
  5. Now that Unraid is back online, turn VMs and Dockers back on in Settings>Docker, and Settings>VM Manager.
6. Configure Shares (click me)
  1. The following shares should be set to cache “Prefer” or cache “Only”.
    If you’re not sure which option to use, use “Prefer”.
    1. appdata
    2. domains
    3. isos
    4. systems
  2. Invoke the mover in the Main tab (scroll down to the bottom)
    Wait for this process to finish before moving on to the next step. If you don’t see any cache activity, and the move button is lit up again, the process is finished.
7. Prepare GPU BIOS for passthrough (click me)

This is typically necessary with Nvidia GTX and RTX cards.
This should not be necessary with AMD and Nvidia Quadro cards, buy may help in some cases.
You have two options: The easy/lazy way (this is what I do), or the direct extraction way.
I will cover both below.

  1. The easy/lazy way
    1. Find your GPU on this website
    2. Download the vBIOS for the card (In this case I have a Zotac RTX 2070 Mini)
    3. [Advanced] You can also use BIOS files that are not meant for your GPU.
      If you do this, you’re on your own, I’m not responsible if you brick your card. In most cases you should be OK, for instance I used the “AMP Extreme” BIOS on my Mini card with great results.
    4. Use HxD to open your card’s BIOS that you downloaded
    5. Press CTRL+F and search for “vga compatible”
    6. Highlight everything above the line that starts with something like “UªtëK” and delete it.
      (everything above the red line, it may take a while to scroll up and highlight everything)
    7. Press “OK” at this dialog box
      image
    8. Go to “File”, “Save as…”
    9. Navigate to your isos share on Unraid, and save it with a name - make sure to add the extension .rom
      image
  2. Direct BIOS extraction
    1. Install your GPU into a native Windows PC
    2. Use GPU-Z to export your BIOS by clicking this button
    3. Upload the BIOS to your isos share on unraid

>>Return to table of contents<<

7. Configure and Install the VM

1. Download and transfer the software to the Unraid server. (click me)
  1. Download a Windows 10 ISO from the official Microsoft Windows 10 Media Creation Tool.
  2. Transfer the Windows 10 ISO to your isos share on Unraid.
    If you can’t see your isos share, make sure it’s being exported in Shares>isos>SMB Security Settings.
2. Go to the VMs tab and create a new VM. (click me)
  1. Select Windows 10.
    image
  2. Give it a Name.
  3. Give it a Description.
  4. CPU Mode: Host Passthrough
  5. Logical CPUs: Select an appropriate amount (usually 6-10 cores/threads), using only the isolated CPUs that we selected earlier.
  6. Initial Memory/Max Memory: set both of these values to the number you want.
    Here we’ll use 8192MB for 8GB.
  7. Machine: Q35-4.2
    4/16/20 update: use i440FX-4.2, only use Q35-4.2 if you run into issues
  8. BIOS: OVMF
  9. Hyper-V: No
  10. USB Controller 3.0 (qemu XHCI)
    (if you don’t have USB 3.0, use 2.0 (EHCI)
  11. OS Install ISO: Select your Windows ISO
  12. OS Install CDRom Bus: SATA
  13. VirtIO Drivers ISO: Select the virtio ISO you downloaded
  14. VirtIO Drivers CDRom Bus: SATA
    image
  15. Primary vDisk Location:
    1. Auto (uses your Domains share)
    2. Cache
      (not recommended, if you want to use the cache configure your domains share correctly)
    3. Direct disks
      (not recommended)
    4. Manual (if you want to use an unassigned drive)
  16. Primary vDisk Size: 128GB or larger
    (you can expand this later)
  17. Primary vDisk Type: raw
  18. Primary vDisk Bus: VirtIO
  19. Graphics Card: VNC
    (do not pass through your GPU yet)
  20. VNC Video Driver: QXL (best)
  21. VNC Password: (blank)
  22. VNC Keyboard: English-United States (en-us)
  23. Sound Card: None
    (we will fix this later)
  24. Network MAC: (no changes)
  25. Network Bridge: br0
  26. USB Devices: none
  27. Other PCI Devices: none
  28. Uncheck “Start VM after creation”
3. Start the VM (click me)
  1. You will control the VM through the Windows icon.
    Click it, and click start.
    image
  2. Click the icon again and click VNC Remote.
    image
  3. You may have missed the startup process where it says “Press any key to boot from CD/DVD”

    You missed the screen if you’re sitting at this.

    No worries though, just leave the VNC Remote screen open, Force Stop the VM, and start it again. Make sure you click the connect button on the VNC Remote window.
    image
    Once you have pressed the elusive any key you can move onto the next step.
4. Install Windows (click me)
  1. Use these default options, click “Next”.
  2. Click “Install Now”.
  3. Click “I don’t have a product key”. (we can add one later)
    Click this option even if you do have a product key.
  4. Use “Windows 10 Pro”, click “Next”. (I highly suggest this option since it has RDP built in)
  5. Accept the terms, click “Next”.
  6. Select “Custom: Install Windows only (advanced)”.
  7. You will likely see this screen, stating “We couldn’t find any drives.” Click “Load driver”.
  8. Click “Browse”.
    image
  9. Find the virtio-win CD Drive.
    image
  10. Navigate to the viostor/w10/amd64 folder, then click “OK”.
    image
    Your screen should look like this. Click “Next.” Wait for it to finish installing drivers.
  11. Select your drive and click “Next”. DO NOT CLICK “New”.
  12. Grab a cup of BAWLS™ and wait for it to finish.
  13. When it’s finished, let it reboot automatically.
  14. Select your region, and click “Yes”.
  15. Select your keyboard layout, and click “Yes”.
  16. Skip the second keyboard layout.
  17. Click “I don’t have internet” at the bottom left of the screen.
  18. Click “Continue with limited setup” at the bottom left of the screen.
  19. Create your user account. Click “Next”.
  20. Do not add a password now, we will do this later. Click “Next.”
  21. Click “No”.
  22. Click “Decline”.
  23. Turn all of these toggles to “No”. Make sure you scroll down and toggle all of them.
    Click “Accept” when you are sure that you got all of them.

  24. Grab a Smoke and a Pancake. Wait for this to finish.

    Pipe and a Crepe?
  25. Finished! (ish)
    We still have more stuff to do.
5. Configure Windows and Install Software (click me)
  1. Install virtio guest tools.
    Go to “This PC” then open the CD drive.

    Scroll down, and install virtio-win-gt-x64 with all default options.
    Confirm all prompts.
  2. You may get this message from Windows now that you have network connectivity.
    image
    You can tell it to piss off.
  3. Now is a good time to enter a password. Click start, type password and click “Change your password”.

    Using anything besides a normal password will not be covered by this guide.
    1. Add a password. Click “Next”.
    2. Click “Finish”.
  4. Configure RDP
    1. Click start, type “remote” and click “Remote Desktop settings”
    2. Toggle “Enable Remote Desktop” to “On”
      Click “Confirm”.
    3. Click “Show Settings” next to “Make my PC discoverable…”
    4. Select “Turn on Network discovery” and “Turn on file and printer sharing”
  5. Configure auto-login
    1. Click start, type “netplwiz” and press Enter.
    2. Uncheck “Users must enter a user name and password to use this computer.”
      Click “Apply”.
    3. Fill out the password twice.
      Click “OK”, the click “OK” on the main window.
  6. Change your VM’s name (this will show in your game clients)
    1. Right click on “This PC” and click “Properties”.
    2. Click “Change settings”.
    3. Click “Change…”.
    4. Change the VMs name.
      Click “OK”.
      Click “OK”.
    5. Click “Close”.
    6. Click “Restart Now”.
      image
6. Verify Windows logs in automatically.

Updated Auto-login procedure (click me)

>>Return to table of contents<<

1 Like

8. Pass through your GPU (and Other Hardware)

1. Shut down your VM in the VMs tab.
2. Determine your device IDs (click me)
  1. Navigate to Tools>System Devices
  2. You may see this warning at the top. You can ignore it.
  3. What we’re looking for here is your device IDs. In this case, we will use the P2000 as an example.
    It’s usually easiest to press CTRL+F and find “nvidia” to highlight the devices we are looking for.
    In this case, there are two devices related to the P2000. We want to reserve both of these IDs in our syslinux config so that Unraid does not load them.

    And for another example, the RTX 2070 has 4 devices associated with it.
  4. Repeat this step for any other devices you want to be passed through to VMs. Other devices will not be covered in this guide.
3. Edit syslinux.cfg (click me)
  1. Navigate to Main, then click on your Unraid Flash device.
  2. Scroll down to “Syslinux Configuration” and click the toggle that switches from “Menu View” to “Raw View”.
    Each section under “label” is a boot option for Unraid. The top one is the default, so we will be using that.
    Add vfio-pci.ids= after the isolcpus= section as shown in the screenshot below. Add your passthrough device IDs in order that they appear in the system info we grabbed above.
    Shown below are the 4 devices for the RTX 2070.
    Apply changes and move on to the next step.
4. Reboot your Unraid server.
5. Edit the VM (click me)

image

  1. Remove the “OS Install ISO” text field.
    image
  2. Change the graphics card from VNC to your GPU.
    Take note of the device’s bus, in this case it’s “09”.
  3. Select your GPU’s vBIOS that we uploaded earlier in step [6.7] .
    It is located in /mnt/user/isos/biosname.rom
  4. Change the sound card to the GPU’s Audio controller.
    Make sure the bus starts with the same number.
  5. Since we are using a RTX card in this example, there are two additional devices for the USB-C hub that must be passed through. Every device will be different.
    Every device on the GPU must be passed through for native function.
  6. Click Update.
  7. Return to the VMs tab, and edit the VM again.
    image
  8. Switch from “Form View” to “XML View”
    This view will look intimidating, but it’s acutally not that bad.
    Any changes that you make in XML View will be reverted if you change back to Form View.
    Since that’s the case, I would highly recommend creating a local backup of your XML configuration when you’re done editing it.

    Your view should now look something like this.
  9. Find the <cputune> section and add the line <emulatorpin cpuset='X'/> below the core assignments.
    Where X is the CPU core you are pinning the emulation processes to.
    For the highest performance, use a core that is:
    1. Not in use by the VM
    2. Isolated from the Unraid host
    3. Not shared with another VM’s emulator pin (this doesn’t matter as much)
    4. Reference section 6.2 for more information on CPU pinning. In my case, cores 11 and 23 are isolated from the Unraid host, and I’m not going to use them for any VM. I will use core 11 for this VM, and I will use core 23 for two other VMs.
  10. Press CTRL+F and find your VBIOS file.
    (or just scroll down and find it)
  11. Each device starts with <hostdev mode=...
    and ends with </hostdev>
    The black brackets are host devices. There should be one host device for each device we passed through earlier.
    The red line is the physical bus, slot, and function the device is assigned.
    The blue line is the virtual bus, slot, and function the device is assigned.
    Note they are all on the same physical bus (magenta circle)
  12. Add a flag on the first virtual line below the BIOS that says multifunction='on'
    image
  13. Next, we need to change the virtual devices to be on the same bus, and set the functions to the same as their host.
    The first virtual bus (blue/yellow) is '0x00' so we’ll use that for all further virtual devices.
    The first virtual slot (blue/green) is '0x06' so we’ll also use that for all further virtual devices.
    The virtual functions (blue/cyan) must match the physical functions (red/cyan).
    image
  14. Scroll down, click “Update”
6. Boot the VM

>>Return to table of contents<<

3 Likes

9. Install Drivers and Hosting Software

1. You'll notice that you no longer have the option to use the VNC Remote to control your server, since we removed it. (click me)

We’ll be using RDP on windows instead.
image

  1. Open RDP on your local windows machine. Type in the name of the VM that we created earlier. If you forget what it is, good news! You get to dive into your router to figure out what it’s IP is.
    image
  2. Connect, and when prompted to authenticate click “Use a different account”.
    Use the VM’s username and password we set up earlier.
    image
  3. Check this box and click “Yes”.
    image
  4. If that all worked, then you can access your VM remotely!
2. Verify that your devices are working properly. (click me)
  1. Click start, type “Device Manager” and open it.
  2. Look in “Display Adapters” for your GPU.
    If it’s showing here without an error sign, then you passed it through correctly.
    If there’s an error, please revisit the steps regarding editing the VM’s XML and BIOS passthrough.
    (example, Code 43)
  3. Verify that your sound device is working properly.
3. Install Graphics Drivers (click me)

(with all default options)

  1. Nvidia (use Geforce Experience if you want to use moonlight)
  2. AMD
  3. Intel
  4. MSI Afterburner (for Nvidia/AMD GPUs)
  5. Double check Device Manager after installing drivers to ensure Display Adapters and Sound devices are identified correctly.

>>Return to table of contents<<

2 Likes

10. Configure Hosting Software

1. General (click me)
  1. User Account Control loves to mess with Parsec. Disable it.

  2. Install Hosting Software
    1. Ninite (Installs 7zip, Google Chrome, Classic Start, Steam,
      WinDirStat, and TeamViewer)
    2. Unfortunately, we need to use TeamViewer for this one step. Open TeamViewer on both your Unraid VM and your client. Connect, and re-log into windows through TeamViewer.
    3. Parsec
      Create an account and log in.
      Right click on the Parsec icon in the tray, and select “Run when my computer starts”.
    4. Log in with the same Parsec account on your client, and connect to your VM.
      The rest of the guide will not be using RDP to access the machine, but instead will use Parsec. RDP will be your fallback if something goes wrong with Parsec.
    5. You can now uninstall TeamViewer if you want.
      Good riddance.
      image
    6. Rainway
2. Graphics (click me)
  1. Resolution & Framerate
    Now that you can access your PC remotely, it’s time to make sure that your dummy plug supports the resolutions and framerates that you want to stream in.
    Again, this guide covers the use of Nvidia GPUs, so for AMD and Intel the process will be different.
    1. Open the NVIDIA Control Panel.
    2. Navigate to Display>Change resolution, and see if the resolution that you want is listed.
      Most of you will use 1080p, and that’s just fine.
    3. If for some reason the resolution that you want isn’t listed, click “Customize…”
      Check the box that says “Enable resolutions not exposed by the display” and click “Create Custom Resolution…” then click “Accept”.

    4. Enter in the resolution and refresh rate.
      In this case, I want to stream some Modern Warfare at 1080p 120Hz!
    5. Click “Test” and confirm that it is working.
      image
  2. High Performance mode
    1. Open the NVIDIA Control Panel.
    2. Click “Manage 3D Settings”
    3. Under “Power Management Mode”, change it to “High Performance”
      Make sure to apply the settings.
    4. Click the start menu or search bar, and type powercfg.cpl and press Enter.
    5. Click “Show additional plans”
    6. Select “High Performance”
  3. Disable Sleep
    1. Click either of these options
    2. Turn both off
      image
  4. Disable Hibernation
    1. Open command prompt as Administrator
    2. type powercfg -h off and press Enter
      image
3. Parsec (click me)
  1. Open up the settings panel in Parsec, and go to Host.
    1. Hosting Enabled: Enabled
    2. Host Name: [blank]
    3. Resolution: Autodetect
      If you leave this on Autodetect, you can change the resolution in windows which will change the stream resolution.
    4. Bandwidth Limit: 50Mbps
      We will override this later, use the highest setting for now.
    5. Exclusive Input Mode: On
    6. H.265 (HEVC) On
      This should be on if your hardware supports it. You will also have to turn it on client-side, otherwise it will fall back to H.264. (remind your friends to turn it on as well)
    7. Display: [default]
    8. Echo Cancelling: Off
    9. Virtual Gamepad Type: Xbox 360
  2. Next, go to Network.
    1. Client Port: 0
    2. Host Start Port: 8000
    3. UPNP: Off
  3. Scroll all the way down. Where it says “For advanced usage, you can edit the configuration file directly.”
    Click that.
    Here you can override setting limits and enable advanced ones.
    image
    1. encoder_bitrate = 100
      Bitrate in Mbps.
    2. server_refresh_rate = 60
      This is the refresh rate of the Parsec server. This is the framerate sent to the client.
      It’s possible to set this to higher refresh rates such as 100, 120, or 144… But keep in mind you’ll have to have the client, server, and network hardware to match.
4. Rainway (click me)

There’s not a whole lot to configure in Rainway. Here are some simple things to look at.

  1. Connect your relevant accounts in Settings>Account.
  2. In Settings>Hardware/Encoding
    Ensure that your GPU is selected. If you have passed through your Intel iGPU, that option is preferable if you have a 7th Gen or newer Intel CPU.
    Select your main display and audio device as well.
    Do not use Software encoding unless you’re looking for a bad time.
  3. In Settings>Stream
    Select
    1. Quality
      1. Fast = 3 Mbps
      2. Balanced = 7 Mbps
      3. Beautiful = 12 Mbps
      4. Very Pretty = 25 Mbps
      5. Extremely Pretty = 50 Mbps
    2. Framerate
      1. 30 FPS
      2. 60 FPS
      3. 120 FPS
      4. 144 FPS
    3. Stream Scaling (only useful if you are running into bandwidth issues IMO)
  4. In Settings>Network
    Disable the default port, and instead use the fallback port 40136.
5. Steam & Steamlink (click me)
  1. Go to Steam>Settings in the Steam Client
  2. Go to Settings>Remote Play, check “Enable Remote Play”
  3. Click “Advanced Host Options”
  4. Copy the following options below and press “OK”.
    image

>>Return to table of contents<<

1 Like

11. Network Configuration

I’m going to make you do things the right way with pfSense, not the “easy way”.
We will be making aliases for the IPs and ports that will be in use, in addition to the normal static IP and port forwarding.

1. Reserve a static IP for your VM. (click me)
  1. From your pfSense dashboard, click Status>DHCP Leases
  2. Find the VM that we created.
    Click the first + sign, and create a static mapping for its IP address.
  3. Use an IP that’s outside of your DHCP range, but in your network’s subnet.
    For me, my network is 192.168.3.0, and my DHCP range is .100 - .254
    192.168.3.55 is not in use by any other device, and fulfills those conditions.
    Scroll all the way to the bottom and click “Save”.
2. Identify Ports needed by your applications (click me)
  1. Parsec needs 3 ports per remote connection.
    For ease of use, we’re going to forward a UDP port range of 30, for up to 10 remote players.
    This range is 8000:8029.
  2. Rainway requires UDP port 40136 to be forwarded for remote connections.
3. Create Aliases for IPs and ports. (click me)
  1. Navigate to Firewall>Aliases
    1. Navigate to IP
    2. Add a new entry (at the bottom)
    3. Fill out these fields with Name, Description, Type, and the IP that we set earlier.
      Save when you’re finished.
  2. Navigate to Firewall>Aliases
    1. Navigate to Ports
    2. Add a new entry (at the bottom)
    3. Fill out these fields with Name, Description, Type, and the port range we determined earlier.
      Save when you’re finished.
  3. Repeat the steps above for any and all IPs or ports that you would like to create an alias for.
4. Forward ports (click me)
  1. Navigate to Firewall>NAT>Port Forward
    Add a new entry.
  2. Fill out the following fields, using the Aliases we created.
    (interface, protocol, destination, destination port range, redirect target IP, redirect target port, and NAT reflection)
    Save changes when you’re done.

>>Return to table of contents<<

1 Like

12. Potential issues

Issue: No sound from Parsec (click me)
  • Parsec by default captures your primary audio device.
  • Even if you have passed through your audio device correctly, if it doesn’t have a target it will not render audio. This is why I recommend HDMI dummy plugs over other models, since they also emulate sound devices.

Troubleshooting:

  1. Right click on your sound icon, then “Open Sound settings”
  2. Click “Sound Control Panel”

    This is a functioning dummy plug/sound device

    This is a non-functioning dummy plug/sound device
    image

Solution:

Luckily, you can solve this problem by using Virtual Audio Cable.
Simply install it, and you’re good to go. (you may have to restart Parsec and/or the VM)

Issue: Black screen with Nvidia RTX client (not host)

Solution:

When “H.265 HEVC” is enabled in Client Settings, also make sure to turn on “Decoded Compatibility”.

>>Return to table of contents<<

2 Likes

13. Experimental Performance Settings

In addition to the settings above, you may find that the settings below improve your VM’s performance even further. They may also cause unexpected results, and no warranty of any kind is given (expressly or implied) if you decide to use them.
That said, I am using them and I have noticed that performance has increased significantly.

1. Re-enable Hyper-V with XML code

Replace the entire <features></features> code block with the section below.

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

And replace the <clock></clock> code block with the section below.

  <clock offset='localtime'>
    <timer name='rtc' present='no' tickpolicy='catchup'/>
    <timer name='pit' present='no' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
    <timer name='tsc' present='yes' mode='native'/>
  </clock>
2. Overclock your GPU

[Guide] Overclocking (the right way) on Nvidia GTX and RTX series cards

14. Benchmarks

All benchmarks below were run with 4 cores/8 threads from an AMD Ryzen 9 3900X and a Nvidia RTX 2070 locked at 1050mV.

The following 3 tests were conducted at 1080p, all settings maximum with motion blur turned off. These tests were benchmarked remotely through parsec, encoded with h.265. Desktop and in-game refresh rate were set to 60 or 120fps, in borderless window mode. Three VM modes were tested: i440fx-4.2 with emulator core pinned, i440fx-4.2, and Q35-4.2.

1. F1 2019 (click me)

F1 2019 seems to have the most consistent results, and at maximum settings seems to be a good test of both CPU and GPU.

Raw numbers
image

Min/Avg/Max FPS
F1 2019 1

Total Score
F1 2019 2

2. Metro Last Light Redux (click me)

Even though this is the remastered version of MLL, performance is pretty solid across the board. There is a noticeable uptick in average FPS and total score with i440fx-4.2 and the emulator core pinned.

Raw numbers
image

Min/Avg/Max FPS

Total Score

3. Rise of the Tomb Raider (click me)

ROTR benchmark numbers are a sum of 3 tests, which is why FPS numbers are so high. Maximum FPS isn’t too important, keep an eye on average and minimum FPS instead.

Raw numbers
image

Min/Avg/Max/Overall FPS

The following benchmarks were run on the same hardware, exclusively on Forza Horizon with i440fx-4.2 and the emulator core pinned. The goal was to explore the hardware encoding performance differences between h.264 and h.265, at various resolutions and frame rates.

4. Forza Horizon 4 (click me)

Raw numbers

4K60 h.265 vs h.264
Encoding performance is near identical, at least with the RTX 2070. However, h.265 bandwidth is much lower and image quality is much higher. It’s hard to show in still pictures, but it’s extremely noticeable in motion. Use h.265 whenever possible.

1080p h.265 at 240/120/60 FPS
These tests were were performed at minimum graphics settings to achieve maximum performance.
Encoding at higher frame rates reduces rendering performance (albeit very little), and increases network bandwidth used. A higher frame rate also reduces overall image quality, but may* increase responsiveness.

>>Return to table of contents<<

I don’t even game and this already sounds so damn cool.

2 Likes

You read my mind! Been wanting to do one of these!

1 Like

Very intriguing.

Bad link: post 5, setup #1 CPU lists E5-2630L v2, however hyperlink goes to 9600K on amazon.

Intel Xeon E5-2630L V2

Good link: https://ebay.to/3bYucoz

1 Like

Thanks, I’ll update it!

WoW! That is an impressive how to guide.

1 Like

This is awesome! Exactly what I needed. Thanks @JDM_WAAAT!

1 Like