To begin, I have the following problem:
nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
I have had this problem before, recently, and it was easily fixed by sudo nvidia-xconfig
followed by a reboot. Now, however, this command outputs ERROR: Unable to find any GPUs in the system.
.
How can I get nvidia to detect my GPU again?
Backstory/context:
This started with me trying to achieve 4K resolution on my monitor (which always results in a black screen, despite the setting being visible in xrandr). I asked about it in this thread.
I thought it might be a good idea to do sudo prime-select nvidia
to see if I could get a full screen by forcing nvidia to be active. Upon rebooting, however, my system did not boot with a GUI at all. I had to access my user through a terminal with ctrl+alt+f2
, where xrandr
and xmodmap
both gave me errors saying they could not find a display. I also got the error message Can't change power state from D3cold to D0 (config space inaccessible)
. It would occasionally work to boot into the GUI if I set the prime-select to intel, but then xrandr could only detect my laptop screen under a single resolution setting.
I purged the nvidia drivers and reinstalled the recommended driver for my system, nvidia-515, but still it didn’t work.
Eventually I followed the advice given in another post here, and blacklisted the nvidia driver in bumblebee’s config file. Only then the system would boot into the GUI again under the same resolution settings as I had before, and under the on-demand setting for prime-select. I do not think this is the reason for nvidia-smi and nvidia-xconfig no longer working, though, as they gave the same errors when I could only boot into the terminal, and supposedly bumblebee starts the nvidia-driver after booting anyway?
I would be really grateful if anyone would be able to help me get nvidia to find my GPU again, and even more still if the solution contains a hint for understanding why I am not getting the full resolution setting.
All help appreciated.