Linux下查看显示器输出状态以及修改显示器工作模式(复制 or 扩展)

//关闭显示器VGA1
xrandr --output VGA1 --off

//开启显示器VGA1
xrandr --output VGA1 --auto

//关闭显示器LVDS1
xrandr --output LVDS1 --off

//开启显示器LVDS1
xrandr --output LVDS1 --auto

//打开VGA1,同时关闭LVDS1
xrandr --output VGA1 --auto --output LVDS1 --off

//关闭VGA1,同时打开LVDS1
xrandr --output VGA1 --off --output LVDS1 --auto

//扩展模式时,将LVDS1显示在VGA1的左侧
xrandr --output LVDS1 --left-of VGA1 --auto


//扩展模式时,将LVDS1显示在VGA1右侧.
xrandr --output LVDS1 --right-of VGA1 --auto

//从扩展模式变成复制模式.

xrandr --output LVDS1 --same-as VGA1 --auto

//设定主显示器.
xrandr --output HDMI1 --auto --primary

原文地址:https://www.cnblogs.com/AlwaysOnLines/p/5152178.html