After some investigation, I found this thread that had a solution. I downgraded my nvidia driver to 435 - and it solved the issue, I can now use HDMI screen, but my laptop screen now is black and unusable.
Ubuntu 20.04 does not recognize second monitor
I downgraded to nvidia-435 driver, and it worked fine. Something didn't >get thoroughly vetted/tested with the 440 drivers. Just downgrade for now >and see if that helps.
Does anyone know how can I connect my laptop screen again?
my xrandr:
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 268mm
1920x1080 60.00*+ 59.94 50.00
1680x1050 59.95
1440x900 59.89
1280x1024 75.02 60.02
1280x960 60.00
1280x720 60.00 59.94 50.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94 59.93 ```
When I run sudo prime-select intel
my laptop screen works and the HDMI doesn't, but when I run sudo prime-select nvidia
my laptop screen doesn't work and the hdmi does.
Any ideas why is this? And how to have both of them working at the same time?