To get the NVIDIA drivers installed properly:-
This usually does the trick getting it upgraded to the latest drivers.
There may be files kept back from the apt upgrade process. To solve this, run:-
In some cases, the dist-upgrade is not needed but you may want to run:-
This should remove stubs and obsoleted packages. In this case, you may want to instigate an upgrade:-
At this point, we are at nvidia driver version 440 and will require a reboot. This resulted in recovery of the 4k display.
At this point, we want to get the latest version of the driver so we need to update the repository:-
Code: Select all
sudo apt-add-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
This is followed by a reboot. At this point, the 450 driver should be in the Additional Drivers list in the "Software & Updates" but cannot be selected because the driver appears to be set to some "manual" setting.
If you want to install the NVIDIA driver from the downloaded run file, you may need to disable the nvidia-drm that is running:-
Code: Select all
sudo systemctl isolate multi-user.target
sudo modprobe -r nvidia-drm
You will probably need to skip the DKMS build and okay the use of signing, generate the keys, and so on. The problem seems to be that the installer is expecting a different version of GCC than is present on Ubuntu 20.04. You could conceivably fix this by installing the requisite version of GCC and then setting the environment variable to point to it but this is rather involved.
This will disable the GUI, which can be restored later with:-
Code: Select all
sudo systemctl isolate graphical.target
(DO NOT USE VERSION 450 or 455 - they FAIL.
USE version nvidia-440-server)
After this, there seems to be a need to upgrade to install the latest driver (version 450 at this time).
Doing this, however, KILLS THE VIDEO SYSTEM:-
Code: Select all
sudo apt install nvidia-driver-450
In my case, since it was already done - I had to remove this using:-
Code: Select all
sudo apt remove --purge nvidia-driver-450
sudo apt install nvidia-driver-440-server
This might not be completely necessary but the step to try would be to go into "Software & Updates" and select the nvidia-driver-440-server (proprietary) option and Apply that.
In order to prevent apt update from changing this driver, do the following:-
Code: Select all
sudo apt-mark hold nvidia-compute-utils-440 nvidia-dkms-440 nvidia-driver-440-server nvidia-kernel-common-440 nvidia-utils-440