NVIDIA GeForce GPU not working correctly on Ubuntu 20.04

I was trying to get CUDA installed for FAH, but I have nvidia-driver-440 on my system and when I go to install CUDA 10.2 for 440 it says it is for Ubuntu 18.04 and Cuda 11 is for driver-450. I tried updating to driver version 450, but when doing prime-select nvidia no display manager I tried would work. The driver worked, nvidia-smi worked and nvcc --version worked. But now when I reverted to nvidia-driver-440 nvidia-smi is not working even though prime-select query shows nvidia. If someone could help me with getting my GPU to work and installing CUDA that would be very appreciated. My GPU is GeForce 940M.