I am using Ubuntu 20.04. After installing the NVIDIA drivers, when my laptop is idle for sometime, it shows a black screen with an error message at random times, and the fan is running at high speed. Also the laptop gets heated up.
Nvidia Graphics card Geforce MX130. Nvidia driver 470 was installed from additional driver section in ubuntu software updates. Cuda 11 was also installed.
OS kernel version : 5.11.0-38-generic
I am not sure what's causing this. On pressing power button, the operating system gets shut down and works as normal. This same thing can happen at any time if laptop is kept idle for sometime. Here is a photo of the issue:

sudo lspci -tv gave the following results
-[0000:00]-+-00.0 Intel Corporation Coffee Lake HOST and DRAM Controller
+-02.0 Intel Corporation UHD Graphics 620 (Whiskey Lake)
+-04.0 Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem
+-08.0 Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
+-12.0 Intel Corporation Cannon Point-LP Thermal Controller
+-14.0 Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller
+-14.2 Intel Corporation Cannon Point-LP Shared SRAM
+-15.0 Intel Corporation Cannon Point-LP Serial IO I2C Controller #0
+-15.1 Intel Corporation Cannon Point-LP Serial IO I2C Controller #1
+-16.0 Intel Corporation Cannon Point-LP MEI Controller #1
+-17.0 Intel Corporation Cannon Point-LP SATA Controller [AHCI Mode]
+-1a.0 Intel Corporation Device 9dc4
+-1c.0-[01]--
+-1c.4-[02]----00.0 NVIDIA Corporation GM108M [GeForce MX130]
+-1d.0-[03]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
+-1d.1-[04]----00.0 Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
+-1d.4-[05]----00.0 KIOXIA Corporation Device 0001
+-1f.0 Intel Corporation Cannon Point-LP LPC Controller
+-1f.3 Intel Corporation Cannon Point-LP High Definition Audio Controller
+-1f.4 Intel Corporation Cannon Point-LP SMBus Controller
\-1f.5 Intel Corporation Cannon Point-LP SPI Controller

FYI : Due to severity of the problem, i was forced to reinstall the OS. Now nvidia drivers are not installed. and the above said issue is not there. Wacom graphic tablet has also an issue before. The pointer got hang randomly at times when using. After reinstallation of OS its also working fine. But the problem is I am now using onboard graphics. I can use nvidia driver only after this issue is solved.
Laptop Model Info (Dell Latitude 3400)
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.1 present.
Handle 0x0200, DMI type 2, 17 bytes
Base Board Information
Manufacturer: Dell Inc.
Product Name: 0KVN26
Version: A06
Serial Number: xxxxxxxxxxxxxxxxxxx
Asset Tag: Not Specified
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Not Specified
Chassis Handle: 0x0000
Type: Motherboard
Contained Object Handles: 0