xrandr -q //若ouput port(VGA , HDMI, TMDS)有接extnal screen 裝置的話會顯示其狀態
Intel driver
* VGA - Analog VGA output
* LVDS - Laptop panel
* TV - Integrated TV output
* TMDS-1 - First DVI SDVO output
* TMDS-2 - Second DVI SDVO output
xrandr -q --verbose //列出比較詳細的值
gtf 1024 768 60 // 可以求得在解析度1024x768@60 MHz 下的Modeline(畫面更新頻率)的值
xrandr --output VGA --mode 1024x768 --crtc 0 --output LVDS --off //關Laptop panel僅在使用VGA投射到外部裝置,crtcs的解釋如下,Intel driver使用the external screen as the primary output (crtcs =0)
To use RandR 1.2, you might need to know three key concepts: (Virtual) Screen, Crtc and Output. A display is in one (Virtual) screen which may consist of more than one Crtc. Every crtc will occupy one rectangle region in the (Virtual) screen and may have different modes. A crtc can connect to more than one output and decide the output's property. Output is a port to monitor.
Intel GFX device supports two pipes which is corresponding to crtc. So there can be two crtc with Intel GFX device.
Most hardware only have 2 CRTCs, which means they only have 2 rendering pipeline and thus may only display on 2 outputs at the same time.
以下是一個切換投影設備的script例子:
#!/bin/sh
export DISPLAY=:0.0
case $1 in
1) #LCD only
echo 1
/bin/su user -c "/usr/bin/xrandr --output LVDS --mode 1024x600 --output VGA --off --output HDMI-1 --off"
;;
2) #CRT only
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --output LVDS --off --output HDMI-1 --off"
;;
3) #LCD+CRT
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --output LVDS --mode 800x600 --output HDMI-1 --off"
;;
4) #HDMI only
/bin/su user -c "/usr/bin/xrandr --output HDMI-1 --mode 800x600 --output LVDS --off --output VGA --off"
;;
5) #LCD+HDMI
/bin/su user -c "/usr/bin/xrandr --output LVDS --mode 800x600 --output HDMI-1 --mode 800x600 --output VGA --off"
;;
6) #CRT+HDMI
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --output LVDS --off --output HDMI-1 --off"
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --crtc 1 --output HDMI-1 --mode 800x600 --crtc 0 --output LVDS --off"
esac
參考:
http://usagiblog.wordpress.com/2006/07/11/xrandr-%E4%BB%8B%E7%B4%B9/
http://209.85.175.104/search?q=cache:litkiG3XeYQJ:funp.com/push/%3Ftag%3Dxrandr%26hot%26stars%3D1+xrandr%E9%9B%99%E8%9E%A2%E5%B9%95&hl=zh-TW&ct=clnk&cd=1&gl=tw&client=firefox-a#p=51103
http://programistoj.blogspot.com/2008/08/aspire-one-linux-8.html
http://intellinuxgraphics.org/dualhead.html
http://lists.freedesktop.org/archives/xorg/2007-August/027507.html
http://wiki.debian.org/XStrikeForce/HowToRandR12
Intel driver
* VGA - Analog VGA output
* LVDS - Laptop panel
* TV - Integrated TV output
* TMDS-1 - First DVI SDVO output
* TMDS-2 - Second DVI SDVO output
xrandr -q --verbose //列出比較詳細的值
gtf 1024 768 60 // 可以求得在解析度1024x768@60 MHz 下的Modeline(畫面更新頻率)的值
xrandr --output VGA --mode 1024x768 --crtc 0 --output LVDS --off //關Laptop panel僅在使用VGA投射到外部裝置,crtcs的解釋如下,Intel driver使用the external screen as the primary output (crtcs =0)
To use RandR 1.2, you might need to know three key concepts: (Virtual) Screen, Crtc and Output. A display is in one (Virtual) screen which may consist of more than one Crtc. Every crtc will occupy one rectangle region in the (Virtual) screen and may have different modes. A crtc can connect to more than one output and decide the output's property. Output is a port to monitor.
Intel GFX device supports two pipes which is corresponding to crtc. So there can be two crtc with Intel GFX device.
Most hardware only have 2 CRTCs, which means they only have 2 rendering pipeline and thus may only display on 2 outputs at the same time.
以下是一個切換投影設備的script例子:
#!/bin/sh
export DISPLAY=:0.0
case $1 in
1) #LCD only
echo 1
/bin/su user -c "/usr/bin/xrandr --output LVDS --mode 1024x600 --output VGA --off --output HDMI-1 --off"
;;
2) #CRT only
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --output LVDS --off --output HDMI-1 --off"
;;
3) #LCD+CRT
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --output LVDS --mode 800x600 --output HDMI-1 --off"
;;
4) #HDMI only
/bin/su user -c "/usr/bin/xrandr --output HDMI-1 --mode 800x600 --output LVDS --off --output VGA --off"
;;
5) #LCD+HDMI
/bin/su user -c "/usr/bin/xrandr --output LVDS --mode 800x600 --output HDMI-1 --mode 800x600 --output VGA --off"
;;
6) #CRT+HDMI
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --output LVDS --off --output HDMI-1 --off"
/bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --crtc 1 --output HDMI-1 --mode 800x600 --crtc 0 --output LVDS --off"
esac
參考:
http://usagiblog.wordpress.com/2006/07/11/xrandr-%E4%BB%8B%E7%B4%B9/
http://209.85.175.104/search?q=cache:litkiG3XeYQJ:funp.com/push/%3Ftag%3Dxrandr%26hot%26stars%3D1+xrandr%E9%9B%99%E8%9E%A2%E5%B9%95&hl=zh-TW&ct=clnk&cd=1&gl=tw&client=firefox-a#p=51103
http://programistoj.blogspot.com/2008/08/aspire-one-linux-8.html
http://intellinuxgraphics.org/dualhead.html
http://lists.freedesktop.org/archives/xorg/2007-August/027507.html
http://wiki.debian.org/XStrikeForce/HowToRandR12
沒有留言:
張貼留言