nvidia – Cannot connect second monitor via HDMI cable in Ubuntu 20.04


I just installed ubuntu 20.04 on my laptop. However, when I tried to connect my external monitor via HDMI cable the monitor is not detecting any signal.
I am using nvidia-driver-435. My GPU is “NVIDIA Corporation TU106GLM (Quadro RTX 3000 Mobile / Max-Q)”. I am using a HP G6-15 laptop. xrandr is not detecting the display

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920×1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920×1080 60.03*+ 60.01 59.97 59.96 59.93 40.02
1680×1050 60.00 59.95 59.88
1600×1024 60.17
1400×1050 59.98 60.00
1600×900 59.99 59.94 59.95 59.82
1280×1024 59.95 60.02
1440×900 59.89
1400×900 59.96 59.88
1280×960 60.00 59.99
1440×810 60.00 59.97
1368×768 59.88 59.85
1360×768 59.80 59.96
1280×800 59.99 59.97 59.81 59.91
1152×864 59.97 60.00
1280×720 60.00 59.99 59.86 59.74
1024×768 60.04 60.00 59.95
960×720 60.00
928×696 60.05
896×672 60.01
1024×576 59.95 59.96 59.90 59.82
960×600 59.93 60.00
960×540 59.96 59.99 59.63 59.82
800×600 60.00 60.32 59.96 56.25
840×525 60.01 59.88
864×486 59.92 59.57
800×512 60.17
700×525 59.98
800×450 59.95 59.82
640×512 60.02
720×450 59.89
700×450 59.96 59.88
640×480 60.00 59.94 59.94
720×405 59.51 58.99
720×400 59.97
684×384 59.88 59.85
680×384 59.80 59.96
640×400 59.88 59.98 59.96
576×432 60.06
640×360 59.86 59.83 59.84 59.32
640×350 59.84
512×384 60.00
512×288 60.00 59.92
480×270 59.63 59.82
400×300 60.32 56.34
432×243 59.92 59.57
320×240 60.05
360×202 59.51 59.13
320×180 59.84 59.32
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)

I was earlier using ubuntu 18.04 on the same computer and the second monitor was working. I freshly installed 20.04 after erasing the previous version after deleting everything. I switched to lightdm switched back to gdm3 but nothing worked so far.In some answers I have found to edit

sudo nano /lib/modprobe.d/nvidia-kms.conf
and comment the options nvidia-drm modeset=1.
But it is not present on my computer. I can onlye find the nvidia-graphics-drivers.conf file on /lib/modprobe.d

I don’t know what is wrong. Please let me know if you need more information.