First thing I have tried googling for an answer. None of the popular results are working for me.
Suggestions to use apt purge nvidia* is not working. It tells me those packages are recognized, and they are not installed.
Suggestions to use ubuntu-drivers autoinstall are not working. Some suggestions have steps after them. But that actual command is broken.
sudo ubuntu-drivers install
Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in <module>
greet()
File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/bin/ubuntu-drivers", line 413, in install
command_install(config)
File "/usr/bin/ubuntu-drivers", line 187, in command_install
UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install)
File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in nvidia_desktop_pre_installation_hook
with_nvidia_kms = version >= 470
UnboundLocalError: local variable 'version' referenced before assignment
I tried to fix this with sudo apt install python3 --reinstall. That didn't work. I thought maybe the python3 library got corrupted if it's not recognizing these commands, that didn't work.
So then I tried sudo apt install ubuntu-drivers --reinstall and that's not a thing apparently.
sudo apt install ubuntu-drivers --reinstall
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package ubuntu-drivers
I'm stumped on where to go from here.
Right now when I go to Additional Drivers, it grays out all the nvidia options and only lets me "choose" (not really a choice) Continue using a manually installed driver. And right now, my screen is mostly blue and white. Some red, magenta, and yellow are displayed, but it's mostly blues.
Edit:
Well, this shouldn't have been necessary, but I edited the file that threw this error:
File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in nvidia_desktop_pre_installation_hook with_nvidia_kms = version >= 470
UnboundLocalError: local variable 'version' referenced before assignment
So I put on a line 833 version = 0 and that seems to let me force myself through it. It does give me other errors now running sudo ubuntu-drivers install as it says
Error! Module version 535.183.01 for nvidia-peermem.ko
is not newer than what is already found in kernel 6.2.0-36-generic (550.90.07).
You may override by specifying --force.
So I'm going to force it, fingers crossed. And, nope, doesn't work, so not sure where I need to jump to put --force in.
sudo ubuntu-drivers install --force
Usage: ubuntu-drivers install [OPTIONS] [DRIVER]...
Try 'ubuntu-drivers install -h' for help.
Error: No such option: --force
Edit: This seems to actually have worked. I chose to ignore the errors in the second attempt because the workflow indicated it had downloaded all the other drivers, did a reboot hoping I could pick something out of the Additional Drivers tab, and it defaulted to the nvidia-driver-535-server-open one. It doesn't play nicely with my nvidia-smi for whatever reason, so trying another driver option. Somewhere in the past I had installed version 550 which doesn't show up among the options in additional drivers, so may just need to reinstall that to salvage nvidia-smi as I can't find a way to downgrade that version.