Using: nvidia-installer ncurses v6 user interface
→ Detected 28 CPUs online; setting concurrency level to 28.
→ Unable to locate any tools for listing initramfs contents.
→ Unable to scan initramfs: no tool found
WARNING: You do not appear to have an NVIDIA GPU supported by the 550.76 NVIDIA Linux graphics driver installed in this system. For further details, please see the appendix SUPPORTED NVIDIA GRAPHICS CHIPS in the README available on the Linux driver download page at www.nvidia.com.
→ Installing NVIDIA driver version 550.76.
→ Performing CC sanity check with CC=“/usr/bin/cc”.
→ Performing CC check.
ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the ‘kernel-source’ or ‘kernel-devel’ RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the ‘–kernel-source-path’ command line option.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
You can’t/mustn’t install the nvidia driver in wsl2, it doesn’t have a real gpu.
Graphics accel works through mesa/dozen, cuda is simply passed through using the Windows driver.
EpicGames said that UE does not officially support mesa, so you need the nvidia official driver instead.
When I installed mesa-driver, UE applications can boot, however they show only noises on viewports.
Seems interesting but by reading it, it just looks like the usual ambigous and bogus msft docs crap. Technically, it doesn’t really contain any info. I’m interpreting this as you’ll have to install the Windows driver matching your gpu vendor, to have a virtual gpu in the wsl2 vm with some hw accel available. Nothing new, really. A bit puzzling is it directly mentions OpenGL, which would be a novelty but i wouldn’t know how this would work as it would need to be provided by mesa as an extra driver and I don’t know of any project working on that. Would be pointless anyway imho. What does work is vulkan via mesa/dozen as I mentioned. You might then be able to plug Zink to it to have OpenGL accel but that is rather fiddly and no novelty. Even if the doc were about that, it would need to talk about the mesa version needed and not some wsl blahblah. So I have no idea what they’re talking about, please investigate yourself and report.
However, there are no problem running X11 apps without GPU(vulkan) on WSL2 as this page.
What generix says in the post below is the answer.
My conclusion is that if UE supports only the official Driver and not open source drivers, then it is impossible to run UE applications on WSL2.
My final goal is not to run UE applications on WSL2, I just wanted to do casual test my cross-compiled UE5 application for Linux on Windows PC.
So I ended up building a new native Linux PC environment.
By the way, even though the viewport image is corrupted, but the UE5 editor itself works.