Why I Left Linux and Went Back to Windows

Windows is currently the operating system I use most on my desktop. But I have not always used Windows. For quite a long time, Linux was my primary operating system, and I would still like to return to it if I can.

So why am I using Windows now? The answer comes from my experience with computers and a hardware virtualization problem. In this post, I will talk about the operating systems I have used, why I chose Linux, and why I currently use Windows.

1. Windows was the first operating system I used

I first encountered computers in elementary school. I had almost no technical knowledge then and mostly thought of a computer as a device for games and everyday programs. Naturally, Windows was the first operating system I used.

After starting middle school, especially around the middle of those years, I became more interested in programming and computer systems. I tried making programs, fixing them when they did not work, and sometimes abandoning a project and starting over. From then on, a computer became more than a device for running programs; it became a tool for making things myself.

Generative AI coding tools were not common then. When something went wrong, I had to analyze the error, search for answers, and read the official documentation myself. It could feel inefficient, but I think the experience helped me understand computer systems.

2. Choosing Linux as my primary operating system

As my interest in programming grew, I started using Linux. It gave me the freedom to configure my development environment, inspect how the system worked, and automate tasks with scripts and programs. That freedom suited me, and over time I switched my primary operating system from Windows to Linux.

That did not mean I could get rid of Windows completely. Some programs only worked properly on Windows, and certain websites required Windows security software. Even while using Linux most of the time, I still had reasons to use Windows.

I considered how to use both operating systems and chose virtualization instead of dual booting.

3. Running Windows in a virtual machine on Linux

The computer I used at the time had two GPUs. I used one with Linux and passed the other directly to a Windows virtual machine. This is called GPU passthrough: it allows a virtual machine to use a physical graphics card instead of a virtual graphics device.

The setup looked like this:

  • The first monitor was connected to Linux.
  • The second monitor was connected to the Windows virtual machine.
  • One GPU was used by Linux.
  • The other GPU was assigned to Windows.

I could use both operating systems at the same time on one computer.

Setting it up was not simple. Before starting the Windows virtual machine, I had to detach the second GPU from Linux and prepare it for the virtual machine. I wrote a script to automate this process.

  1. Stop using the second GPU in Linux.
  2. Detach the GPU from the Linux driver.
  3. Prepare the device for assignment to the virtual machine.
  4. Start the Windows virtual machine with the GPU attached.

The second monitor went dark briefly, then came back on when Windows started. A virtual machine cannot guarantee the exact same performance as a physical Windows installation, but my computer was powerful enough for everyday work and even some AAA games.

After shutting down Windows, I ran another script to restore the GPU for Linux. Once it was reattached to the Linux driver, Linux could use the second monitor again. I could use both operating systems at once when I needed Windows, then return to a dual-monitor Linux desktop when I did not.

4. Writing a Rust program to switch input devices

Moving between operating systems made switching my keyboard and mouse inconvenient. When I used Windows, I had to pass the input devices to the Windows virtual machine, then return them to the host when I wanted to use Linux again.

To solve this, I wrote a separate program in Rust. It could switch USB devices to the operating system I wanted to use.

One unusual part of the setup was using a separate keyboard as a controller rather than for typing. The program detected HID input from that keyboard and ran a predefined switching action when I pressed a particular key. In effect, I used a keyboard as a simple physical control panel.

When something in my system is inconvenient, writing a program to fix it is one of my usual habits. Rust worked well for this kind of task too.

5. A computer upgrade made GPU passthrough difficult

I was happy with this setup until I upgraded my computer. The new computer also had two GPUs, and its CPU supported virtualization. I expected to recreate my old setup, but ran into an IOMMU group problem.

An IOMMU group describes how hardware devices are grouped for isolation. If a GPU is in its own group, assigning it to a virtual machine is more straightforward. If it is grouped with other devices, it can be difficult to separate and pass through safely.

On the new computer, the GPUs were not separated in the way I needed. I could not reproduce my previous GPU passthrough setup as it was.

A problem that may not be solved by operating-system settings alone

At first, I looked into changing Linux or virtualization settings. But IOMMU grouping is affected not only by the operating system, but also by the motherboard's PCIe layout and device isolation capabilities. Changing a few configuration files may not be enough.

There are patches such as ACS override that can make device groups appear split in the Linux kernel. But making groups look separate in software does not improve the hardware's actual isolation. If possible, I prefer to preserve the isolation properties provided by the hardware.

I also considered modifying the motherboard's BIOS firmware directly. A bad firmware flash can prevent the system from booting and may be difficult to recover from. For now, I do not want to try that approach.

6. Going back to Windows as my primary desktop OS

Because of this issue, Windows is currently my primary desktop operating system again. I have not removed Linux; I installed both systems in a dual-boot configuration.

With dual booting, though, I cannot use both operating systems at once. To use Linux, I have to shut down Windows and boot into Linux. To return to Windows, I have to reboot again. Compared with my old setup, where both systems were available at the same time, this is inconvenient. I use Linux on my desktop less often as a result.

I mainly use Linux on servers now and Windows more often on my desktop.

What might I do next?

I have not decided yet. If I can solve the IOMMU group issue without modifying the BIOS firmware directly, I would like to try. I also want to see whether changing the PCIe slot arrangement or other hardware settings could help.

If those options do not work, I may build another computer. Most of my other computers currently run Linux and are configured more like servers than ordinary desktops. I could build a Windows-only desktop and keep my existing computer for Linux, or keep this computer dedicated to Windows and build a separate Linux desktop.

I still prefer Linux

Even though Windows is my primary operating system now, Linux is still my personal preference. That is not simply because Linux is always faster or lighter. Resource use depends on the installed programs, system settings, and the work being done.

I prefer Linux because I can control the system directly and configure my development environment the way I want. Its design and the freedom it gives users also fit my values. Some Windows product policies and system management choices do not fit my preferences as well.

Of course, Windows has advantages: broad software compatibility, strong game support, and access to many commercial programs. Those are some of the reasons I have not abandoned it completely.

I use Windows now not because it is my favorite operating system, but because it is the most practical choice for my current hardware and day-to-day needs. I hope I can make Linux my primary desktop environment again someday.

Related reading: Building a Keyboard and Mouse Switcher in Rust · Why Rust Is My Favorite Programming Language.