Score:2

Are New Updates Going to Wreck 22.04.1 installation (running NVidia drivers)?

us flag

Background Two days ago I started up computer & it was stuck with 1 screen at 1024x768.

I had to reinstall Ubuntu from scratch and I posted that here.

Today, I started the computer again and it was back at 1024x768 with only one screen available again.

I got it fixed (as I wrote up on the answer at the link above. I had to choose an older NVidia driver for my 1660.

New Updates Now I see there are new updates -- this is what started the entire problem.

ubuntu updates

I'm wondering if installing these updates are going to corrupt my system so that I cannot run my NVidia with 2 screens and a good (high) resolution?

I'm just not sure if I should ignore updates somehow or if I'll always be able to choose the older 470 driver??

David avatar
cn flag
You need the updates. I suggest your system was never corrupted and a re install was not required. What most likely happened was a new kernel got installed in the update. Simply going back to the old kernel would have fixed it. I suggest accept the update and if you have an issue come back and let someone help you. You can not have a stable and secure system if you do not do the updates.
raddevus avatar
us flag
That's a good answer, however, did you see my original post and the image where I attempted to go back to various kernel versions and all failed to recognize the graphics card?
David avatar
cn flag
All that means is you need to install the right driver for the GPU. Again no reason to reinstall.
raddevus avatar
us flag
Ok, sounds good, plus I'm a willing guinea pig. Updating now.
David avatar
cn flag
I will make an answer and you can accept it.
Score:1
cn flag

You need the updates.

I suggest your system was never corrupted and a re install was not required.

What most likely happened was a new kernel got installed in the update. Simply going back to the old kernel would have fixed it. I suggest accept the update and if you have an issue come back and let someone help you. You can not have a stable and secure system if you do not do the updates.

If it was not a new kernel that caused the issue you may simply have had the wrong driver for the GPU.

When doing the install use the additional drivers and install the one that is suggested for your card.

cc flag
Dropping back to an older kernel is not likely to fix the resolution problem since these days, installing an Nvidia driver module in the latest kernel removes all the Nvidia driver moduels for older kernels. The older kernels then have to use the nouveau driver.
alanionita avatar
us flag
<I suggest your system was never corrupted and a re install was not required.> Clearly it was since the resolution dropped to 1024. I had a similar experience and instead of reinstalling I had to purge nvidia drivers and reinstall since there seems to be a bug with ubuntu-drivers that was recently introduced. Using the additional drivers install was pointless in this case and although it is the default path it doesn't mean it always works.
Score:0
us flag

The recommended suggestions did not work for me.

OP mentioned that they reinstalled the system. This is fine for most things, but we are on LTS for a reason and a reinstall was not an option for me.

It seemed like the reinstall fixed the issue rather than the accepted answer.

System details

OS: 22.04.1

Kernel: 5.15.0-46-generic

GPU: Nvidia 3080

Symptoms

Like OP I also ran a standard install and fell back to 1024 resolution.

I did not change drivers

I was not given a kernel update

I also tried to change to older drivers 510 and then back to my recommended driver 515 but without any success.

I did not reinstall the os.

The problem

Starts with ubuntu-drivers

The UI for 'Additional drivers' runs this command ubuntu-drivers autoinstall

This returns an error [to be reported].

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


The solution

What worked for me was a purging of the nvidia packages and a manual purge of the drivers and a manual driver install.

sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get install ubuntu-desktop
sudo apt-get --purge remove "*cublas*" "cuda*"
sudo apt-get --purge remove "*nvidia*"
sudo add-apt-repository --remove ppa:graphics-drivers/ppa
sudo rm /etc/X11/xorg.conf
sudo apt autoremove
sudo reboot

Then installed my recommended nvidia drivers after checking the official recommenedations here https://www.nvidia.com/Download/index.aspx

For my card the recommended driver is 515 so

sudo apt install nvidia-driver-515

Those instructions came from this other helpful post NVIDIA RTX 3080 GPU not working with Ubuntu 20.04, Kernel 5.8.0-50-generic

Score:0
us flag

I went ahead and installed the latest updates and since I had previously chosen the driver (shown below) for my NVidia 1660 everything worked out fine. No corruption.

nvidia driver

ChanganAuto avatar
us flag
A Geforce GTX 1660 can run with 515 as recommended by Nvidia themselves.
raddevus avatar
us flag
where is it reccommended? How would I know that? Also, I was running fine with 520 for many months until this. I'm just really not sure how I would know which one. Please provide link thanks
ChanganAuto avatar
us flag
Recommended at nvidia.com as always. Search for drivers, select your specific chipset from the dropdown menus and the OS then it'll show the currently recommended driver which, again, is 515, not 520.
ChanganAuto avatar
us flag
It goes without saying that the recommendation above is to **check** the recommended version, NOT to install from there. Always install as you did or by any other mean that relies on the official Ubuntu repositories.
raddevus avatar
us flag
Well, when I did the full clean install of Ubuntu 22.04.1 LTS it asked me if it should install drivers automatically and the Ubuntu installation chose the incorrect 520 driver and that is the start of woes for an end-user. But I also understand that Ubuntu is not a consumer product so I'm ok with that. But other users who don't have as much experience are going to experience pain.
ChanganAuto avatar
us flag
Most of the time it choose the best version but occasionally it chooses a newer than recommended.
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.