Installing NVidia CUDA on Ubuntu Budgie 20.04

Hi,
I recently installed Ubuntu Budgie 20.04 on my laptop “Lenovo Ideapad 330 with NVidia Geforce MX150”. While installing NVidia CUDA Toolkit 11.0, I faced couple of issue which are reported here.

There are two ways to install nvidia drivers on Ubuntu Budgie:

  1. Install using “Additional Drivers” tool
  2. Install manually using .run file from Nvidia website

Problem with the first type is that software center shows “nvidia-driver-440”. If this driver is installed, it works absolutely fine but the problem with this driver is it supports CUDA 10.2 but CUDA 10.2 is not supported on ubuntu 20.04 as it requires gcc 7 and ubuntu 20.04 has gcc 9.3. So CUDA will not work with this driver. However CUDA 11.0 supports ubuntu 20.04 but it requires nvidia-driver-450 which is not present in ubuntu software center. So we need to install it manually by downloading it from NVidia website.

I downloaded cuda toolkit 11.0 which includes driver as well. I installed it following the installation instructions mentioned at following link:
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

After installation, I get blank screen, no display. I changed terminal using function keys and run nvidia-smi to check running processes. It shows /usr/lib/xorg/Xorg is running but no display.

But if you run nvidia-smi with previous installation (software center), it shows two processes:

  1. /usr/lib/xorg/Xorg
  2. budgie-wm (or vm)

Anyone please help me resolving this issue and guide me how to run budgie-wm process on nvidia graphics.

Not to mentioned, this manual installation of NVidia CUDA 11.0 is working fine on ubuntu-desktop-20.04 but not on ubuntu budgie 20.04. Help me resolve this issue.

Thanks & Kind Regards,

Hi and welcome

Given that nvidia 450 is still in beta/first stable it will not have been packaged yet formally for 20.04. It will be eventually after a bit of time when it has gone through the stable release processes.

In the interim … since its beta/first stable, suggest tackle this on the nvidia forums to allow nvidia devs visibility of beta/first stable issues such as this.

Hi Dear,

Thank you for your response. According to NVidia’s website, 450.57 is the officially supported driver for Geforce MX150:
https://www.nvidia.com/Download/driverResults.aspx/162107/en-us

Whereas, CUDA 11.0 includes 450.51. I have tested both versions.

Both versions are running fine on Ubuntu desktop 20.04 but not on Ubuntu Budgie 20.04.

Kind Regards,

This is incorrect. That is the minimum gcc version.

I followed your link and installed and installed CUDA 10.2. After installation when I try to compile any sample code, it gives error “unsupported GNU version! gcc versions later than 8 are not supported”

So, CUDA 11.0 is the only option but CUDA 11.0 doesn’t work on budgie desktop.

Kind Regards,

gcc-8 is in the repos … you can use multiple gcc versions in 20.04

Hi,

I have resolved this issue. I am not sure what resolved it, but here are the steps that worked for me:

  1. Disable secure boot
  2. Install Ubuntu Budgie 20.04
  3. Update/ upgrade all packages
  4. Install CUDA Toolkit 11.0 via the package manager (as mentioned in the NVIDIA documentation)

I did the same steps before, except secure boot. May be this was causing the issue.

Best Regards,

1 Like

Fossfreedom, what nvidia driver am I using? this output:

mars@mars-ThinkPad-P50:~$ glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro M2000M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.100
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 440.100
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.100
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

SO: Am I running 4.6.0 or 440.100? Exciting to look at stuff like this, but confusing.

I just installed NVIDIA CUDA 11.1 and the latest drivers by running these commands on a freshly installed Ubuntu Budgie 20.04 today, you can save them to a .sh file and run it in the Terminal and all you need to do afterwards is a reboot.:

#!/bin/sh
#
# Install NVIDIA CUDA on Ubuntu 20.04
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt update
sudo apt install -y nvidia-kernel-source-455
sudo apt install -y nvidia-dkms-455
sudo apt install -y nvidia-driver-455
sudo apt install -y cuda-drivers-455
sudo apt install -y cuda-runtime-11-1
sudo apt install -y cuda-11-1
echo 'export PATH=/usr/local/cuda-11.1/bin${PATH:+:${PATH}}' >> $HOME/.bashrc