Table of contents
Open Table of contents
Why Opt for WSL? A Gamer’s Guide to Work-Life Balance
As someone who straddles the line between development and gaming, finding the perfect setup that allows for both without compromise is akin to seeking the Holy Grail. While Windows Subsystem for Linux (WSL) presents a tempting solution, blending development tools with my gaming rig, I’ve always been a proponent of keeping work and play distinctly separate. More than just a preference, this separation helps me manage the complexities of a Windows system, which, let’s be honest, can be as challenging as mastering a new game on its hardest difficulty.
Embarking on the Proxmox Adventure
Initial Configuration
The journey begins with Proxmox, a choice that’s as foundational as choosing your character class before an epic quest. With Proxmox at the helm, we’re not just setting up a virtual environment; we’re crafting a realm where gaming and development coexist, yet remain perfectly partitioned.
Tweaking the GRUB
Our first step is a deep dive into the system’s heart - the GRUB configuration. This is where the magic starts:
nano /etc/default/grub
We encounter a line, GRUB_CMDLINE_LINUX_DEFAULT=“quiet”, seemingly innocuous yet pivotal. Transforming it into:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt vfio_iommu_type1.allow_unsafe_interrupts=1 video=efifb:off pcie_acs_override=downstream,multifunction nofb video=vesafb:off,efifb:off"
casts the first spell, setting the stage for what’s to come. But why type when you can automate? With a simple command, we ensure our intentions are clear:
sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt vfio_iommu_type1.allow_unsafe_interrupts=1 video=efifb:off pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"/g' /etc/default/grub
And with a update-grub, the path is updated. Informing the Kernel
Now, we introduce our modules, a trio of vfio, vfio_pci, and vfio_virqfd. They’re not just modules; they’re our allies, whispering to the kernel that we’re commandeering its GPU for a higher purpose. The echo commands that follow are like intricate spells, remapping and preparing the system for what’s to come. Driver Blockades
Our world isn’t perfect, and sometimes, we need to take measures to keep our GPU from being led astray by the kernel or the operating system. Blacklisting drivers is a necessary step in ensuring our setup remains pristine for gaming and development:
echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
echo "blacklist amdgpu" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf
The Final Enchantment
Identifying our hardware allies is next, with lspci -nnk | grep "VGA\|Audio"
revealing the codes of our companions. Nvidia, Intel, AMD – each has a role to play in our setup.
With a final incantation of update-initramfs -u update-grub
and a system reboot, our realm is ready. The Proxmox UI now becomes our portal, allowing us to add GPUs and step into worlds unknown, be it for gaming glory or development dominion.
To-Do: Crafting the Future
- Automate the Magic: A script to turn these commands into a simple, powerful spell.
- Visual Chronicles: Adding photos to enhance our blog’s scroll.
- Keep Innovating: There’s always room to grow, to learn, and to improve our homelab setup.