No gui after KDE Neon Upgrade

I’ve been using KDE Neon for a few years now, it has the occasional glitch after a big upgrade but this one’s the worst yet.
I’ve just upgraded both my installations to the latest KDE Neon. After the upgrade, the gui did not work, I got the login screen, entered my credentials, the screen went black and then it reverted to the login screen. I had to go to the console using ctrl-alt-fn-f3, managed to log in. It seems to be a driver related problem which I fixed by purging the Nvidia drivers and reinstalling on one system but the other is not fixed. I’ve been trying to get it working for about 3 days now.
My latest try was to purge the nvidia packages using dpkg and install again but that didn’t work.
My gpu is NVIDIA Corporation GK208B [GeForce GT 710] (rev a1) (Asus GT710-SL-2GD5-BRK
here are the purge commands:

sudo ./ --uninstall
sudo dpkg --purge nvidia-dkms-470
sudo dpkg --purge libnvidia-cfg1-470
sudo dpkg --purge xserver-xorg-video-nvidia-470
sudo dpkg --purge nvideo-driver-470
sudo dpkg --purge nvidia-settings
sudo dpkg --purge nvidia-kernel-source-470
sudo dpkg --purge nvidia-kernel-common-470
sudo dpkg --purge libnvidia-ifr1-470
sudo dpkg --purge libnvidia-gl-470
sudo dpkg --purge libnvidia-common-470
sudo dpkg --purge libnvidia-encode-470
sudo dpkg --purge libnvidia-decode-470
sudo dpkg --purge nvidia-utils-470
sudo dpkg --purge libnvidia-compute-470
sudo dpkg --purge libnvidia-egl-wayland1
sudo dpkg --purge libnvidia-extra-470
sudo dpkg --purge libnvidia-fbc1-470
sudo dpkg --purge nvidia-compute-utils-470
sudo dpkg --purge nvidia-prime
dpkg -l |grep nvidia
sudo dpkg --purge screen-resolution-extra
sudo reboot now
sudo apt update
sudo pkcon refresh
sudo pkcon update
sudo pkcon install nvidia-driver-470
sudo modprobe nvidia

I have tried to follow the Ubuntu guidance (click here) but that hasn’t worked. Can anyone help?

Currently I get the login splash screen but it won’t log in unless I go to the console and log in.

P.S. I’ve just run the latest updates on the “working” installation and now one of my monitors is flashing rapidly (it wasn’t before). But at least I can switch one off and use a single monitor. The same monitor doesn’t flash if I unplug the other. They use the same graphics card, one in the DVI and one in the HDMI

Thank you

Please run as root and attach the resulting nvidia-bug-report.log.gz file to your post.

Thank you generix - here you go:
nvidia-bug-report.log.gz.tar.gz (42.1 KB)

out of interest, here is the bug report from my other KDE Neon installation on the same machine, on a different drive. The GUI for this installation sort of works, I have to boot with a single monitor and then connect the second one otherwise one of the screens flashes quickly.

nvidia-bug-report.log.gz (211.5 KB)

let me know if you need anything else,
I appreciate your help.

Possibly related post on KDE’s forums: Plasma 6 black screen nvidia gpu GT 630 - nouveau works ok - #3 by aronkvh - Help - KDE Discuss

likely it has a very similar root cause. All I get on my screen is the cursor arrow. I have to press ctrl-alt-fn-f3 to login on a terminal only. I did the purge and install of the ubuntu-drivers but that hasn’t worked.
I’m hoping someone will be able to help. Looking at the logs I uploaded and /var/log/nvidia-installer.log there is an error reported, but I don’t know how to fix it. I’ll have to try to find the readme it talks about.

ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your kernel.  
This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence Daemon), 
but this may also happen if your kernel was configured without support for module unloading.  
Please be sure to exit any programs that may be using the GPU(s) before attempting to upgrade your driver.  
If no GPU-based programs are running, you know that your kernel supports module unloading,
 and you still receive this message, then an error may have occurred that has corrupted an NVIDIA kernel 
module's usage count, for which the simplest remedy is to reboot your computer.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  
You may find suggestions on fixing installation problems in the README available on the 
Linux driver download page at

I’m assuming I’ve got the right one it says 2006-2013? NVIDIA Accelerated Linux Graphics Driver README and Installation Guide

[    6.659455] NVRM: API mismatch: the client has the version 525.147.05, but
               NVRM: this kernel module has the version 470.239.06.  Please
               NVRM: make sure that this kernel module and all NVIDIA driver
               NVRM: components have the same version.

You have a mix of driver versions, please try uninstalling everything again, make sure that library paths don’t contain any nvidia libs, then reinstall the 470 driver.

thank you very much generix. Much appreciated.
I guess all those purges I ran at the top of this thread didn’t get rid of the 525.147.05 … what is the best way to ensure that I have uninstalled both versions? This is the Ubuntu guidance that I found:

Uninstalling the NVIDIA drivers

Remove any NVIDIA packages from your system:

sudo apt --purge remove '*nvidia*${DRIVER_BRANCH}*'

Remove any additional packages that may have been installed as a dependency (e.g. the i386 libraries on amd64 systems) and which were not caught by the previous command:

sudo apt autoremove

Specifying the driver branch shouldn’t be necessary, afterwards you can run
dpkg -l |grep nvidia
to check all packages are removed. To check for leftover libraries, run
ls -l /usr/lib/*nvidia* /usr/lib/x86_64-linux-gnu/*nvidia*
you might then have to use the runfile installer to uninstall those.

I have these weird leftowers:
-rw-r–r-- 1 root root 1380032 Feb 14 2022 /usr/lib/
-rw-r–r-- 1 root root 1388736 Feb 14 2022 /usr/lib/
and (showed by dpkg -l)
rc linux-modules-nvidia-525-6.2.0-20-generic 6.2.0-20.20+2 amd64 Linux kernel nvidia modules for version 6.2.0-20
rc linux-modules-nvidia-525-6.2.0-32-generic 6.2.0-32.32 amd64 Linux kernel nvidia modules for version 6.2.0-32
rc linux-objects-nvidia-525-6.2.0-20-generic 6.2.0-20.20+2 amd64 Linux kernel nvidia modules for version 6.2.0-20 (objects)
rc linux-objects-nvidia-525-6.2.0-32-generic 6.2.0-32.32 amd64 Linux kernel nvidia modules for version 6.2.0-32 (objects)

while I’m using 545 version
should I remove those?

No, the files belong to nvidia-settings, this is not unusual it’s a different version.
The dpkg output states the packages as “rc” meaning recommended to install but not installed.
Everything seems to be correct, you should now be able to cleanly install the 470 driver.