I had a working system with Nvidia drivers installed until some recent driver nvidia-driver-440 messed up the system.
Unfortunately, the regular gdm stopped working and I had to install lightdm.
When I execute: nvidia-smi I get this:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
And for detecting the cards in the system, I ran this:
I tried installing CUDA Toolkit hoping it might help to detect my external monitor. Unfortunately, that didn’t help.
Secure-boot has been disabled in BIOS.
Also, I tried to troubleshoot by myself in getting the external monitor to work and in the process, I believe the KDE related packages also got uninstalled. I can switch to the default login session but it goes into infinite login loop with this message: Failed to start session Also in the process of fixing the display manager, I lost Nautilus as the default file manager. I had to install a new file manager called Nemo. Other KDE based software (Kalc) have been missing from my system too. I want to avoid a clean install again, since I have a lot of data on the drive and taking backup will be a time consuming task.
I have attached the bug report with .log extension. This forum didn’t allow me to upload the original generated and gunzipped logfile named: nvidia-bug-report.log.gz SO PLEASE RENAME BACK THE FILE WITH EXTENSION: .gz
Please let me know how I can use the external HDMInvidia-bug-report.log (100.3 KB) monitor and use Nautilus and KDE based software.
Looks like you booted into an older kernel which has no headers available to compile the module. Please hold down shift on boot and check if a newer kernel is available. Otherwise, please install the kernel headers
sudo apt update
sudo apt-get install linux-headers-$(uname -r)
[sudo] password for user2020:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package linux-headers-5.3.0-28-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'linux-headers-5.3.0-28-generic' has no installation candidate
That’s rather odd, Ubuntu still has it available: https://packages.ubuntu.com/bionic/devel/linux-headers-5.3.0-28-generic
Maybe your package list are broken, did you already try updating your system?
Did you check if a newer kernel is available in the grub menu (hold down shift on boot).
Please post the output of
sudo dpkg -l linux-kernel* linux-headers* |grep ii
You ran that command in the same directory where the .deb is, so it used that as input and errored out. Please re-run the command in an empty directory.
I created one directory literally named empty_dir and ran the command:
~/empty_dir$ sudo dpkg -l linux-kernel* linux-headers* |grep ii
ii linux-headers-4.15.0-76 4.15.0-76.86 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-76-generic 4.15.0-76.86 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-5.3.0-28-generic 5.3.0-28.30~18.04.1 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
ii linux-headers-5.5.0-050500 5.5.0-050500.202001262030 all Header files related to Linux kernel version 5.5.0
ii linux-headers-generic 4.15.0.76.78 amd64 Generic Linux kernel headers
Here is the new output for linux image and headers, please confirm:
~/empty_dir$ sudo dpkg -l linux-image* linux-headers* |grep ii
ii linux-headers-4.15.0-76 4.15.0-76.86 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-76-generic 4.15.0-76.86 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-5.3.0-28-generic 5.3.0-28.30~18.04.1 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
ii linux-headers-5.5.0-050500 5.5.0-050500.202001262030 all Header files related to Linux kernel version 5.5.0
ii linux-headers-generic 4.15.0.76.78 amd64 Generic Linux kernel headers
ii linux-image-4.15.0-76-generic 4.15.0-76.86 amd64 Signed kernel image generic
ii linux-image-5.0.0-37-generic 5.0.0-37.40~18.04.1 amd64 Signed kernel image generic
ii linux-image-5.3.0-28-generic 5.3.0-28.30~18.04.1 amd64 Signed kernel image generic
ii linux-image-generic 4.15.0.76.78 amd64 Generic Linux kernel image
Please run
sudo dkms install nvidia/440.64
to check if the module builds now, post
dkms status
output afterwards.
In general, something seems broken in your system, it didn’t receive any updates for a long time, Please run
sudo apt update
sudo apt upgrade
to check if manually updating works.
sudo dpkg --install linux-headers-5.3.0-28_5.3.0-28.30~18.04.1_all.deb
[sudo] password for user2020:
Selecting previously unselected package linux-headers-5.3.0-28.
(Reading database ... 239959 files and directories currently installed.)
Preparing to unpack linux-headers-5.3.0-28_5.3.0-28.30~18.04.1_all.deb ...
Unpacking linux-headers-5.3.0-28 (5.3.0-28.30~18.04.1) ...
Setting up linux-headers-5.3.0-28 (5.3.0-28.30~18.04.1) ...
The link that you suggested is dead. I cannot repeat the same link since I am a new user on the forum and new users are limited to post only 2 links in a post.
I did a sudo apt update; sudo apt upgrade and I need to restart the system or do something more. nvidia-smi still gives the same output:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
And to confirm, please note the output:
~/empty_dir$ sudo dpkg -l linux-image* linux-headers* |grep ii
ii linux-headers-4.15.0-76 4.15.0-76.86 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-76-generic 4.15.0-76.86 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-5.3.0-28 5.3.0-28.30~18.04.1 all Header files related to Linux kernel version 5.3.0
ii linux-headers-5.3.0-28-generic 5.3.0-28.30~18.04.1 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
ii linux-headers-5.5.0-050500 5.5.0-050500.202001262030 all Header files related to Linux kernel version 5.5.0
ii linux-headers-generic 4.15.0.76.78 amd64 Generic Linux kernel headers
ii linux-image-4.15.0-76-generic 4.15.0-76.86 amd64 Signed kernel image generic
ii linux-image-5.0.0-37-generic 5.0.0-37.40~18.04.1 amd64 Signed kernel image generic
ii linux-image-5.3.0-28-generic 5.3.0-28.30~18.04.1 amd64 Signed kernel image generic
ii linux-image-generic 4.15.0.76.78 amd64 Generic Linux kernel image
Yes, I could install the driver and nvidia-smi works! Thank you so much!
But for a moment it could detect the external monitor but then it just went blank.
I tried to uninstall and install gdm3, I got the login prompt on external monitor but when I entered the password and hit return it flickers and nothing happens. I can’t get in. I tried to google this issue and was trying to uncomment/comment this line in /etc/gdm3/custom.conf – 7 #WaylandEnable=false
I also uninstalled the gdm3 and after rebooting I believe it was lightdm based login. And I got the same error with infinite login loop: login session failed. So installed gdm3 and set it as default.
The output for HDMI detection and sudo dkms install nvidia/440.64
xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
XWAYLAND0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 380mm x 210mm
1920x1080 59.96*+
sudo dkms install nvidia/440.64
[sudo] password for user2020:
Kernel preparation unnecessary for this kernel. Skipping...
applying patch disable_fstack-clash-protection_fcf-protection.patch...patching file Kbuild
Hunk #1 succeeded at 79 (offset 8 lines).
applying patch buildfix_kernel_5.6.patch...patching file common/inc/nv-procfs.h
patching file common/inc/nv-time.h
patching file conftest.sh
Hunk #1 succeeded at 1267 (offset -3 lines).
Hunk #2 succeeded at 2936 (offset -3 lines).
patching file nvidia-modeset/nvidia-modeset.Kbuild
patching file nvidia-uvm/nvidia-uvm.Kbuild
patching file nvidia/linux_nvswitch.c
patching file nvidia/nv-procfs.c
patching file nvidia/nvidia.Kbuild
patching file nvidia/nvlink_linux.c
Building module:
cleaning build area...
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j12 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.3.0-28-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.3.0-28-generic/build LD=/usr/bin/ld.bfd modules........
cleaning build area...
DKMS: build completed.
nvidia.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.3.0-28-generic/updates/dkms/
nvidia-modeset.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.3.0-28-generic/updates/dkms/
nvidia-drm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.3.0-28-generic/updates/dkms/
nvidia-uvm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.3.0-28-generic/updates/dkms/
depmod...
DKMS: install completed.
The driver is correctly built and loaded, xorg configs look fine, yet it seems only Wayland starts. Please switch to lightdm and if it fails, create a new nvidia-bug-report.log with it.
I tried to switch to lightdm after installing it and rebooting. I could get the login screen which was different. After entering my password it gave this error: failed to start session and this was infinite.
I then proceeded with getting a terminal and setting gdm3 as the default and rebooted. I can login and get the DESKTOP-GUI. The latest bug-logs have been attached. Please let me know.
“failed to start session” with lighdm sounds like it tries to start unity, which doesn’t exist anymore. Taking your other update problems with the kernel and your old xorg into account, there’s somthing broken in your package system.
Please try upgrading to the latest hwe:
[sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04 ](http://sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04 )
and try doing a full update.