3

I was using a built-in monitor of my laptop and two external displays connected to it installed with Ubuntu 20.04 LTS.
I had to reinstall OS for some reason. After re-installation, only two monitors are available and 3rd display is not detected.

Problem

  • I can use only one external display. The other is not detected.
    • second external display is not shown in Setting -> Displays of Ubuntu and nvidia-settings -> X Server Display Configuration -> Detect Displays.
  • When I first plug one external display, it works correctly. If I then plug the other external display, the first one disappears and the latter works.
  • I want to use a built-in display and two external displays at the same time, which worked well before re-installation.

Information

PC: Lenovo Thinkpad T490, Intel Core-i5
GPU: GeForce MX250
OS/kernel: Ubuntu 20.04 LTS / 5.8.0-50-generic

  • my laptop has two USB-C ports and one HDMI port. Monitor A is connected via HDMI-HDMI cable, and monitor B is connected via USB-USB cable. Both works well when connected alone.
  • output of xrandr -q when two external displays are connected:
Screen 0: minimum 8 x 8, current 2463 x 2160, maximum 32767 x 32767
eDP-1-1 connected primary 1920x1080+543+1080 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.05*+  60.01    59.97    59.96    59.93
   1680x1050     59.95    59.88
   1600x1024     60.17
   1400x1050     59.98
   1600x900      59.99    59.94    59.95    59.82
   1280x1024     60.02
   1440x900      59.89
   1400x900      59.96    59.88
   1280x960      60.00
   1440x810      60.00    59.97
   1368x768      59.88    59.85
   1360x768      59.80    59.96
   1280x800      59.99    59.97    59.81    59.91
   1152x864      60.00
   1280x720      60.00    59.99    59.86    59.74
   1024x768      60.04    60.00
   960x720       60.00
   928x696       60.05
   896x672       60.01
   1024x576      59.95    59.96    59.90    59.82
   960x600       59.93    60.00
   960x540       59.96    59.99    59.63    59.82
   800x600       60.00    60.32    56.25
   840x525       60.01    59.88
   864x486       59.92    59.57
   800x512       60.17
   700x525       59.98
   800x450       59.95    59.82
   640x512       60.02
   720x450       59.89
   700x450       59.96    59.88
   640x480       60.00    59.94
   720x405       59.51    58.99
   684x384       59.88    59.85
   680x384       59.80    59.96
   640x400       59.88    59.98
   576x432       60.06
   640x360       59.86    59.83    59.84    59.32
   512x384       60.00
   512x288       60.00    59.92
   480x270       59.63    59.82
   400x300       60.32    56.34
   432x243       59.92    59.57
   320x240       60.05
   360x202       59.51    59.13
   320x180       59.84    59.32
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 300mm x 260mm
   1920x1080     60.00 +  60.00*   50.00    59.94
   1400x1050     59.95
   1280x1024     60.02
   1440x900      59.90
   1280x960      60.00
   1280x720      60.00    59.94
   1440x576      50.00
   1024x768      60.00
   1440x480      60.00    59.94
   800x600       60.32
   720x576       50.00
   720x480       60.00    59.94
   640x480       72.81    60.00    59.94
  • output of xrandr --listproviders:
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1e0 cap: 0x6, Sink Output, Source Offload crtcs: 3 outputs: 5 associated providers: 1 name:modesetting
  • output of xrandr --listmonitors:
Monitors: 2
 0: +*eDP-1-1 1920/309x1080/174+543+1080  eDP-1-1
 1: +HDMI-1-2 1920/300x1080/260+0+0  HDMI-1-2
  • output of apt list --installed | grep -i nvidia:
libnvidia-cfg1-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-common-460/focal-updates,focal-updates,focal-security,focal-security,now 460.56-0ubuntu0.20.04.1 all [installed,automatic]
libnvidia-compute-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-compute-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 i386 [installed,automatic]
libnvidia-decode-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-decode-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 i386 [installed,automatic]
libnvidia-encode-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-encode-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 i386 [installed,automatic]
libnvidia-extra-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-fbc1-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-fbc1-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 i386 [installed,automatic]
libnvidia-gl-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-gl-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 i386 [installed,automatic]
libnvidia-ifr1-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
libnvidia-ifr1-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 i386 [installed,automatic]
nvidia-compute-utils-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
nvidia-dkms-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
nvidia-driver-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed]
nvidia-kernel-common-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
nvidia-kernel-source-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
nvidia-prime/focal-updates,focal-updates,now 0.8.16~0.20.04.1 all [installed,automatic]
nvidia-settings/focal-updates,now 460.39-0ubuntu0.20.04.1 amd64 [installed,automatic]
nvidia-utils-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]
xserver-xorg-video-nvidia-460/focal-updates,focal-security,now 460.56-0ubuntu0.20.04.1 amd64 [installed,automatic]

What I did

All of them didn't work:

  • install nvidia driver with apt. Below is the output of nvidia-smi.
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 460.56       Driver Version: 460.56       CUDA Version: 11.2     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                               |                      |               MIG M. |
    |===============================+======================+======================|
    |   0  GeForce MX250       Off  | 00000000:2D:00.0 Off |                  N/A |
    | N/A   55C    P0    N/A /  N/A |    487MiB /  2002MiB |      9%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
  • switch between lightdm and gdm3.
  • unplug and reconnect cables.
  • sudo ubuntu-drivers autoinstall, which had no updates or new install.
  • disable Secure Boot in BIOS/EFI setting.
  • solution of this thread.
  • select-prime nvidia.
  • edit /etc/gdm3/custom.conf(solution of this thread).

There are some related questions in StackExchange, but all of them didn't work for me. And I don't want to use nouveau because I experienced too many bad problems with it.
Thank you for your help in progress.

hogehoge
  • 31
  • 1
  • 3

1 Answers1

0

I solved this progblem myself, though not 100%-satisfying result.

What I did

  • reinstall Ubuntu 20.04.
    • choose minimal install.
    • don't choose 3rd party software.
      • choosing 3rd party software results in installation of nvidia drivers in apt repositories, which crashed the installation process in my case.
  • black list nouveau drivers immediately via /etc/modprobe.d/blacklist-nvidia-nouveau.
  • install nvidia drivers directly from nvidia homepage.
    • ignore those in apt repository.
    • ignore ubuntu-drivers autoinstall or ubuntu-drivers devices.
    • install the latest version. In my case it is v465.24.02 released in Apr 2021.
  • go to BIOS/EFI settings.
    • disable Secure Boot.
    • change video memory size(I don't remember the exact name) into 512MB from 256MB.

At this point, my Ubuntu about page says I'm using NVIDIA Corporation GP108M [GeForce MX250] / Mesa IntelĀ® UHD Gr....

  • use USB hub which is connected to a laptop via USB-C and has 2 HDMI slot.
  • connect two external displays via HDMI cable with the hub.

At this point, 1 of 2 external displays works well. And 2 of 2 are recognized in xrandr -q, though the display is completely black.

  • type xrandr -q and check the name of blank screen.
  • xrandr --output DP-2-1 --mode 1024x768 --left-of eDP-1 where DP-2-1 is blank screen and eDP-1 is the primary screen.

75% satisfying result

  • 2 of 2 external displays work.
  • 1 of 2 external display black-outs every 30~60 seconds.
  • connecting external displays with my laptop fails at 60% probability.

Though this is not completely perfect result, I'm satisfied for now.
I don't know which operations had a good effect, I'll investigate further if I'm willing.
Thanks.

hogehoge
  • 31
  • 1
  • 3