All resolution options except 1024x768 gone after upgrade to Ubuntu 20.04.2 LTS

I got prompted an update (20.04.2 LTS from 20.04.1 LTS) this morning, installed it and rebooted. Now, the only resolution available on my 4K monitor is 1024x768. I have a nvidia 3090 card, run the monitor via DisplayPort.

Running xrandr shows me the following:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1024 x 768, current 1024 x 768, maximum 1024 x 768
default connected primary 1024x768+0+0 0mm x 0mm
   1024x768      76.00* 

My current (activated) driver is nvidia-driver-460 (proprietary, tested). I tried switching to the nouveau driver without luck, so reverted back. I also tried adding a new resolution using xrandr without luck.

I also noticed that running the command nvidia-smi no longer works:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Any advice or suggestions?

EDIT: Another Base update in "Software Updater" was available today, 24h later, that come with some nvidia updates. After a restart, this solved the issue and I'm able to change the resolution back to 4k.

Showing today's update in /var/log/apt/history.log:

Start-Date: 2021-03-17  11:16:25
Commandline: aptdaemon role='role-commit-packages' sender=':1.171'
Upgrade: linux-modules-nvidia-460-5.8.0-45-generic:amd64 (5.8.0-45.51~20.04.1, 5.8.0-45.51~20.04.1+1)
End-Date: 2021-03-17  11:16:37

Solution 1:

You probably got bit by the same kernel upgrade I was bit by this morning.

Check /var/log/apt/history.log and you'll probably see something of the form

Commandline: apt -y full-upgrade
Requested-By: spl (1000)
Install: linux-image-5.8.0-45-generic:amd64 (5.8.0-45.51, automatic), linux-headers-5.8.0-45:amd64 (5.8.0-45.51, automatic), linux-modules-extra-5.8.0-45-generic:amd64 (5.8.0-45.51, automatic), linux-headers-5.8.0-45-generic:amd64 (5.8.0-45.51, automatic), linux-modules-5.8.0-45-generic:amd64 (5.8.0-45.51, automatic), linux-modules-nvidia-460-5.8.0-45-generic:amd64 (5.8.0-45.51, automatic)
Upgrade: linux-headers-generic:amd64 (5.8.0.44.49, 5.8.0.45.50), linux-libc-dev:amd64 (5.8.0-44.50, 5.8.0-45.51), linux-modules-nvidia-460-generic-hwe-20.04-edge:amd64 (5.8.0-44.50, 5.8.0-45.51), linux-image-generic:amd64 (5.8.0.44.49, 5.8.0.45.50), libglib2.0-dev-bin:amd64 (2.66.1-2ubuntu0.1, 2.66.1-2ubuntu0.2), libglib2.0-bin:amd64 (2.66.1-2ubuntu0.1, 2.66.1-2ubuntu0.2), libglib2.0-dev:amd64 (2.66.1-2ubuntu0.1, 2.66.1-2ubuntu0.2), libglib2.0-doc:amd64 (2.66.1-2ubuntu0.1, 2.66.1-2ubuntu0.2), libglib2.0-data:amd64 (2.66.1-2ubuntu0.1, 2.66.1-2ubuntu0.2), linux-generic:amd64 (5.8.0.44.49, 5.8.0.45.50), libglib2.0-0:amd64 (2.66.1-2ubuntu0.1, 2.66.1-2ubuntu0.2), libglib2.0-0:i386 (2.66.1-2ubuntu0.1, 2.66.1-2ubuntu0.2)
End-Date: 2021-03-16  05:52:21

I backed those changes out as follows:

/usr/bin/sudo apt remove linux-headers-5.8.0-45:amd64
/usr/bin/sudo apt remove linux-modules-extra-5.8.0-45-generic:amd64
/usr/bin/sudo apt remove linux-headers-5.8.0-45-generic:amd64
/usr/bin/sudo apt remove linux-modules-5.8.0-45-generic:amd64
/usr/bin/sudo apt remove linux-modules-nvidia-460-5.8.0-45-generic:amd64

/usr/bin/sudo apt install linux-image-5.8.0-43-generic:amd64
/usr/bin/sudo apt install linux-modules-extra-5.8.0-43-generic:amd64
/usr/bin/sudo apt install linux-headers-5.8.0-43:amd64
/usr/bin/sudo apt install linux-headers-5.8.0-43-generic:amd64
/usr/bin/sudo apt install linux-modules-5.8.0-43-generic:amd64
/usr/bin/sudo apt install linux-modules-nvidia-460-5.8.0-43-generic:amd64

which reverted me to the previous kernel. I then sacrificed a goat, took a great big slug of coffee, crossed my fingers and rebooted.

All returned to whatever passes for normal.

Your mileage may vary.

Note: You'll get some scary warnings about deleting a running kernel. Hence the sacrificial goat.