this post was submitted on 17 Apr 2024
169 points (96.7% liked)

Linux

45595 readers
656 users here now

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.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 24 points 2 months ago (5 children)

I'm genuinely curious, why does VB continue to somehow remain in use, when it's lacking in features, or behind in usability, in basically every way imaginable? If you're on a Linux host, you have plenty of 1-click solutions that are incomprehensibly better than this. On Windows, Hyper-V boxes aren't horribly difficult to get running either, although from my experience, they require the same janky and hacky patches as VB does

[–] [email protected] 16 points 2 months ago (1 children)

Virtual box (for me) is the only app that has always been plug and play when I needed a VM. I've had issues with all the other ones. I still can't figure out how to get GPU passthrough to work on kvm. I tried so much the other day and failed miserably. Gave up and went back to VB.

[–] [email protected] 2 points 2 months ago (1 children)

In boxes there is a toggle that is labeled "3D acceleration" if you flip the toggle your VM will have GPU acceleration.

[–] [email protected] 11 points 2 months ago (2 children)

That's not GPU passthrough. That just enables VirGL, which is a translation layer that passes some OpenGL calls through to the host's Mesa installation. It has rather poor performance though, it's extremely limited and is rather buggy too. You certainly can't use it for cutting edge gaming.

GPU passthrough is when you pass through an entire GPU device as-is to the virtual machine. That is: if you have an Nvidia RTX 3060, the guest operating system will see an Nvidia RTX 3060 and it can use the native drivers for it. This gives you near-native performance for gaming.

Now, I didn't even know this was possible with VirtualBox (if so: cool!), but it's certainly doable with KVM if you have the right motherboard and GPU combination. I have done it, but it is quite the hassle indeed though that isn't really KVM's fault.

[–] [email protected] 4 points 2 months ago (1 children)

That's why it failed for me, I don't have an Nvidia GPU. I wanted to pass my GPU to my windows install but it never worked and I blamed kvm 🤦🏽‍♂️ I knew about the first part that the "3rd acceleration" isn't a full GPU passthrough, but didn't know the latter was Nvidia only.

[–] [email protected] 4 points 2 months ago* (last edited 2 months ago) (1 children)

It does work with AMD GPUs too, I did it with an RX6800XT myself, but there are some (most...) AMD GPUs that have a reset bug which means they hang if you reboot the guest and you need to powercycle the physical host machine to make the GPU usable for the guest again.

[–] [email protected] 2 points 2 months ago (1 children)

Well that sucks. I have a 580xt GPU. It's about 7 years old, but still powers. Do you have a link on how to get it working? Pretty please?

[–] [email protected] 4 points 2 months ago (1 children)

To get basic GPU passthrough working, I mainly followed the Arch Linux guide: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF

Be warned though that this is just the start of the journey. There are all kinds of issues that you need to deal with and decisions that you need to make if you want to practically use it for gaming, and those require lots of googling, piecing bits of information together from all over the place, and trial and error. From memory these are things I had to deal with:

  • How to handle storage? Just a qcow2 file or pass through a partition or drive?
  • How to handle mouse and keyboard input? Emulated or through a passed through USB port? Both have their pros and cons.
  • Audio is a pain in the ass... emulated it either crackly or laggy. There is a way to pass it through to pipewire through a unix socket, but it's convoluted to setup. Or perhaps you can pass an entire audio device through to your guest?
  • Bluetooth audio, for my wireless headset, was an even bigger issue because audio did not get routed correctly to the headset if I just connected to the host. In the end, I got a separate bluetooth dongle for my VM, and passed it through.
  • How do you handle the display between guest and host? Two separate monitors? A monitor with dual inputs, and toggle between them? Or something like looking-glass, which sounds appealing but again introduces issues like vrr not working properly, and your GPU will probably need a dummy "dongle" to work without an actual monitor connected.
  • Then there's the CPU and how to divide the cores between guest and host: for best performance, the guest's cores need to be reserved, and should take into account the CPU topology. For example, I have a 5900x and reserved the 6 cores on one CCX for my VM , leaving the other 6 for my host.

For more information, there's the /r/VFIO subreddit. Yeah I know, f*** reddit, but it has a lot of useful information. The looking glass site has some FAQs too, even on things not directly related to looking-glass itself. There is some VFIO discussion on the level one forums as well, but they're not so active.

Anyway if all this sounds like a cool project to spend a few weeks on, I heartily recommend you try it. I sure enjoyed setting this all up and getting it working, but I spent way more time configuring and troubleshooting things than I did gaming with that setup, and in the end I decided that just gaming on Proton and occasionally dual booting for problematic games is a much more practical solution.

[–] [email protected] 1 points 2 months ago

Thank you so much for this, I really appreciate it. Saving this comment.

[–] [email protected] 2 points 2 months ago

I do what your describing (its called vfio) and it works pretty well on Proxmox.

[–] [email protected] 10 points 2 months ago (3 children)

What are the other solutions?

[–] [email protected] 9 points 2 months ago (1 children)
[–] [email protected] 2 points 2 months ago (2 children)

Does it still need to reboot the guest in order to connect an USB device?

[–] [email protected] 3 points 2 months ago (1 children)
[–] [email protected] 1 points 2 months ago (1 children)

You never did, as long as you pass the entire USB controller. I'm not sure if they made changes here since then

[–] [email protected] 1 points 2 months ago

Even if you pass just the device, or if you use spice pass through.

[–] [email protected] 8 points 2 months ago

Vm manager, gnome boxes

[–] [email protected] 4 points 2 months ago
[–] [email protected] 5 points 2 months ago

Hyper-V is not really better than Virtualbox on Windows. Virtualbox will run anywhere and that is its strength.

On Linux, you should use KVM. I assume that's what your advocating for.

[–] [email protected] 3 points 2 months ago

How share folder host-guest without network access? Last time try need to use samba (did not get working) and then impossible to turn off vm network access. Used qemu for win 10 guest.

VB just install guest addition and disable network interface.

[–] [email protected] 2 points 2 months ago

what are those options?

virtualbox is a simple gui i can get working fast whenever i need it to.