Screen resolution changes after CUDA installation

Hello,

I was trying to follow the CUDA installation instructions at https://docs.nvidi.com/cuda/cuda-quick-start-guide/index.html#ubuntu, but after the sudo reboot step, I found that my screen resolution had changed to 1024 x 768 and that I had no way to change it back to what it was before. For reference, I am using Ubuntu 20.04 and have a GeForce GTX 1080 Ti installed. I attempted to try some fixes I found online, but they didn’t work.

When I try to run nvidia-settings, I get the following

ERROR: NVIDIA driver is not loaded


(nvidia-settings:44889): GLib-GObject-CRITICAL **: 18:57:33.842: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

** (nvidia-settings:44889): CRITICAL **: 18:57:33.844: ctk_powermode_new: assertion '(ctrl_target != NULL) && (ctrl_target->h != NULL)' failed

ERROR: nvidia-settings could not find the registry key file or the X server is
       not accessible. This file should have been installed along with this
       driver at
       /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
       application profiles will continue to work, but values cannot be
       prepopulated or validated, and will not be listed in the help text.
       Please see the README for possible values and descriptions.

Running lspci -k | grep -EA2 'VGA|3D' gives me

0b:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
	Subsystem: Gigabyte Technology Co., Ltd GP102 [GeForce GTX 1080 Ti]
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvi

And running ubuntu-drivers devices gives me

== /sys/devices/pci0000:00/0000:00:03.1/0000:0b:00.0 ==
modalias : pci:v000010DEd00001B06sv00001458sd00003752bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP102 [GeForce GTX 1080 Ti]
driver   : nvidia-driver-535 - third-party non-free
driver   : nvidia-driver-470 - third-party non-free
driver   : nvidia-driver-545 - third-party non-free recommended
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-495 - third-party non-free
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-460 - third-party non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-525-server - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-455 - third-party non-free
driver   : nvidia-driver-510 - third-party non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-530 - third-party non-free
driver   : nvidia-driver-450 - third-party non-free
driver   : nvidia-driver-465 - third-party non-free
driver   : nvidia-driver-520 - third-party non-free
driver   : nvidia-driver-525 - third-party non-free
driver   : nvidia-driver-515 - third-party non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

Could someone please let me know how I can fix this? I am unfamiliar with all of this and just wanted to install CUDA as it was suggested in the Pytorch installation.

Below is the nvidia-bug-report.log.gz

nvidia-bug-report.log.gz (3.0 MB)

Installing full “cuda” metapackage installed an incompatible driver, “cuda-toolkit” would have been the correct package. Please use Software & Updates to switch to the non “-open” driver version 545.

1 Like

Thank you for your response! When I go to Software and Updates, it looks like the non “-open” driver version 545 is already in use, and I cannot click on “Apply Changes”-

I also tried another method using the following steps-

Using cat proc/driver/nvidia/version to check for the currently running driver would give me

cat: proc/driver/nvidia/version: No such file or directory

And running sudo ubuntu-drivers install nvidia:545 just gives me the following

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  gir1.2-goa-1.0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 568 not upgraded.

So it looks like it’s installed but nothing is being recognized?

Since the driver is incompatible, it’s likely not shown in Software&Updates and confuses the system, Maybe just uninstall “cuda” completely, do an autoremove afterwards, then switch to “nouveau” in Software&Updates and then back to the 545 driver. Once you have a working driver again, please only install “cuda-toolkit” instead of “cuda” metapackage.

1 Like

I followed the steps you mentioned, and I think it is working now. Thank you very much for your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.