Score:1

Ubuntu 22.04.1, got stuck with the option "Continue using a manually installed driver"

ph flag

I'd be glad if someone could help me out. I'm running 22.04.1 on a notebook with Nvidia GTX1650. I tried changing the Nvidia driver from 510 to 515 in the "Additional Drivers" GUI. The change failed, probably due to temporary internet disconnect, I tried it a couple of more times, it failed again, until I tried to play it safe and switch to the noveau driver. However, at that point I got stuck with the option "Continue using a manually installed driver". I reviewed this previous string in depth: Not able to change the Nvidia driver in ubuntu 20.04, but couldn't find an answer applicable to my scenario.

E.g. when I try

sudo ubuntu-drivers install

I get

  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

If I try

sudo ubuntu-drivers autoinstall

I get nearly identical output

    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

And when I try removing all Nvidia packages:

sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}')

I get

dpkg: error: --purge needs at least one package name argument

But I can't find out which argument is the correct one.

So to sum up, seems like I'm stuck with the integrated UHD Graphics at the moment, unable to use my Nvidia. Settings > About: enter image description here

Any ideas on how I can get a valid Nvidia driver installed again?

Score:1
ph flag

I connected to a more stable network, then ran:

sudo apt install nvidia-driver-470

This installed the somewhat older 470 driver. Now the Continue using a manually installed driver is gone in the Additional Drivers GUI, and the other options are active, not grayed out.

Asim Ali avatar
nl flag
It worked for me too.. the only difference is that I had to use driver version 390, which is the latest version available for my old nvidia laptop video card NVS 4200M. sudo apt install nvidia-driver-390 Thank you !
mic avatar
ru flag
mic
This worked for me too, but after installing 470 I installed 525. For whichever reason, if I try to change driver in the GUI I just get an "X" pop up. However, now I have the latest driver.
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.