0

enter image description here

Background

While using Ubuntu 22.04.3, I switched from the proprietary nvidia driver to nouveau in an attempt to get my second monitor working again. Upon reboot, the display was not detected.

So I reinstalled Ubuntu using a USB installer. However, now I am stuck at the screen above on a fresh install. The colored pixels appear after a few seconds.

Graphics Card

$ ubuntu-drivers devices

vendor : NVIDIA Corporation model : GF119 [NVS 315] driver : nvidia-driver-390 - distro non-free recommended driver : xserver-xorg-video-nouveau - distro free builtin


Driver Installation

Via apt and ubuntu-drivers

Boot into recovery mode by holding shift. Enable networking while plugged into ethernet so that new drivers can be installed. Enter root to tinker with drivers.

$ sudo apt-get purge nouveau*
$ sudo apt-get purge nvidia*
$ sudo apt-get purge libnvidia*

$ sudo apt-get update $ sudo ubuntu-drivers autoinstall

Errors were encountered while processing: nvidia-dkms-390 nvidia-driver-390 E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo apt-get install nvidia-dkms-390

see logs at /var/crash/nvidia-kernel-source-390.0.crash E: Sub-process /usr/bin/dpkg returned an error code (1)

Here is a gist of that .crash file. I see a lot of type errors and warnings, so maybe the driver itself is bugged? https://gist.github.com/aiqc/96a906344d789ad5c8834ecf5b602b58

Via Settings UI

If I try to update the nvidia driver through the settings UI, I get similar errors.

enter image description here

Via Nvidia's .run files

Similar errors https://www.nvidia.com/download/driverResults.aspx/101818/en-us/

Via ppa

I have tried installing the ppa drivers, and even downgraded my OS to match the specific version mention on the ppa page (22.04.2) https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update

$ sudo apt install nvidia-graphics-drivers-390 E: Unable to locate package nvidia-graphics-drivers-390

$ sudo apt install nvidia-driver-390 Errors were encountered while processing: nvidia-dkms-390 nvidia-driver-390 E: Sub-process /usr/bin/dpkg returned an error code (1)


Workaround

If I resume boot in recovery mode after deleting the drivers... it runs the OS with graphics:

llvmpipe (LLVM 15.0.7, 256 bits)

Kermit
  • 119
  • 2
    I see a gcc-12 mentioned in your build log -- you need to use the same gcc version (gcc-11) the rest of the system uses to build modules. – ubfan1 Jan 13 '24 at 16:59
  • @ubfan1 thanks for the suggestion. following the directions at this link, i just tried after ensuring gcc11 was enabled on 22.04.1 but am receiving the same error about the nvidia-dkms-390 and nvidia-driver-390 packages https://askubuntu.com/a/1331764/849369 – Kermit Jan 13 '24 at 17:21
  • Did you truncate your output when installing the packages directly? "Errors were encountered" does not provide debugging data, we need all the apt output. You also don't need the graphics driver PPA, nvidia-driver-390 is still in the 22.04 repos, but we need all the output from apt during installation to try and assist you. – Thomas Ward Jan 16 '24 at 19:24
  • 2
    See https://ubuntuforums.org/showthread.php?t=2494273 Looks like the 6.5 kernel uses gcc-12, but the Nvidia 390 needs gcc-11. Can you drop back to a 6.2 kernel? – ubfan1 Jan 16 '24 at 19:34
  • @ThomasWard did you happen to see the gist I provided? the output was outrageously long – Kermit Jan 17 '24 at 00:41
  • @ubfan1 thank you for the suggestion and evidence. I spent too much time on it, so I am currently waiting for a refurbished AMD alternative to arrive – Kermit Jan 17 '24 at 00:44
  • Update: the AMD drivers were so well supported that multiple monitors were functional as soon as the USB installer boot screen reached its boot screen – Kermit Jan 19 '24 at 14:33

1 Answers1

2

To fix this issue, you need to downgrade your kernel version from 6.5 to 6.2.0-26-generic. Once done, repeat the driver installation steps, and you should be able to install the nvidia-driver-390.

fallback kernel version to 6.2.0-26-generic:

fallback kernel version to 6.2.0-26-generic

karel
  • 114,770