[go: up one dir, main page]

DEV Community

Cover image for Setting up NVIDIA stuff on Pop!_OS
Talles L
Talles L

Posted on • Edited on

Setting up NVIDIA stuff on Pop!_OS

I had a lot of trouble with Ubuntu+NVIDIA which I solved by just installing PopOS. On Ubuntu I was getting small 'hiccups' all the time (my machine was freezing for a few seconds) and sometimes crashed under heavy video usage.

Technically PopOS is just Ubuntu under the hood, so it shouldn't be better when compared to a well-configured Ubuntu. Maybe it's me sucking setting up the driver myself. Maybe the NVIDIA-specific ISO has some secret sauce not easily achievable. Probably both.

Before we start, here is the machine I'm using:

Fresh from the installation I already had NVIDIA settings installed and showing my card temperature, what a relief:

The PowerMizer setting was a little stubborn. I want to always be on "Prefer Maximum Performance", but it ended up losing my settings once I rebooted. I fixed by adding those two commands to run at startup:



nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'
system76-power profile performace


Enter fullscreen mode Exit fullscreen mode

Next, let's proceed and get nvtop for verifying the GPU usage and glxgears to run something on it:



sudo apt install nvtop mesa-utils


Enter fullscreen mode Exit fullscreen mode

Let's put CUDA on this thing and test it out with PyTorch:



$ sudo apt install nvidia-cuda-toolkit
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install torch
$ python3
>>> import torch
>>> torch.cuda.get_device_name(0)
'NVIDIA GeForce RTX 2060'


Enter fullscreen mode Exit fullscreen mode

Top comments (0)