News for hackers. Stuff that matters.
Re:With Proton and Steam Play, many Windows games now work o... by tarruda on Monday December 07, 2020 @07:18PM (#25339693)
Something else that works super nice for gaming on Linux: GPU passthrough (gaming on a VM that has direct access to the GPU).

I've been doing this since 2017. Back then I had built my first desktop computer powered by ryzen 1700 + 2 GPUs.

Creating this setup had some challenges, but after the initial hurdle everything has been working perfectly (I imagine things must be easier nowadays).

Created a windows 10 VM, assigned 4 of my 8 cores, 16 GB of RAM (got 64 on the host) and a GTX 1070. This setup is enough to play pretty much any AAA game with max settings on full HD.

Besides having every game working perfectly, I get another nice side effect: sandboxing. No games (mostly proprietary software) have access to my personal/work files.

Re:With Proton and Steam Play, many Windows games now work o... by zymhan on Monday December 07, 2020 @09:09PM (#25340778)
I thoroughly agree, Linux KVM and GPU passthrough is amazing.

I was disappointed with USB for guests though, I found it impossible to restore my iPhone via iTunes on a Windows VM, because the USB device wouldn't automatically bind to the VM. Which is something even VirtualBox can do well. But maybe the tech has progressed, or there's a better solution to that issue now.

Re:With Proton and Steam Play, many Windows games now work o... by RealStickman_ on Monday December 07, 2020 @11:45PM (#25341937)
I "solved" that issue by getting a pcie usb card and passing that through.
Re:With Proton and Steam Play, many Windows games now work o... by ghthor on Tuesday December 08, 2020 @01:53AM (#25342632)
This is the best way to connect VR headsets as well.
Re:With Proton and Steam Play, many Windows games now work o... by RealStickman_ on Tuesday December 08, 2020 @03:41AM (#25343193)
True, though you'd have to do some research on usb controllers that are supported. I had to do that for my Rift s.
Re:With Proton and Steam Play, many Windows games now work o... by tarruda on Tuesday December 08, 2020 @05:55AM (#25343808)
I can't speak for Apple products, but passing USB devices with libvirt/qemu worked nicely so far for me (devices attach/detach automatically when the VM is powered on/off).

My main experience is with a Logitech g933 headset, which requires windows-only software to control certain parts of the device.

Re:With Proton and Steam Play, many Windows games now work o... by moondev on Monday December 07, 2020 @09:44PM (#25341033)
Do you run two gpus? Or can you handoff to the VM when it boots and back when you shut down? Mind sharing your libvirt xml or qemu script? I've been meaning to give this a try!
Re:With Proton and Steam Play, many Windows games now work o... by tarruda on Tuesday December 08, 2020 @04:10AM (#25343331)
The host GPU is a Radeon rx460, the GTX 1070 is only used by the VM (when the VM is running). Here are the most significant configuration files involved in my setup: https://gist.github.com/tarruda/2ea928b90cdecb6f77c2f9ca65ba...

Note that modprobe configuration is important, as it assigns stub drivers to the GTX that allows it to be handed on demand to the VM.

Note that this is made for a debian 10 system (kernel 4.19), other distributions might have different requirements.

As for running the GTX 1070 on the host when the VM is not running, I'm not sure if it is possible.

Re:With Proton and Steam Play, many Windows games now work o... by metalliqaz on Tuesday December 08, 2020 @08:39AM (#25344834)
Man, look at all that config. And this is considered a success story?

On Windows it's (1) install steam (2) play. To develop with my headless freebsd dev machine, it's just (1) install ssh (2) install x11 client (3) open term.

Re:With Proton and Steam Play, many Windows games now work o... by boomboomsubban on Tuesday December 08, 2020 @09:26AM (#25345517)
90% of that is just making a virtual machine, the equivalent would be acquiring/assembling your dev machine.
Re:With Proton and Steam Play, many Windows games now work o... by tarruda on Tuesday December 08, 2020 @10:21AM (#25346311)
That big XML file is just how libvirt represents a VM. If you create a VM using libvirt GUI, most of the XML is generated.

I made some tweaks based on level1 forums information, but most of that is auto generated by a GUI.

Re:With Proton and Steam Play, many Windows games now work o... by kbumsik on Monday December 07, 2020 @10:28PM (#25341392)
Depending on your motherboard you might need two GPUs. In my case I use Proxmox and control VMs through is web GUI.
Re:With Proton and Steam Play, many Windows games now work o... by m463 on Monday December 07, 2020 @10:04PM (#25341203)
do you do anything special to sandbox the games?

I've been wanting to try out linux gaming and this makes it more interesting.

I've also been thinking about videoconferencing/etc on linux running in the same manner.

Re:With Proton and Steam Play, many Windows games now work o... by kbumsik on Monday December 07, 2020 @10:26PM (#25341376)
I am using Windows VM with GPU passthrough too. If you want it out of the box (well, kinda) I would recommend Proxmox. Proxmox is amazing hypervisor OS. Otherwise you need to study tricky things a lot: QEMU, Kernel configuration for VFIO.

Also you may need hardware, especially motherboard that supports VFIO groups well.

Fortunatly there are quite big communities like Reddit in this topic. Just google "VFIO"

Re:With Proton and Steam Play, many Windows games now work o... by m463 on Monday December 07, 2020 @10:51PM (#25341549)
Thank you for the pointers. I run proxmox right now, but mostly containers and it's a headless server. I've never thought about running it as a desktop system, which sounds intriguing!
Re:With Proton and Steam Play, many Windows games now work o... by ro2nie on Tuesday December 08, 2020 @03:21PM (#25350815)
With passthrough you could harness the power of the gpu for a plex vm/container on proxmox to help with transcoding.
Re:With Proton and Steam Play, many Windows games now work o... by tarruda on Tuesday December 08, 2020 @05:50AM (#25343791)
Nothing special except what comes by default on debian 10 qemu setup, which I think has SELinux or AppArmor profiles enabled. I had to disable seccomp sandbox because it was causing random host freezes (might have been fixed on newest debian updates though).

Maybe it is not perfect sandbox for running malicious code, but surely it is enough to make games and anti cheat systems think they are running on a real computer.