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

Hi, I mount an NVIDIA GeForce GTX 165 on my XPS 15 9500, dual booted with Ubuntu 18.04 and Windows 11. After updating nvidia-drivers to latest version (510), I startert experiencing screen problems, such as screen cannot lock or, after forcing screen locking with Super+L, if I enter Password on Log Screen it seems like I started a new session, with all running application closed.

$ uname -a
Linux andrea-XPS-15-9500 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22 09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ ubuntu-drivers devices
WARNING:root:_pkg_get_support nvidia-driver-510: package has invalid Support PBheader, cannot determine support level
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F95sv00001028sd0000097Dbc03sc02i00
vendor : NVIDIA Corporation
driver : nvidia-driver-470 - third-party non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-510 - third-party non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin

The graphic card seems not to be recognized by VGA:

$ lspci -v | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 9bc4 (rev 05) (prog-if 00 [VGA controller])

nvidia-smi
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
nvidia-bug-report.log.gz (161.2 KB)

I also report my nvidia-bug-report.log