Ubuntu 16.04LTS extended display not working

I recently upgraded my system from Ubuntu 15.10 to 16.04LTS. But after the upgrade, my extended display is not being detected. I am connecting the second display through an HDMI port. I even tried System settings > Displays >detect display.

Does anyone know how to fix this?


Solution 1:

The issue was with the nvidia graphics driver. This can be fixed by following the steps below:

  1. Run

    sudo apt-get purge ^nvidia
    
  2. Run

    sudo add-apt-repository ppa:graphics-drivers/ppa
    
  3. Run

    sudo apt-get update
    
  4. Run

    sudo apt-get install nvidia-387
    

    For this, check what the latest version is... in my case as of January 2018 it's nvidia-387.

The graphics versions are here on Launchpad.

Reboot and your graphics issue should be fixed.