2021-06-10

xrandr - 雙螢幕解析度切換

2021-06-10 
  • 雙螢幕 : 開機前先接好螢幕,才會自動抓到
  • 查詢硬體
    xrandr 
    DVI-I-0 disconnected (normal left inverted right x axis y axis)
    VGA-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
       1360x768      60.02 +
       1920x1080     59.93*
    DVI-I-1 disconnected (normal left inverted right x axis y axis)
    HDMI-0 disconnected (normal left inverted right x axis y axis)
    HDMI-1-1 disconnected (normal left inverted right x axis y axis)
    HDMI-1-2 disconnected (normal left inverted right x axis y axis)
    DP-1-1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
       1280x1024     60.02*+
       1024x768      60.00
    HDMI-1-3 disconnected (normal left inverted right x axis y axis)
      1280x1024 (0x282) 108.000MHz +HSync +VSync
            h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
            v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
      1024x768 (0x285) 65.000MHz -HSync -VSync
            h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
            v: height  768 start  771 end  777 total  806           clock  60.00Hz
  • 調解析度
    xrandr --output VGA-0 --mode 1920x1080 --output DP-1-1 --mode 1280x1024 
  • DP-1-1 在 VGA-0 左側
    xrandr --output DP-1-1 --left-of  VGA-0 
  • DP-1-1 在 VGA-0 右側
    xrandr --output DP-1-1 --right-of VGA-0 
  • 關 HDMI-1-1 , 開 VGA-0
    xrandr --output DP-1-1 --off
    xrandr --output DP-1-1 --off --output VGA-0 --mode 1920x1080
  • DP-1-1 關 | 開
    xrandr --output DP-1-1 --off
    xrandr --output DP-1-1 --auto  --output VGA-0 --mode 1920x1080
    xrandr --output DP-1-1 --right-of VGA-0
  • 硬體查詢 ( Hardware query )
    • sudo inxi -SMCGx
    • sudo lshw -c video
    • grep . /sys/class/drm/card0-*/{status,enabled,dpms}
    • /usr/bin/lspci -nn
    • ls /sys/class/drm
    • /usr/bin/lsusb
    • sudo /usr/sbin/dmidecode
    • sudo vim /var/log/kern.log

參考:

沒有留言: