35
Hosting windows to play games
(lemmy.ml)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
It will still be subpar performance, bottlenecked by the CPU resources you can allocate to the VM as well as your original hardware's capabilities to power the VM among many other variables. Running a VM to game will always produce subpar results. Using GPU passthrough will increase performance, but it's almost always preferable to play on real hardware.
The real answer will always be: if you want to game on Linux, utilize Wine/Proton and Steam/Lutris/Bottles/Heroic/some other launcher that lets you fine tune Wine/Proton to cater to the specific game.
Maybe if you're using type 2 virtualization bullshit like VirtualBox, but for type 1 like KVM? Performance is near identical to host CPU, the overhead is somewhere between 2~4%. Hardly something you'd ever notice.
https://forum.level1techs.com/t/how-fast-is-kvm-host-vs-virtual-machine-performance/110192
Wine is fine, but it comes with its lot of compatibility issues you'll never have to deal with with a VM with GFX passthrough.
Sure. I admit my experience running a VM is limited to "type 2 bullshit" like VirtualBox. But that also requires that OP have a spare GPU lying around they care enough to pop into their machine and set up passthrough for, which most people don't. Especially with these GPU prices lately, yikes. Chances are they have a decent GPU already in their system, and buying an equivalent GPU just for passthrough is... 😬
So while baremetal-like performance is certainly possible with a VM, it's still not an ideal solution for most people.
Use the iGPU for your main OS, and discreet for gaming in a VM. Works wonders and you don't need to deal with NVIDIA drivers in your main OS. And save some energy to boot.
Hmm that's a neat solution. What if you do video or photo editing in your main OS, though, or any other kind of work that would benefit from discreet graphics? Is your only option then essentially two GPUs, or can you switch between passthrough neatly, or...?
I haven't adopted this kind of setup, mainly because Proton just does such a good job I have almost zero need for Windows, but my plan for eventually doing something like this was to also maintain a passthrough Linux VM for any GPU-intensive work on that side.
When I realized that the practical end-state of my system would mean I'd just be running things from within the Linux VM 98% of the time (games that can run on Linux) I kind of dropped the idea.
My single remaining use for Windows is to run the CaptureOne photo editing software. It is, in my opinion, peerless. I love using it so much that it ruined basically all other photo editing suites for me. DarkTable, PhotoTherapee, ART, none of them come close for me. Everything else has some alternative that I've come to term with using, or even prefer using, but not CaptureOne.
I'm only a hobbyist photographer so it's not like my livelihood is tied up in this software... I just get tired and sour working in other softwares, no matter how long of a trial I give them. Sometimes you find a solution that's just absolutely perfect for you and the way you work, and CaptureOne is that for me. 🤷♂️
In my case, I'd have my host Linux OS for 99.99% of my use case, and then Windows solely for photo editing. But I opted not to do that just because of all my previous experiences trying to use a VM for any production level work with anything that's graphically intensive. Apparently that has changed a lot since I last looked at it, or I didn't dig deep enough and I missed the actually worthwhile software. I'm just not sure I'm going to put in the work. I've got a baby now, and haven't taken a photo on anything other than my smartphone since she was born. 😅
You can switch between the two, but it does require a reboot. So in that case two discreet would be more convenient. But for encoding and what not you probably can get away with a rather cheap discreet that works well on nouveau (or go Radeon) and keep the 4090 for gaming.
Interesting.
My system is all AMD, I prefer not to wrestle with Nvidia's drivers on Linux, lol.
It's been years since I ran Windows on my machine, but I still miss my photo editing software. Nice as DarkTable is, it's no replacement for CaptureOne. And it's pretty much not possible to get CaptureOne running in a productive manner under Wine. I looked into doing passthrough to a VM a while back, but it just seemed a hassle and I didn't have a spare GPU. I game on my Linux install, so iGPU isn't sufficient for my needs there. My photography hobby just has to suffer. 😂
This is factually incorrect. Yes, you will have to allocate at least one thread and some RAM to your host system, but calling it subpar is just a completely uneducated statement. I have ran my system like this for multiple years, and compared to running booting Windows directly, the loss of fps in games is so negligible that it might not even be there
If you have to allocate resources to your host system, that's resources your virtual machine cannot use. It is subpar. If you're going to allocate your host the bare minimum resources, why not run the other operating system to begin with? You're now missing out in performance in the complete opposite direction. The most straightforward solution still remains to run games on your host system. If you want to game on Linux, game on Linux. It's easy enough nowadays, and what tinkering you may have to do will be a fantastic opportunity to get more comfortable with the DIY side of Linux.
I will be the first to admit that I am no expert on the topic of virtualization, as I have said in other comments already. However, this is a community, not an expert consultation, and I have used virtualization to varying degrees of success for various different tasks over the years, all of which has culminated in my opinion that it's best not to use virtualization to game unless you're really intent on running a game that cannot under any circumstances run in Linux, such as Valorant. To follow, if that is your use case I encourage picking up an extra drive (storage is incredibly cheap) and running a dual boot. You're free to disagree and provide reasoning why I'm wrong, but calling my statement "completely uneducated" is disingenuous at best.
EDIT: I concede on my word choice, it's not "subpar ." I'm certain you can achieve average or even above average performance in a VM with the right set up. The word I'm looking for is "suboptimal." My apologies.
I can definitely agree with suboptimal. While it's certainly not an end-all/be-all solution, it did exactly what it was designed to do. People spin up machines through Virtmanager for many reasons outside of gaming, me included, but when it came to gaming specifically, rebooting your system to play one game, and then switching back, didn't make any sense. Wine and Proton were not nearly as mature, as they are today.
Needless to say though, this is not the kind of setup you would run on an underpowered machine. With 24 threads of CPU performance, 32-64gb of RAM, and a full GPU, I can't really name a game that would exceed the limits of what is allocated
Super late reply here, but I was searching the Linux sub for vfio because I love this topic, lol. I'm happy to report that as others are saying, a vfio setup can be very performant! The GPU is near native, and with the proper CPU configuration, you won't be dealing with much overhead there either. The biggest factor is the overall load on your machine from running a host OS with the guest layered on top. I use my PC host OS primarily as a QEMU/KVM hypervisor, so when I need maximum gaming performance I simply turn off or suspend operation on all other VMs to free the resources for Windows. The only game I've had trouble with recently at 3440x1440 is Starfield, and unfortunately I think that is more a sign that an upgrade is finally due. I've used this setup for all kinds of games with no problem, including demanding virtual reality titles.
The biggest problem I've run into? Some anticheats truly despise any kind of virtualization. I've only run into issues with 2 games I like to play, but that is a real caveat. I consider it 100% an issue with the companies implementing these policies, who as I see it don't deserve my money in the first place. But other than the initial configuration headache and extra hardware required (if you don't have an iGPU anyway), this is the main drawback in my eyes.