/ppg/ - PCI Passthrough General

>Implying PulseAudio isn't shit
edition

PROBLEM: You enjoy a nice spot of vidya every now and then, but Linux and vidya is like Apple and being straight.

SOLUTION: PCI Passthrough! Modern linux kernels have builtin drivers and virtualization tools that allow you to give a Windows VM raw access to your hardware, giving you near-native performance while isolating the Windows botnet to a locked-down VM that you only use for vidya.

>Guide
wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF

>Tl;dr what you need
* A reasonably new motherboard and CPU. The motherboard and CPU both must be aware of Intel VT-D or AMD-Vi depending on who you'd rather give your shekels to. LOOK UP YOUR HARDWARE FIRST. Don't guess.

* A second keyboard, mouse, and monitor (or a monitor with multiple inputs compatible with your motherboard and video card)

* A modern Linux. Arch works, Fedora works, Ubuntu works. Others may work, but the more you try to be a neckbeard with your OS selection, the more trouble you're going to have setting this up.

* A copy of Windows

* A few hours to kill setting it all up


>FAQ
>So this means I don't need to dual boot?
Yup! Windows runs as a VM, but we give it your video card, keyboard, and mouse as close to hardware as possible to cut down on lag and overhead

>What kind of performance can I expect
Very hardware dependent, but the general consensus appears to be one or two frames/sec slower and around single millisecond latency when compared to running it on bare metal. It's stupid fast.

>How hard is this to set up?
Not even a little bit, there are just a lot of steps to follow. Follow the guide in the OP and you'll be up in no time. Make sure you ensure your hardware is compatible first. If your motherboard and CPU support VT-D or AMD-VI, you're golden.

Ask any questions or report any problems here.

Previous thread →

About that edition name - one of the steps in that guide walks you though connecting your VM's audio output directly to PulseAudio.

This works surprisingly well. There is a small amount of crackling that mostly goes away if you ensure the sample rate between your host and guest matches, and completely goes away if you jump through some more hoops.

Sounds interesting. Bump.

test

Test succeeded.

Yes, yes indeed :^)

>windows doing the best thing he does: work

I have an even simpler tutorial:
Wipe all partitions.
Install Windows.

PulseAudio may be kinda shitty but it's better than plain alsa. For Pulse you just need to set the right sample rate (usually 2048) then the hda audio works just fine. For alsa you pretty much have to use ac97 audio and the windows volume control will do nothing due to some sort of qemu bug or something.

Fuck off HANK.

what you actually need:
2 monitors
2 graphic cards
minimum 16GB RAM
2 keyboards/mouse

things to keep in mind:
your shit onboard graphics card will be on linux so you won't be able to play linux games unless you reconfigure your setup and reboot which is hilarious

Daily reminder that it's much easier and more convenient to simply have two boxes.

Literally everything you just said is incorrect.

Man, I just pass through the on-board audio.

While all that is wrong, this method isn’t meant for poorfags wih old hardware. It’s meant for Linux users who have good modern PC’s

i agree
if you dont have intel you need to buy a 2nd gpu. you also need 2 monitors.
i only did it because i wanted a fun project.

just have 2 linux partitions
one for passthrough and one with your primary graphics card drivers

couldn't you just connect 2 inputs to 1 monitor from 2 GPUs then swap between the inputs on the monitor? say DVI-D or DisplayPort for for host and HDMI for client VM

Yup. I have my Linux host use HDMI and my W10 guest use Displayport using the same monitor

So you can't switch back and forth within the same input? Damn.
I'm on Windows 10 here with Linux in a VM and looking to go native Linux with Windows for gaming, but it seems like the end state is less convenient than I've got now.

I'm pretty sure everyone does this, even if they have a second monitor. No point dedicating a monitor to a VM you use intermittently to play games.

>So you can't switch back and forth within the same input
well if you had two inputs of the same type yeah like a TV has usually 4 HDMI inputs
monitors generally have 1 of each type though

I'm guessing an i3 Haswell wouldn't be good enough for this?

>Implying PulseAudio isn't shit edition

excellent ! you guys are the ones to ask ...

what are my chances of driving a firewire soundcard from windows running inside a debian vm ?

firewire card works only in windows 7 (custom bootloader nonsense ) cannot get it working in linux full stop... this aint a pulse or alsa thing

can i drive it through the vm ?

thanks .... pic related

Nevermind, just looked it up and it doesn't even have VT-D

just to clarify... signal path is

windows 7 vm -> debian OS -> firewire interface

>firewire
wut there are still motherboards that include that connection?

If it’s got VT-D, it’ll work

hassle free audio out of a VM is easy if you passthrough say a usb DAC or DAC/amp
not sure if firewire works the same way but you should be able to passthrough any peripheral directly to the VM

Yeah, you can pretty much pass through anything if you pass through its controller. You don’t even need a DAC, you can pass through on board audio.

yeah man, still rocking firewire 400 on x58 i7 ... and have a spare pci firewire card and pcmia firewire card ... it was my go to interface.. it had its own memory controller... great for audio...

firewire 800 and beyond went full retard with the connectors and thats why no one bothered anymore

>a spare pci firewire card
you should be able to passthrough it then
just looked it up and man firewire really screwed the pooch no backwards compatibility what were they thinking no wonder USB is king these days

yep insane.. this is the precise moment they fucked up

>FireWire S800T (IEEE 1394c-2006)[edit]
IEEE 1394c-2006 was published on June 8, 2007.[31] It provided a major technical improvement, namely new port specification that provides 800 Mbit/s over the same 8P8C (Ethernet) connectors with Category 5e cable, which is specified in IEEE 802.3 clause 40 (gigabit Ethernet over copper twisted pair) along with a corresponding automatic negotiation that allows the same port to connect to either IEEE Std 1394 or IEEE 802.3 (Ethernet) devices.
Though the potential for a combined Ethernet and FireWire 8P8C port is intriguing, as of November 2008, no products or chipsets include this capability.

So I found out my motherboard had this option "Surround View" or something which seems to activate both the integrated GPU as well as the dedicated one, can this work for the PCI passthrough thing? the weak integrated one would be the host?

This will be pointless when VMware gets DirectX 11 support.

I dunno, I find it hard to believe there is going to be a solution better than this one any time soon.

Is a second set of input devices necessary to switch between host and guest input or is it just a failsafe to maintain control of the host? I'm okay with having my guest use up another display but it sounds super tedious to have to switch between keyboards and mice.

synergy or kvm switch