

sudo ppa-purge ppa:kisak/kisak-mesa Install the latest Mesa graphics drivers in Ubuntu Install PPA Purge tool first: sudo apt install ppa-purgeĪnd then use it to remove the PPA as well as the Mesa package version installed by this PPA. If you are facing issues and do not want to use the newer version of Mesa, you can revert to the original version. Remove it and go back to original Mesa driver It will give you the latest Mesa point release. You can use it by entering the following commands one by one in the terminal: sudo add-apt-repository ppa:kisak/kisak-mesa The Kisak-mesa PPA provides the latest point release of Mesa. Install the latest stable version of Mesa driver in Ubuntu HWE Kernel gives you the latest stable kernel used by Ubuntu on an older LTS release. It will be a good idea to enable HWE kernel on Ubuntu to reduce the chances of conflict with the kernel. Let’s test it in the next step.Installing new Mesa graphics drivers may also need a newer Linux kernel.

Once complete, you should see a series of outputs that end in done.:Ĭongratulations! You should have a working installation of CUDA by now. Sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 Then setup the appropriate package for Ubuntu WSL:

Also notice that attempting to install the CUDA toolkit packages straight from the Ubuntu repository (“cuda”, “cuda-11-0”, or “cuda-drivers”) will attempt to install the Linux NVIDIA graphics driver, which is not what you want on WSL 2. Be aware that older versions of CUDA (<=10) don’t support WSL 2. The following commands will install the WSL-specific CUDA toolkit version 11.6 on Ubuntu 22.04 AMD64 architecture. On WSL 2, the CUDA driver used is part of the Windows driver installed on the system, and, therefore, care must be taken not to install this Linux driver as previously mentioned. Normally, CUDA toolkit for Linux will have the device driver for the GPU packaged with it.
