Ubuntu dual monitor intermittently not working

Ever since adding a second monitor to my PC, I’ve been intermittently experiencing two issues that I haven’t been able to fix.

Issue 1 — 2nd monitor is not recognized

Sometimes my second monitor will not be recognized and will just stay black. This can be triggered by restarting or suspending the computer. However, these sometimes do not trigger this issue. To mitigate the issue I usually need to turn the monitors on and off and sometimes even unplug them while the computer is off, before restarting the computer.

When the second screen is black, the second monitor does not show up under Display Settings, Nvidia settings, or with xrandr. I can’t 100% confirm this, but I suspect this issue occurs when the 2nd monitor has an opportunity to enter into Power Saving mode.

Importantly, this is very flaky. Most of the time it is fine, but every once and awhile this happens and I struggle to fix it.

Issue 2 — Resolution of 2nd monitor is ruined

Sometimes when running certain software the resolution of my 2nd monitor will be changed from the correct 1920x1080 to something much smaller. Moreover, Display Settings and xrandr no longer provide the 1920x1080 option. To fix this, I need to restart the computer and often have to physically disconnect and reconnect the monitors. Sometimes, I am able to open Nvidia X Server Settings and reset the resolution to 1920x1080 there.

The two things that most regularly trigger this issue are: Viewing a video locally or running the emulator in Android Studio. Importantly, these do not always trigger this issue — just occasionally.

System Setup

I’m running stock Ubuntu 20.04 dual boot with Windows 10 on my PC. I do use some Gnome and Grub themes if that is relevant. Windows does not encounter issue #2 but will occasionally run into issue #1.

GPU is a GTX 760. Both monitors are connected to the GPU ports.

The primary monitor is a BenQ. It is connected to the GPU through the following sequence: DVI-I (GPU Port) -> DVI-A to VGA Adapter -> VGA (Monitor Port)

The secondary monitor is an LG. It is connected to the GPU through the following sequence: DVI-D (GPU Port) -> DVI-D to HDMI cord -> HDMI to DVI-D adapter -> DVI-D (Monitor Port)

If I know my connectors right, then this means that the BenQ is running on an analog signal and the LG on a digital signal. Not sure if this is an issue.

Fixes I’ve Tried

  1. Using Noveau GPU drivers
  2. Using a variety of Nvida GPU driver versions
  3. Using LightDM instead of GDM
  4. Upgrading from Ubuntu 18.04 to 20.04, both have the same issues for me
  5. Turning modesetting on and off within Grub and Nvidia configuration files
  6. Giving root rights to Xwrapper config
  7. Multiple fresh installs.
  8. Making sure that secure boot is off in the BIOS
  9. Multiple other random fixes I found in Stack Overflow posts that lead nowhere

At whit’s end and have no clue how to solve these issues. Any help would be appreciated.

Sounds like a cable problem. If the ddc link gets lost, the driver switches to fail-safe mode. You’re dealing with high frequency data transport, not a door bell.

@generix thanks for the reply. I’m currently in the process of trying out different cables with my monitors and will report back whether or not I am still able to reproduce these issues after swapping the cables.

Could you possibly elaborate on what you think the issue with the cables is? I’m not too experienced in this area. Is it one or multiple of these possible issues?

  • Using digital for one monitor and analog for another
  • Using too many adapters and converters — try to stick to a single cable between monitor and gpu
  • A cable is just faulty and occasionally just doesn’t work, needs to be replaced
  • Something else you had in mind

I guess it’s most likely 3. Might also be 2, depending on cable length. If the combined cable is already very long, say >2m, adding additional adapters will break it.

I replaced the cables for both monitors and it seems to have done the trick. I suppose they (or at least one of them) must have been faulty. Thanks for the help.