One of Dual external monitor not working

I have a ubuntu 18.04, install on legion y7000, with NVIDIA 1060m GPU,of course there is a intel integrated gpu card, but I don’t use it. I have three monitors, include two external monitor(through DP-port and hdmi-port respectively) and one internal monitor of LAPTOP. the one not working is VGA monitor through DP-port. internal monitor is also not working, but i don’t care much.
Recently, I upgrade my gpu driver from 430 to 525 Manually. By below commands.
First, I check my bios setting, where the secure boot is closed. And I banned the nouveau in the blacklists.

  • sudo update-initramfs -u
  • reboot,
  • ctrl+alt+f2 to console, login as root.
  • sudo service lightdm stop( I happen to know my display manager was gdm3, not lightdm after the problem was encountered, May be it was caused by that I did enter multi-user.target instead stoping gdm3 service first before I install the driver.)
  • sudo apt remove --purge nvidia*
  • sudo systemctl isolate multi-user.target
  • sudo ./NVIDIA-Linux-x86_64-525.105.17.run
  • reboot

before upgrade NVIDIA gpu driver, in ubuntu setting panel, I close the usage of internal monitor of Y7000, only use two external monitors.

after upgrading, my external monitory through DP-port not working, which is weird. I can see it in NVIDIA x server setting and in ubuntu system setting panel, use xrandr can also see this screen. but after I switch signal input from others to VGA in monitor manipulator panel, there is only black and no output. I can set join display or mirror display in ubuntu system setting panel, in any way there is no image output in that monitor.
I am currently use gnome\gdm3\xorg\xserver, the software stack is very complicated, that is all I know. I wonder it may not possible be the problem of the new driver version of NVIDIA gpu. support such two monitors would be common.
below is xrandr output

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  59.94    50.00    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)

below is my ubuntu system setting panel
ubuntu system setting panel

system infomation
uname -a

Linux lenovo 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Nouveau is banned throught this
cat /etc/modprobe.d/blacklist-nouveau.conf

blacklist nouveau
options nouveau modeset=0

below is xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 525.105.17

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 525.105.17

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "AOC 24P1W1"
    HorizSync       30.0 - 83.0
    VertRefresh     50.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "AOC 24P1W1"
    HorizSync       30.0 - 83.0
    VertRefresh     50.0 - 76.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1060"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1060"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"

# Removed Option "metamodes" "HDMI-0: nvidia-auto-select +0+0 {AllowGSYNC=Off}"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "metamodes" "HDMI-0: nvidia-auto-select +1920+0 {AllowGSYNC=Off}, DP-0: nvidia-auto-select +0+0; HDMI-0: nvidia-auto-select +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1920x1080_60_0 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1920x1080_50 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1920x1080_60i +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1920x1080_50i +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1680x1050 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1440x900 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1280x1024 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1280x1024_60 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1280x960 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1280x720 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1280x720_60_0 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1280x720_50 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1024x768 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1024x768_70 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 1024x768_60 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 800x600 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 800x600_72 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 800x600_60 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 800x600_56 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 720x576 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 720x480 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 640x480 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 640x480_72 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 640x480_60 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: 640x480_60_0 +1920+0, DP-0: nvidia-auto-select +0+0; HDMI-0: nvidia-auto-select +1920+0 {viewportin=1366x768, viewportout=1920x1079+0+0}, DP-0: nvidia-auto-select +0+0; HDMI-0: nvidia-auto-select +1920+0 {viewportin=1280x800, viewportout=1728x1080+96+0}, DP-0: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DP-0: nvidia-auto-select +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

All three monitors works fine in Windows 10, which means the hardware is fine. I have two OS installed.

It’s a hybrid graphics system, please delete /etc/X11/xorg.conf
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

Thank you generix, I will do the test now

nvidia-bug-report.log.gz (381.6 KB)

Here is more infos: I delete the /etc/X11/xorg.conf file, and I found my monitor of laptop comes back! For now, in my ubuntu system setting panel, I can see three monitors, but I can not switch between Join display or Mirror display or Single display, there is only join display to use. Now, three monitors there are, but the dp-to-vga one still is black, I can sense the windows opened are there, still can not see it. I have to close it in ubuntu system setting panel, otherwise I can not use my computer normally.

Please create a new nvidia-bug-report.log

Thank you for your kind help, here is the new bug report
nvidia-bug-report.log.gz (522.1 KB)

The dp2vga dongle seems to be incompatible, it’s detected fine but obviously doesn’t detect anything.
The monitor should also have a DP connector, why aren’t you using that?
Please check if setting kernel parameter
nvidia-drm.modeset=1
makes other modes than mirror available.

In old version NVIDIA GPU driver version, everything works fine. Due to running stable diffusion, I have to update the driver to the latest. So I guess it’s the latest driver version is not compatible with this dp2vga monitor? Thought might be some problem with GDM3 or xorg or gnome. During my usage, ubuntu can detect the dp2vga monitor, only not sending any image signal to it. I have other develop board to connect this dp port of dp2vga monitor. So there is only a vga port left. I will check the kernel parameter ASAP I go to office tommorow. Many thanks to you generix.

grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*

output is

/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb
/lib/modprobe.d/nvidia-kms.conf:# This file was generated by nvidia-prime
/lib/modprobe.d/nvidia-kms.conf:# options nvidia-drm modeset=1
cat /lib/modprobe.d/nvidia-kms.conf

output is

# This file was generated by nvidia-prime
# Set value to 0 to disable modesetting
# options nvidia-drm modeset=1
sudo cat /etc/default/grub

output is

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=2
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Much appreciates for your help~

Hi generix, are you still here

I have switch display manager from GDM3 to lightdm, still making no difference. I still can not see the login screen when I reboot the PC, it directly go to the desktop without any password inputs. Still the dp2vga monitor has no signal input while it can be detected by ubuntu system panel and xrandr. When I push WINDOWS+P, I can switch to mirror mode of monitors, but I can not switch back. Weird. After reboot, I am back on join display. Here is the new bug report. Would you mind do more research for me? Thanks a lot!
nvidia-bug-report.log.gz (378.4 KB)

I borrow a dp2hdmi adapter, And I can use dual monitors now, everything was all right! So I just think the new driver may not work compatible with dp2vga monitor! Only I can not set mirror display in ubuntu system setting panel, because there is no such options there. All I have is join display. Anyway, this is not a problem, because I barely use mirror mode display. If I have to use mirror display, I can push button “WINDOWS+P”, this is a shortcut for mirror display, actually it is a select method, only can not select other modes, everything is werid. Thanks the new gpu driver, I can test stable diffusion! It worths trying. Here is the new bug report.
nvidia-bug-report.log.gz (568.1 KB)
here is my setting panel