- Execute xrandr, view the output interface
output:
Screen 0: minimum 8 x 8, current 3360 x 1080, maximum 32767 x 32767
HDMI-0 connected 1440x900+1920+0 (normal left inverted right x axis y axis) 410mm x 256mm
1440x900 59.89*+ 74.98
1920x1080 59.94
1280x1024 76.00 75.02 70.00 60.02
1280x720 59.94
1152x864 75.00
1024x768 75.03 70.07 60.00
800x640 59.99
800x600 75.00 72.19 60.32 56.25
720x480 59.94 59.94
640x480 75.00 72.81 65.99 59.94
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.01*+ 40.00
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
Wherein the HDMI interface is HDMI-0 external display, eDP-1-1 is a laptop screen
2, to close the external (or laptop) screen
sudo xrandr --output HDMI-0(eDP-1-1) --off
The time has closed the screen
3, re-open the screen
xrandr --output HDMI-0 --right-of eDP-1-1 --auto
---- right-of the external screen is built-in screen to the right side of screen extension
-auto resolution is automatically set