Part of the screen is black when the external monitor is unplugged

When the external monitor is connected through HDMI, the resolution of both screens is set to 1920x1080, and is set to clone mode. When the HDMI cable is removed, the laptop cannot automatically recognize the single screen state, and the screen display is abnormal: when the mouse moves to the screen boundary, the desktop display area will move with the mouse, and the background of the additional desktop display area is black. I must reset the resolution through nvidia-settings to get back to normal.What can I do in order to solve this issue?

The basic information is as follows:
Graphics card:Quadro T1000
Linux kernel:4.18.18-300
Desktop Environment:mate
Xorg version:1.20

The way used to install Graphics card driver:
NVIDIA-Linux-*.run -s -N -z -Z -X --no-x-check --kernel-name=$KERNEL

Thank you for your help!

Don’t use nvidia-settings to set monitor config, you’re working against Mate’s built-in monitor-manager resulting in some mixed-mode panning. Only do monitor config using Mate’s monitor settings.

When I have installed NVIDIA driver, the mate-display-properties of Mate can’t modify the resolution any more, and xrandr can only detect one resolution (3840x2160). I’m not sure if NVIDIA driver has banned something.

This is a known shortcoming of the nvidia driver, on fixed resolution displays like notebook displays, scaled resolutions are only provided through randr 1.1 interface
xrandr --q1
shows them. Most DE’s monitor managers get confused by this so set this panning mode. No real fix.

Thank you very much for your help!