Ubuntu – Ubuntu 17.10 – External monitor not detected when using Nvidia drivers

driversmultiple-monitorsnvidiaxorg

When using NVIDIA's video drivers, my laptop (Acer Nitro 5) doesn't detect my external monitor from an HDMI cable. I've tried removing and reinstalling using the latest drivers + different versions but nothing seems to work. However, when I switch to using the X.Org X server – Nouveau display driver, it can detect the external monitor and everything works just fine.

Obviously I'd like to use the drivers from Nvidia, and there's also some really weird bugs using the X.OrgXserver driver. For example when I close my laptop lid, it doesn't resume my session, so I have to manually power off my laptop.

Anyone know the problem and a possible solution? I've been combing the forums for a couple hours and nothing has worked. I've included the output of a couple commands using the X.OrgX server drivers and the Nvidia drivers. Thanks in advance.

lspci -v | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1) (prog-if 00 [VGA controller])

Using X.OrgX server drivers

xrandr --listmonitors
Monitors: 2
 0: +*eDP-1 1920/344x1080/194+1680+0  eDP-1
 1: +HDMI-1-1 1680/474x1050/296+0+0  HDMI-1-1

Using Nvidia drivers (version 396.24)

xrandr --listmonitors
Monitors: 1
 0: +*eDP-1 1920/344x1080/194+0+0  eDP-1

Edit did some more digging and lsmod | grep nvidia gives me empty output. However when I go to Software and Updates, it shows that I have selected the Nvidia driver binaries.

Edit2. Figured it out. So apparently if you boot in secure mode, it prevents the Nvidia driver modules from being loaded in. So you follow the instructions here Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? to disable secure boot, it works.

Best Answer

Figured it out. So apparently if you boot in secure mode, it prevents the Nvidia driver modules from being loaded in. So you follow the instructions here Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? to disable secure boot, it works.