Ubuntu - 20.04(Focal fossa) - Nvidia 1660Ti - cannot connect to primary monitor using hdmi port

Hi All,
I am using HP omen 15 laptop with nvidi 1660Ti .
Ubuntu version - 20.04
I installed nvidia-455 drivers.
Tried lot of solutions from this forum but still i cannot connect my laptop to my primary monitor.
Any suggestions.

I found the workaround.

Check your kernel version.
ubuntu kernel 5.4 to 5.6 are having issues.

I upgraded to kernel 5.7.

So my current config,
Ubuntu 20.04
kernel 5.7
Nvidia 1660 Ti
ryzen 7 4800H

After upgrading to kernel 5.7

Start by purging any previous installations of the NVidia driver, in the terminal:

sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get install ubuntu-desktop
sudo rm /etc/X11/xorg.conf (if present)

Reboot the system. Now, reinstall the NVidia drivers

sudo apt-get install nvidia-driver-440 (works only with this driver version)

Edit the X11 configuration files for for amdgpu and nvidia drivers. These are located in /usr/share/X11/sorg.conf.d/ . First, change the conf file for amdgpu:

sudo nano /usr/share/X11/xorg.conf.d/10-amdgpu.conf

Change the file contents so it looks like:

Section "OutputClass"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "amdgpu"
    Option "PrimaryGPU" "no"
EndSection

Now, change the conf file for NVidia:

sudo nano /usr/share/X11/xorg.conf.d/10-nvidia.conf

Edit the file with the following entries

Section "OutputClass"
   Identifier "nvidia"
   MatchDriver "nvidia-drm"
   Driver "nvidia"
   Option "AllowEmptyInitialConfiguration"
   Option "PrimaryGPU" "yes"
   ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

Refer to this link for more info
https://askubuntu.com/questions/1244376/cant-get-internal-and-external-monitor-working-simultaneously-with-20-04-on-lap

1 Like

Hi @gskrishna111, thank you for sharing what worked for you.

Did you update your kernel to a mainline version (not fully supported by Ubuntu)? Does it cause system and compatibility problems?

Yes,
ubuntu kernel versions 5.4 and 5.6 are having issues.
Upgrade your kernel version to 5.7 and follow the above steps.