Difference between revisions of "DualScreen"

From ArchWiki
Jump to: navigation, search
(Created page with "Category:X Server (English) {{i18n|Dual-Screen}} = Background = Xwindows drives the underlying graphical interface of most if not all Unix/Linux computers providing a GU...")
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:X Server (English)]]
 
[[Category:X Server (English)]]
 
{{i18n|Dual-Screen}}
 
{{i18n|Dual-Screen}}
 +
{{Note|credit for xrandr stuff [http://intellinuxgraphics.org/dualhead.html Intel Linux Graphics] and [http://www.thinkwiki.org/wiki/Xorg_RandR_1.2 ThinkWiki]}}
 +
{{Note|credit for intel driver stuff to the authors of the intel manpage}}
  
 
= Background =
 
= Background =
  
Xwindows drives the underlying graphical interface of most if not all Unix/Linux computers providing a GUI. [http://en.wikipedia.org/wiki/Xwindows It was developed in 1984 at MIT.] After around 35 years of development, tweaking and adding of new hardware and ideas, it is generally acknowledged to be a bit of a beast. It should be acknowledged that the common configuration at time of development was a single mini running X providing individual views to Xterminals in a timesharing system. Nowadays the norm is X providing a single screen on a desktop or laptop.
+
Xwindows drives the underlying graphical interface of most if not all Unix/Linux computers providing a GUI. [[Wikipedia:Xwindows | It was developed in 1984 at MIT.]] After around 35 years of development, tweaking and adding of new hardware and ideas, it is generally acknowledged to be a bit of a beast. It should be remembered that the common configuration at time of development was a single mini running X providing individual views to Xterminals in a timesharing system. Nowadays the norm is X providing a single screen on a desktop or laptop.
  
 
All of this means that there are many ways of achieving the same thing and many slightly different things that can meet the same purpose. In modern X versions sometimes you can get away with limited or no configuration. In the last few years the boast is that X is self configuring. Certainly the best practice rule of thumb is less configuration is better - that is only configure what is wrong.
 
All of this means that there are many ways of achieving the same thing and many slightly different things that can meet the same purpose. In modern X versions sometimes you can get away with limited or no configuration. In the last few years the boast is that X is self configuring. Certainly the best practice rule of thumb is less configuration is better - that is only configure what is wrong.
Line 54: Line 56:
 
4) Note down the portnames of the monitors attached - in the case of the above "VGA1" and "HDMI1"
 
4) Note down the portnames of the monitors attached - in the case of the above "VGA1" and "HDMI1"
  
5) Decide which resolution you are going to use. Each monitor has a preferred mode that, according to the manufacturer, is the best visually. These are marked by a "+". The mode a monitor is running at is marked by a "*". You should if possible use the preferred mode and a mode shared by both monitors. You can also add modes: [https://wiki.archlinux.org/index.php/Xrandr | see the xrandr page].
+
5) Decide which resolution you are going to use. Each monitor has a preferred mode that, according to the manufacturer, is the best visually. These are marked by a "+". The mode a monitor is running at is marked by a "*". You should if possible use the preferred mode and a mode shared by both monitors. You can also add modes: see the [[Xrandr]] page.
  
 
6) Decide which monitor is on the left or right (or top and bottom) and configure as follows:
 
6) Decide which monitor is on the left or right (or top and bottom) and configure as follows:
Line 103: Line 105:
  
 
7) Play around at the command line until you have a setting that works for you. When you do simply copy that call to xrandr into your window manager/desktop startup file. Arandr is a GUI interface to xrandr and may have some benefits in your search for a solution.
 
7) Play around at the command line until you have a setting that works for you. When you do simply copy that call to xrandr into your window manager/desktop startup file. Arandr is a GUI interface to xrandr and may have some benefits in your search for a solution.
 
= Dual Screen =
 
  
 
I found that some settings and approaches worked better than others and that even the best didn't work in all cases because of the differences between my two monitors.
 
I found that some settings and approaches worked better than others and that even the best didn't work in all cases because of the differences between my two monitors.
  
(to be continued)
+
= Extended Screen on the Intel Driver =
 +
 
 +
The intel driver seems to be the odd one out when configuring dual head setups. I am using the HD graphics controller embedded in the sandybridge i5. But my comments below should work with anything - read most intel embedded chipsets - supported by the "intel" driver.
 +
 
 +
For information on this driver see the "intel" manpage:
 +
 
 +
man intel
 +
https://wiki.archlinux.org/index.php/Xorg#Multiple_monitors.2FDual_screen
 +
The intel driver sets up dual heads differently. You only need three sections as follows:
 +
 
 +
Section "Device"
 +
        Identifier  "Card0"
 +
        Driver      "intel"
 +
        BusID      "PCI:0:2:0"
 +
        Option "monitor-VGA1" "Monitor0"
 +
        Option "monitor-HDMI1" "Monitor1"
 +
EndSection
 +
 
 +
Section "Monitor"
 +
        Identifier  "Monitor0"
 +
        Option      "VendorName" "GSM"
 +
        Option      "ModelName" "W1943"
 +
        Option      "DPMS" "true"
 +
        Option "Position" "0 0"
 +
EndSection
 +
 
 +
Section "Monitor"
 +
        Identifier  "Monitor1"
 +
        Option      "VendorName" "PHL"
 +
        Option      "ModelName" "Philips 221E"
 +
        Option      "DPMS" "true"
 +
        Option "Position" "1366 0"
 +
        Option "RightOf" "Monitor0"
 +
EndSection
 +
 
 +
Notes:
 +
 
 +
* You specify the individual ports and bind them to the monitor definitions using the Option "monitor-<port>" lines in the device section. These are the same ports spat out by xrandr -q and are also found in /var/log/Xorg.0.log
 +
 
 +
* Unlike almost every other dual monitor setup, you don't specify the device section twice. Doing so will produce an error in Xorg.0.log and the deletion of your second screen.
 +
 
 +
* My first screen (Monitor0) has a max resolution of 1366x768. This matches the position option in Monitor1.
 +
 
 +
* This setup doesn't specify which resolutions to use. By default I get the best on the smaller screen and the nearest to it on the big screen. To solve this problem I added modelines and a preferred mode:
 +
 
 +
Section "Device"
 +
        Identifier  "Card0"
 +
        Driver      "intel"
 +
        BusID      "PCI:0:2:0"
 +
        Option "monitor-VGA1" "Monitor0"
 +
        Option "monitor-HDMI1" "Monitor1"
 +
EndSection
 +
 
 +
Section "Monitor"
 +
        Identifier  "Monitor0"
 +
        Option      "VendorName" "GSM"
 +
        Option      "ModelName" "W1943"
 +
        Option      "DPMS" "true"
 +
        Option "PreferredMode" "1360x768"
 +
        Modeline "1360x768"  85.50  1360 1424 1536 1792  768 771 777 795 +hsync +vsync
 +
        Option "Position" "0 0"
 +
EndSection
 +
 
 +
Section "Monitor"
 +
        Identifier  "Monitor1"
 +
        Option      "VendorName" "PHL"
 +
        Option      "ModelName" "Philips 221E"
 +
        Option      "DPMS" "true"
 +
        Option "PreferredMode" "1920x1080"
 +
        Modeline "1920x1080"  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
 +
        Option "Position" "1366 0"
 +
        Option "RightOf" "Monitor0"
 +
EndSection
 +
 
 +
= Extended Screen on other cards =
 +
 
 +
The wiki has an excellent discussion of dual monitors for ATI and Nvidia chipsets in the [[Xorg]] article.

Revision as of 09:18, 4 January 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Note: credit for xrandr stuff Intel Linux Graphics and ThinkWiki
Note: credit for intel driver stuff to the authors of the intel manpage

Background

Xwindows drives the underlying graphical interface of most if not all Unix/Linux computers providing a GUI. It was developed in 1984 at MIT. After around 35 years of development, tweaking and adding of new hardware and ideas, it is generally acknowledged to be a bit of a beast. It should be remembered that the common configuration at time of development was a single mini running X providing individual views to Xterminals in a timesharing system. Nowadays the norm is X providing a single screen on a desktop or laptop.

All of this means that there are many ways of achieving the same thing and many slightly different things that can meet the same purpose. In modern X versions sometimes you can get away with limited or no configuration. In the last few years the boast is that X is self configuring. Certainly the best practice rule of thumb is less configuration is better - that is only configure what is wrong.

Extended Screen

This approach works well when the monitors are the same size and resolution. Interesting things happen - like windows off screen etc - when they are not. It is supposed to work but doesn't. It should also be noted that in a full desktop environment such as Gnome there are built-in GUI utilities to achieve this. However *box environments suffer.

1) Identify where your windows manager or desktop environment places startup code. For fluxbox this is ~/.fluxbox/startup

2) Add the xrandr utility and if you like GUI the arandr utility

pacman -S xorg-xrandr arandr

3) From the commandline run xrandr and you will see something like:

xrandr -q

produces

Screen 0: minimum 320 x 200, current 3280 x 1080, maximum 8192 x 8192
VGA1 connected 1360x768+0+0 (normal left inverted right x axis y axis) 406mm x 229mm
  1360x768       60.0*+
  1024x768       75.1     75.0     60.0  
  832x624        74.6  
  800x600        75.0     60.3  
  640x480        75.0     60.0  
  720x400        70.1  
HDMI1 connected 1920x1080+1360+0 (normal left inverted right x axis y axis) 477mm x 268mm
  1920x1080      60.0*+
  1600x1200      60.0  
  1680x1050      60.0  
  1280x1024      75.0     60.0  
  1440x900       59.9  
  1280x960       60.0  
  1152x864       75.0  
  1024x768       75.1     70.1     60.0  
  832x624        74.6  
  800x600        75.0     60.3     56.2  
  640x480        72.8     75.0     60.0  
  720x400        70.1  
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)


4) Note down the portnames of the monitors attached - in the case of the above "VGA1" and "HDMI1"

5) Decide which resolution you are going to use. Each monitor has a preferred mode that, according to the manufacturer, is the best visually. These are marked by a "+". The mode a monitor is running at is marked by a "*". You should if possible use the preferred mode and a mode shared by both monitors. You can also add modes: see the Xrandr page.

6) Decide which monitor is on the left or right (or top and bottom) and configure as follows:

VGA1 left of HDMI1 at their preferred resolutions

xrandr --output VGA1 --mode 1360x768 --pos 0x0 --output HDMI1 --mode 1920x1080 --pos 1360x0
  • --output specifies which port to use
  • --mode specifies which mode to use
  • --pos specifies the x/y coordinates of this monitor on the big virtual screen

or

xrandr --output VGA1 --mode 1360x768 --output HDMI1 --mode 1920x1080 --right-of VGA1
  • --right-of places the previous screen (HDMI1) to the right of the specified screen (VGA1)

VGA1 right of HDMI1 at 1024x768

xrandr --output VGA1 --mode 1024x768 --pos 1920x0 --output HDMI1 --mode 1024x768 --pos 0x0

or

xrandr --output VGA1 --mode 1024x768 --output HDMI1 --mode 1024x768 --left-of VGA1
  • --left-of places the previous screen (HDMI1) to the left of the specified screen (VGA1)

VGA1 above HDMI1 at preferred resolution

xrandr --output VGA1 --mode 1360x768 --pos 0x0 --output HDMI1 --mode 1920x1080 --pos 0x768

or

xrandr --output VGA1 --mode 1360x768 --output HDMI1 --mode 1920x1080 --below VGA1
  • --below places the previous screen (HDMI1) below the specified screen (VGA1)

VGA1 below HDMI1 at 1024x768

xrandr --output VGA1 --mode 1024x768 --pos 0x768 --output HDMI1 --mode 1024x768 --pos 0x0

or

xrandr --output VGA1 --mode 1024x768 --output HDMI1 --mode 1024x768 --above VGA1
  • --above places the previous screen (HDMI1) to the above the specified screen (VGA1)

7) Play around at the command line until you have a setting that works for you. When you do simply copy that call to xrandr into your window manager/desktop startup file. Arandr is a GUI interface to xrandr and may have some benefits in your search for a solution.

I found that some settings and approaches worked better than others and that even the best didn't work in all cases because of the differences between my two monitors.

Extended Screen on the Intel Driver

The intel driver seems to be the odd one out when configuring dual head setups. I am using the HD graphics controller embedded in the sandybridge i5. But my comments below should work with anything - read most intel embedded chipsets - supported by the "intel" driver.

For information on this driver see the "intel" manpage:

man intel

https://wiki.archlinux.org/index.php/Xorg#Multiple_monitors.2FDual_screen The intel driver sets up dual heads differently. You only need three sections as follows:

Section "Device"
       Identifier  "Card0"
       Driver      "intel"
       BusID       "PCI:0:2:0"
       Option "monitor-VGA1" "Monitor0"
       Option "monitor-HDMI1" "Monitor1"
EndSection
Section "Monitor"
       Identifier   "Monitor0"
       Option      "VendorName" "GSM"
       Option      "ModelName" "W1943"
       Option      "DPMS" "true"
       Option "Position" "0 0"
EndSection
Section "Monitor"
       Identifier   "Monitor1"
       Option      "VendorName" "PHL"
       Option      "ModelName" "Philips 221E"
       Option      "DPMS" "true" 
       Option "Position" "1366 0"
       Option "RightOf" "Monitor0"
EndSection

Notes:

  • You specify the individual ports and bind them to the monitor definitions using the Option "monitor-<port>" lines in the device section. These are the same ports spat out by xrandr -q and are also found in /var/log/Xorg.0.log
  • Unlike almost every other dual monitor setup, you don't specify the device section twice. Doing so will produce an error in Xorg.0.log and the deletion of your second screen.
  • My first screen (Monitor0) has a max resolution of 1366x768. This matches the position option in Monitor1.
  • This setup doesn't specify which resolutions to use. By default I get the best on the smaller screen and the nearest to it on the big screen. To solve this problem I added modelines and a preferred mode:
Section "Device"
       Identifier  "Card0"
       Driver      "intel"
       BusID       "PCI:0:2:0"
       Option "monitor-VGA1" "Monitor0"
       Option "monitor-HDMI1" "Monitor1"
EndSection
Section "Monitor"
       Identifier   "Monitor0"
       Option      "VendorName" "GSM"
       Option      "ModelName" "W1943"
       Option      "DPMS" "true"
       Option		"PreferredMode"	"1360x768"
       Modeline "1360x768"  85.50  1360 1424 1536 1792  768 771 777 795 +hsync +vsync 
       Option "Position" "0 0"
EndSection
Section "Monitor"
       Identifier   "Monitor1"
       Option      "VendorName" "PHL"
       Option      "ModelName" "Philips 221E"
       Option      "DPMS" "true"
       Option		"PreferredMode"	"1920x1080"
       Modeline "1920x1080"   148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync 
       Option "Position" "1366 0"
       Option "RightOf" "Monitor0"
EndSection

Extended Screen on other cards

The wiki has an excellent discussion of dual monitors for ATI and Nvidia chipsets in the Xorg article.