I saw from a post that you can basically host your own mini windows inside of linux to play games with, and you can choose what to share with that little windows so microsoft can’t track you in any way. Does anyone have a tutorual/guide for that? Also what Distro would be best for it?

  • garrett@beehaw.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 years ago

    There are a few ways…

    The easiest is using Steam, which handles everything for you (once you flip a switch in settings). The second easiest is using Bottles or Heroic, both of which lets you run Windows games and apps on Linux via Wine. The third is VMs, but that’s just Windows itself running virtualized (in its own virtual machine) in Linux. The fourth way to use the same computer for Linux and games is to dual boot (reboot from one OS into the other) and stick with Linux except for particular games that might not work with other methods — which is thankfully very rare these days (as most games work in Linux via Proton or in Wine via Bottles or Heroic).

    1. Steam on Linux has a switch in the settings to enable Proton for all games. Flip that on, and it’s basically transparent. For setting up Steam, the easiest way is to install it from Flathub.org. Depending on your distribution, it’s most likely set up for you. If not, then follow the setup guide @ https://flathub.org/setup. Once Flathub is set up on your system, you can install the flatpak of Steam from your app store (GNOME Software, KDE Discover, etc.)

    2. An alternate method is to set up Wine outside of Steam. There are a few ways to do that; Bottles is the most straightforward and super easy way, letting you have different Wine environments for different apps or games (or just one for everything, if you’d rather)… Bottles is easy to use and has installers for a lot of common apps and launcher. Additionally, Heroic is also a good way to run GOG, Epic, and Amazon games on Linux. Both are on Flathub too.

    3. There’s a third major way, and that’s installing Windows as a virtual machine on Linux. You’d probably want to use GNOME Boxes or virt-manager for that. Boxes is easier (and on Flathub) and will give you adequate GPU performance for a lot of things (however, isn’t ideal for high performance gaming), but if you have two GPUs (often one integrated and one discrete), then you can use GPU passthrough with virt-manager, but that’s way outside the scope of this comment. 😉 Perhaps having a Windows install in a VM just for some games that don’t work on Linux is what that person meant? But that would still get you tracked by Microsoft whenever you’re using Windows in that VM. (So I’m guessing they’re talking about Wine instead, which is option 1 and 2.)

    4. Dual boot is basically reusing the same hardware for two different operating systems, but only one at a time. When you’re in Linux, Microsoft doesn’t track you (unless you’re using Edge on Linux or specifically using a Microsoft service). You’d want to minimize your time in Windows.

    You could use any of the above or a combination (perhaps even all of the above), depending on what you want. I only use 1 and 2 myself. While I do play a lot of games, all on Linux, I don’t play any that require Windows.

    (There are only a few these days that don’t work on Linux. The notable ones I’m aware of are Fortnite, Destiny 2, Genshin Impact, and a few others that rely on lootboxes where the maker didn’t flip the switch to enable “anti-cheat” on Linux. Most everything else works these days, even a lot of other lootbox/pay-to-win games.)

  • merthyr1831@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    It’s pretty advanced. You’ll need 2 GPUs (so gaming laptop or gaming PC with at least 2 graphics adapters) and some more advanced Linux stuff like editing kernel/boot configs, messing with drivers, and BIOS settings.

    Look at BlandManStudios on Youtube, he has a bunch of tutorials on this. But make sure you back up your system because, like I said, it’s not a simple setup.

  • Yoru@lemmy.mlOP
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    Thank you everyone for all the lengthy and informative replies! I appreciate them all. I’ll probably go with gaming normally on linux and not do anything fancy

  • PotatoesFall@discuss.tchncs.de
    link
    fedilink
    arrow-up
    3
    arrow-down
    2
    ·
    2 years ago

    Not sure what you mean. You can virtualize a whole windows machine but that will NOT be good for performance.

    What you really want is a compatibility layer than maps syscalls to your linux kernel and emulates a windows filesystem. I’m fairly sure that’s what Wine and Proton do, but am no expert.

    If you install steam (on most distros) it should also install Proton to play games with (check ProtonDB for which games work well). Again no expert but maybe this helps a little.

    • wildbus8979@sh.itjust.works
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      2 years ago

      You can virtualize a whole windows machine but that will NOT be good for performance.

      Sorry but that is totally not true, if you have a second graphics card to passthrough to the virtual machine.

      • cujo@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        3
        ·
        2 years ago

        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.

        • wildbus8979@sh.itjust.works
          link
          fedilink
          arrow-up
          7
          ·
          2 years ago

          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.

          • cujo@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 years ago

            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.

            • wildbus8979@sh.itjust.works
              link
              fedilink
              arrow-up
              3
              ·
              2 years ago

              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.

              • cujo@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                1
                ·
                2 years ago

                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…?

                • wildbus8979@sh.itjust.works
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  2 years ago

                  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.

        • dinckel@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 years ago

          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

          • cujo@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            1
            ·
            edit-2
            2 years ago

            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.

            • dinckel@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              2 years ago

              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

  • jernej@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I remember there being a script for fedora, that apperently workes since it made me realize my PC only has one GPU (no GPU)

  • cujo@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    2 years ago

    As the other comment says, what you’re referring to is running a Windows VM (virtual machine) inside of your Linux machine. It’s a great asset for a lot of things, but gaming is not it’s strong point. A VM shares resources with it’s host machine, meaning it can only access so many of your CPU cores, utilize only so much of your RAM, and take advantage of CPU powered graphics – unless, as was pointed out in another comment, you happen to have a spare graphics card laying around. The set up for GPU passthrough is more trouble than it’s worth, IMO, especially for gaming. And you still have the other bottlenecks to contend with.

    Gaming on Linux is best enjoyed by using a combination of Wine and Proton (Wine suped up for the express purpose of gaming by the fine folks behind Steam) paired with a launcher of some kind, usually Steam. For non-Steam games, Lutris is a fantastic second choice. These platforms make gaming on Linux easier than ever, and are actually the technologies powering the SteamDeck. If you decide to go this route and need any help setting up, please reach out! The community is here and (usually) quite helpful, lol.

    If you decide to try the VM anyway, you should look into a software called VirtualBox. You will need to install a few packages to make your system a suitable host, and you’ll need the Windows installation ISO image to get it up and running. You can usually acquire it directly from Microsoft by running a search for “Windows XX ISO” where the XX is the version number you’re looking for. If you need help getting any of that together, I’d be glad to assist as well. ☺️

    All this comes from years of running Linux and only Linux, on a PC I almost exclusively game on. I’ve had great success, especially with all the headway Valve has made into making the ecosystem viable and accessable.

    However you decide to proceed, best of luck to you!

    EDIT: As has been pointed out, if you want to virtualize a gaming setup, you should look into KVM, not VirtualBox! It sounds like it’s a much more performant option, I am just not very familiar with it myself.

    • wildbus8979@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      2 years ago

      If you decide to try the VM anyway, you should look into a software called VirtualBox.

      God, please, no. Why do people insist on using subpar virtualization when KVM is far superior and built into the kernel? I will never understand.

      Please, I beg of you, stop this madness.

      • cujo@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        Because it’s accessable, and is also the extent of my knowledge in running a VM. I won’t speak about KVM because I am not intimately familiar with KVM, nor will I ever be. I’m certain it’s a better solution than VirtualBox, just as running games in Linux with Wine/Proton is a better solution than setting up a VM to game in.

        I’d be happy to hear about the details of why KVM is so superior, if you’d care to enlighten me! I’m always looking to learn new things.

        The real question is why we’re down voting people who are adding to the discussion just because we disagree with them, instead of just having a conversation?

        • wildbus8979@sh.itjust.works
          link
          fedilink
          arrow-up
          5
          ·
          2 years ago

          Because it’s accessable

          Here, enjoy: https://virt-manager.org/

          I’d be happy to hear about the details of why KVM is so superior

          Essentially type 1 hypervisors, like KVM/Qemu, make direct use of the CPU’s virtualization technology (VT-d and VT-x) while type 2 hypervisors run all the calls through the kernel which is significantly slower. In a way type 2 hypervisors are closer to an emulator.

          • cujo@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 years ago

            Thanks for the link! And for the info. I’ll give KVM an honest try, and maybe I’ll get motivated enough to spin up a VM for CaptureOne. A 1080 should be decent enough for light photo editing, and I was recently given one as-is. It may or may not work, neither I or the person who gave it to me had time to test it.

    • Yoru@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      thank you for the lengthy reply! I think I’ll go with alternative options and not to virtualize windows, because I don’t have a separate GPU that I can pass in, nor a second monitor.