I posted this question a few days ago.
I tried to reinstall the driver by downloading it from official NVIDIA website and also reinstalling it from Additional Driver app or ubuntu-driver autoinstall command but none of them solved the problem. I can install them without any error but after reboot I face some problems (whem PRIME profile is on-demand). Now nvidia-smi doesn't work:
┌──(rootubuntu)-[~]
└─$ 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-persistenced.service has beed failed to start and I get this message:
Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 127 has read and write permissions for those files.
And there is no nvidia in /dev/:
┌──(rootubuntu)-[~]
└─# ls /dev
acpi_thermal_rel cuse hidraw0 i2c-6 loop12 loop9 nvme0 pts snd tty11 tty21 tty31 tty41 tty51 tty61 ttyS12 ttyS22 ttyS4 v4l vcsa3 vfio
autofs disk hidraw1 i2c-7 loop13 loop-control nvme0n1 random spidev0.0 tty12 tty22 tty32 tty42 tty52 tty62 ttyS13 ttyS23 ttyS5 vcs vcsa4 vga_arbiter
block dma_heap hpet initctl loop14 mapper nvme0n1p1 rfkill stderr tty13 tty23 tty33 tty43 tty53 tty63 ttyS14 ttyS24 ttyS6 vcs1 vcsa5 vhci
bsg dri hugepages input loop15 mcelog nvme0n1p2 rtc stdin tty14 tty24 tty34 tty44 tty54 tty7 ttyS15 ttyS25 ttyS7 vcs2 vcsa6 vhost-net
btrfs-control drm_dp_aux0 hwrng kmsg loop2 media0 nvme0n1p4 rtc0 stdout tty15 tty25 tty35 tty45 tty55 tty8 ttyS16 ttyS26 ttyS8 vcs3 vcsu vhost-vsock
bus ecryptfs i2c-0 kvm loop3 mei0 nvme0n1p5 sda tpm0 tty16 tty26 tty36 tty46 tty56 tty9 ttyS17 ttyS27 ttyS9 vcs4 vcsu1 video0
char fb0 i2c-1 log loop4 mem nvram sda1 tpmrm0 tty17 tty27 tty37 tty47 tty57 ttyprintk ttyS18 ttyS28 udmabuf vcs5 vcsu2 video1
console fd i2c-2 loop0 loop5 mqueue port sda3 tty tty18 tty28 tty38 tty48 tty58 ttyS0 ttyS19 ttyS29 uhid vcs6 vcsu3 zero
core full i2c-3 loop1 loop6 net ppp sg0 tty0 tty19 tty29 tty39 tty49 tty59 ttyS1 ttyS2 ttyS3 uinput vcsa vcsu4 zfs
cpu fuse i2c-4 loop10 loop7 ng0n1 psaux shm tty1 tty2 tty3 tty4 tty5 tty6 ttyS10 ttyS20 ttyS30 urandom vcsa1 vcsu5
cpu_dma_latency gpiochip0 i2c-5 loop11 loop8 null ptmx snapshot tty10 tty20 tty30 tty40 tty50 tty60 ttyS11 ttyS21 ttyS31 userio vcsa2 vcsu6
please help if you can.