Ubuntu doesn't detect my second HDMI display

Looks fine.
According to the logs, you have 6 connectors
Mainboard: vga+hdmi+dp
Nvidia board: 2xdvi+hdmi
Only the vga port shows connected. Where did you connect the second monitor?

I have one monitor connected on the integrated graphics from my mobo (VGA), and another one on my graphics card (the monitor has an VGA connector but I have an adaptor to connect it to DVI-D)

Ok, that explains it. Please edit
/usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
commenting out the line
Option “IgnoreDisplayDevices” “CRT”

Did it and rebooted, the monitor wasn’t fixed and the line was missing de “#” for the comment again

Feared so. Please try this:
create /etc/x11/xorg.conf.d/99-nvidia-ignore.conf

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option “IgnoreDisplayDevices” “TV”
EndSection

maybe this will overwrite the setting. Otherwise, you’ll have to disable gpu-manager.

Maybe try to create the file in
/usr/share/X11/xorg.conf.d/

did it and rebooted, boot stuck on a terminal screen with lots of [ OK ] some action and the last of them is
[ OK ] Reached target Sound Card.d Card State… le locally. system changes.pp link was shut down…

Ok, it’s fixed now, after the boot stuck I rebooted on recovery mode and deleted the

/usr/share/X11/xorg.conf.d/99-nvidia-ignore.conf

rebooted normally and disabled gpu-manager following these steps
and did the following again:

Ok, that explains it. Please edit
/usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
commenting out the line
Option “IgnoreDisplayDevices” “CRT”

after reboot both monitors are working fine, thank you so much for the help, I appreciate it a lot!

I also have the same problem. 1 hour ago every thing was fine. I just rebooted my computer and my 2nd monitor is now just black.
I m on dual boot with Windows, and on Windows every thing works fine.
Please help

Please run
sudo prime-select nvidia
and reboot.
If that doesn’t help, please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

nvidia-bug-report.log (311.5 KB) When running sudo prime-select nvidia, it says Info: the nvidia profile is already set.
After rebooting, nothing changes, my 2nd monitor is still black.
I’m sorry I couldn’t upload my nvidia-bug-report.log.gz. When I try, it says “Sorry, there was an error uploading that file. Please try again.”
So I unziped it and managed to upload the nvidia-bug-report.log.
I hope it will do fine. Thank you for your time.

seems the driver got lost after a kernel update, please reinstall it:

sudo apt install --reinstall nvidia-driver-460

if that doesn’t help, please post the output of
dkms status

When running sudo apt install --reinstall nvidia-driver-460, it says
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libgstreamer-plugins-bad1.0-0 libva-wayland2 python3-attr python3-cached-property python3-docker python3-dockerpty python3-docopt
python3-importlib-metadata python3-jsonschema python3-more-itertools python3-pyrsistent python3-texttable python3-websocket python3-zipp
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 431 kB of archives.
After this operation, 0 B of additional disk space will be used.
Ign:1 fr.archive.ubuntu.com / ubuntu.lafibre.info focal-updates/restricted amd64 nvidia-driver-460 amd64 460.39-0ubuntu0.20.04.1
Err:1 Index of /ubuntu focal-updates/restricted amd64 nvidia-driver-460 amd64 460.39-0ubuntu0.20.04.1
404 Not Found [IP: 2001:860:f70a::2 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/restricted/n/nvidia-graphics-drivers-460/nvidia-driver-460_460.39-0ubuntu0.20.04.1_amd64.deb 404 Not Found [IP: 2001:860:f70a::2 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

When running dkms status, I get nothing, just no output.

Your local repo is out of sync, please run
sudo apt update
then try installing the driver again.

Hi, I have the same issue: on Ubuntu 20.04 even if the monitor is detected (under settings I see it), but the external monitor is still black. With Windows it works.
nvidia-bug-report.log.gz (555.0 KB)

You have a AMD/Nvidia hybrid combo with the nvidia gpu in offload mode. External monitors in that case is a WIP (don’t know its current state, though) and currently doesn’t work. With AMD/Nvidia, you’ll have to switch to ‘performance mode’ aka prime output to make use of monitors connected to the nvidia gpu.

Thank you.
Should I do it in BIOS mode or where can I change this settings?

Either in the nvidia-settings gui or run
sudo prime-select nvidia
and reboot.

sudo prime-select nvidia has helped! Thank you!!!

Hi, same problem here, I connected a second monitor to my Ubuntu 20.04 via HDMI-USB-C cable, started to work properly, and after a reboot never detected it again.

I tried:

sudo prime-select nvidia
[sudo] password for myuser:
Info: the nvidia profile is already set

but still the same problem.

Attaching logs:

nvidia-bug-report.log.gz (413.6 KB)