Can I use a VM for gaming on my HTPC?

The short question:

I see a lot of info about passing through GPUs to a VM, but it’s not clear if people are actually using the video output of the GPU. I have an HTPC/home server with 2 GPUs, an RTX2070 and the onboard Ryzen 5700G APU. The 2070 is connected to my living room TV, the APU has an EDID emulator plugged in, and both show up as usable monitors in Debian. The 2070 is configured as the primary GPU in the BIOS, so the BIOS config shows up on it. If I set up Proxmox as the main OS, can I force it to use the APU, give the 2070 to a linux or windows VM, have the VM show up as if it were a native OS on the TV, and be able to use it for steam/retroarch/etc gaming? Not to mention watching movies/TV with Plex, etc. I would also be passing through a USB keyboard/mouse, Dolphinbar, USB game controllers, etc.

The rest of the story:
This is my pseudo home server/NAS/home assistant+frigate server/build server/etc. I also log into it from my Windows 11 desktop and use it for writing code and doing linuxy things. Currently Nomachine is stuck using the 1080p resolution of the TV, and the desktop has a pair of 2k ultrawide monitors, so it really doesn’t work well. Before Ubuntu went to Wayland, I had it set up so the TV was DISPLAY 0, which auto logged in to a guest account, and xvfb was DISPLAY 1, which Nomachine used. I haven’t been able to make that work again on modern Ubuntu or Debian. Virutalizing everything seems like it would solve that issue, and also negate a lot of the security concerns of having that auto logged in guest account running on the same OS as everything else.

I don’t see why you couldn’t do this… There might be other things to consider.

I started out with a machine that was HTPC, server, and gaming machine all in one. That lasted about 6 months before I split it out into three separate machines. One big factor was the noise - that GPU running in the living room sucked, and the server’s hard drives weren’t great either. So now the quiet htpc just streams games or movies or whatever from the server or gaming machine that are tucked away elsewhere.

I split the gaming machine off from the server just due to resource management. It was annoying when I’d have the server crunching on something (say, an initial pass of Nextcloud Recognize, or three days worth of whisper going through a series adding subtitles), but wanted to wander off and stream a game.

Just throwing that out there.

1 Like

I appreciate the warning about noise, but the computer isn’t actually in the living room. The wall my living room TV sits on backs up to the stairs down to my basement. The PC is sitting on a shelf over the basement stairs, so you don’t hear the noise in the living room, and it stays relatively cool year round. This also doesn’t get used as my main gaming machine, it’s mostly for when friends come over and want to play something with couch co-op.

But anyways, I set up Proxmox and Pop OS on a spare SSD I had, and after a little fiddling around it works perfectly. Not sure why I didn’t expect it to, I’ve just never used GPU passthru on the primary GPU or for actually outputting video to a monitor. I even spent the last couple hours remembering how much I suck at F1 2017, which was all I had in my Steam library that would play on linux, give the gpu a reasonable test, and fit in the 100GB partition I gave Pop.

Now I’ve just got to figure out everything else, but this has really motivated me to get this server finally back to working the way I want it to.

1 Like