Score:1

Installing NVIDIA drivers on Ubuntu 22.04

in flag

I have followed a number of tutorials to install NVIDIA drivers on Ubuntu 22.04, but none has worked so far. Before the update, on Ubuntu 20.04, everything worked fine.

I have tried to install the driver via GUI and console as well. In the console, I have tried to install versions nvidia-driver-525, nvidia-driver-470, and nvidia-driver-515-open by running

sudo apt install [driver version]

I have RTX2080Ti.

If I run sudo ubuntu-drivers autoinstall, I get the following error:

dpkg: warning: version 'unsigned-5.18.10-051810' has bad syntax: version number does not start with digit
dpkg: warning: version 'unsigned-5.18.10-051810' has bad syntax: version number does not start with digit
dpkg: warning: version 'unsigned-5.18.10-051810' has bad syntax: version number does not start with digit
dpkg: warning: version 'unsigned-5.18.10-051810' has bad syntax: version number does not start with digit
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

Any help is highly appreciated.

karel avatar
sa flag
Does this answer your question? [How to download all required Ubuntu drivers](https://askubuntu.com/questions/543325/how-to-download-all-required-ubuntu-drivers)
Raffles avatar
in flag
Try at the command line, sudo apt install nvidia-driver-XXX nvidia-dkms-XXX where XXX is the desired driver. Reboot once installed.
Score:0
co flag

Assuming this is a fresh install and logged in Ubuntu on Xorg (from settings icon in log in)

do the following:

sudo apt update && apt upgrade -y

just to get any updates, then from this github page https://github.com/lutris/docs/blob/master/InstallingDrivers.md

The following command is what you run to install the nvidia drivers (version 515***; change this to the latest one for your nvidia card; consult the page for more info)

sudo add-apt-repository ppa:graphics-drivers/ppa && sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install -y nvidia-driver-515 libvulkan1 libvulkan1:i386

then reboot with

reboot

Hope this works and check to make sure your OS recognizes your GPU.

Shane Gervais avatar
co flag
Honestly I use Fedora now instead since it was easier for me to setup my gpu's drivers imo.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.