Thursday, May 2, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 5707  / 1 Year ago, thu, december 22, 2022, 1:40:58

I recently re-installed my wife's XUbuntu 22 machine. Previously we used the NVidia driver package from the NVidia website, especially after a bit of a f&%k up last year where the official repo version broke due to broken dependencies.


This time I thought I would give the repo version another go, especially since my wife is scared of re-installing the graphics drivers after a kernel update - and it is a real nuisance.


As per the guide I found online I ran the command sudo ubuntu-drivers autoinstall. The result was:


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 432, in autoinstall
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 manually installed the 515 drivers repo package, but it does not seem to include the 32 bit drivers, and now Steam, among other things, doesn't work.


More From » nvidia-geforce

 Answers
6

The reason for the error is the bug in the installer. The more detailed explanation could be found on nvidia forum. If you want to use command line for driver installation, you could run such a command to get possible driver versions:


sudo ubuntu-drivers devices

Then you can manually choose the version you want from the list, but use it without -open at the end (this is the reason for the error). So, instead of nvidia-driver-515-open use nvidia-driver-515 and run:


sudo apt install nvidia-driver-515

[#192] Thursday, December 22, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
issfullus

Total Points: 264
Total Questions: 126
Total Answers: 107

Location: Comoros
Member since Mon, Dec 19, 2022
1 Year ago
;