4

I have installed Ubuntu 20.04 on wsl2, Windows 11. I have installed CUDA as well. whenever I open any Ubuntu app with GUI, such as file manager or any other installed apps, the graphics window display becomes garbled or distorted. I tried switching GPU on/off, power saving on/off, and switching refresh rates, but I'm unable to fix the issue.

File manager window:

file manager window

Brave browser:

brave browser

3
  • I have the exact same issue, I also have CUDA toolkit installed. WIndows 11, AMD Radeon integrated graphics with dedicated RTX 2060 (mobile)
    – mattlant
    Commented Dec 6, 2023 at 8:15
  • upvoting this question, I have the same issue. Didn't have the issue with Ubuntu 18 (on Windows 11), just installed Ubuntu 22 (from scratch), and have this problem. Tried uninstall everything and reinstall, reboot etc. Still have problem. (Nvidia Geforce 2080ti)
    – memo
    Commented Dec 19, 2023 at 2:48
  • I don't know if @hugo's answer solved this for you, but I've read elsewhere (will update with the link if I can find it), that on WSL you do NOT want to install a real Nvidia driver. WSL comes with an Nvidia CUDA stub driver that basically just passes information to and from the host device's GPU driver. If you install CUDA Toolkit, it includes a full nvidia driver (which you would need if you were just running Linux directly on hardware, but you don't need on a VM like WSL). The solution is to either unisntall CUDA Toolkit, or manually replace its driver file w/ a copy of the stub driver
    – ETL
    Commented Feb 11 at 15:39

2 Answers 2

3

In Power Shell

wsl --shutdown

Then start again

2
  • Thanks so much. Such a simple thing to do and I was looking at it as a complex problem. Commented Feb 27 at 17:54
  • I wish I could find this solution before reinstalling the entire WLS.. Even after reinstalling WSL and restarting Windows, the issue persisted. But, this simple solution worked! Thanks! Commented Feb 29 at 23:07
0

As stated on a post from reddit, updating wsl to version 2.0.14 solves the problem (at least it solved it for me). Before updating, it is always best to shutdown WSL doing:

wsl --shutdown

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .