Hi, I faced the same issue today. HDMI output crashed so my external monitor was not recognized.
I solved the issue by re-installing the NVidia driver to a lower version. My machine was installing nvidia-driver-545 by default, but the installation failed each time.
I installed the version 535, and got my external monitor working.
Step 1: Clean Up Previous NVIDIA Installations
Ensure a clean environment by removing existing NVIDIA drivers and DKMS files:
sudo apt-get purge ‘^nvidia-.*’ sudo apt-get autoremove sudo apt-get autoclean sudo rm /var/crash/nvidia-dkms-545.0.crash
Step 2: Reinstall Necessary Dependencies
sudo apt-get install build-essential dkms linux-headers-$(uname -r) sudo apt-get install libc6-dev libglvnd-dev pkg-config
Step 3: Add the Graphics Drivers PPA and Update
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update
Step 4: Install the NVIDIA Driver
Install the NVIDIA driver using the package manager:
sudo apt-get install nvidia-driver-535
Step 5: Update Initramfs and Reboot
Update initramfs and reboot your system to apply the changes:
sudo update-initramfs -u sudo reboot
Step 6: Verify Secure Boot Status
Ensure that Secure Boot is disabled in your BIOS/UEFI settings, as it can prevent third-party drivers from loading. Reboot your system, enter the BIOS/UEFI setup, and disable Secure Boot if it is enabled.