Difference between revisions of "Xinerama"
(Xinerama support for Mythtv) |
|||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Wikipedia}}'''Xinerama''' is an extension to the X Window System which allows applications and window managers to use the two (or more) physical displays as one large virtual display [http://en.wikipedia.org/wiki/Xinerama]. | |
+ | |||
+ | The calculation for display_aspect, including the support for Xinerama, is done in mythtv/libs/libmythtv/videoout_xv.cpp. | ||
Basicly, it takes the total display size in mm, and scales from the total | Basicly, it takes the total display size in mm, and scales from the total | ||
Line 5: | Line 7: | ||
== An example with my system == | == An example with my system == | ||
− | + | {{Code box|/etc/X11/XF86Config-4| | |
− | < | + | <pre> |
Section "ServerFlags" | Section "ServerFlags" | ||
− | + | Option "Xinerama" "true" | |
EndSection | EndSection | ||
Section "ServerLayout" | Section "ServerLayout" | ||
− | + | Identifier "Default Layout" | |
− | + | Screen "Screen 0" | |
− | + | Screen "Screen 1" RightOf "Screen 0" | |
− | + | InputDevice "Generic Keyboard" | |
− | + | InputDevice "Configured Mouse" | |
EndSection | EndSection | ||
− | </ | + | </pre> |
+ | }} | ||
'''From /var/log/XFree86.0.log:''' | '''From /var/log/XFree86.0.log:''' | ||
+ | <pre> | ||
... | ... | ||
(II) NVIDIA(0): Virtual screen size determined to be 1600 x 1200 | (II) NVIDIA(0): Virtual screen size determined to be 1600 x 1200 | ||
Line 28: | Line 32: | ||
(--) NVIDIA(1): Display dimensions: (350, 260) mm | (--) NVIDIA(1): Display dimensions: (350, 260) mm | ||
(--) NVIDIA(1): DPI set to (92, 93) | (--) NVIDIA(1): DPI set to (92, 93) | ||
+ | </pre> | ||
'''From mythfrontend:''' | '''From mythfrontend:''' | ||
+ | <pre> | ||
Total desktop width=2880, height=1200, numscreens=2 | Total desktop width=2880, height=1200, numscreens=2 | ||
2005-07-21 20:41:57.335 Using screen 0, 1600x1200 at 0,0 | 2005-07-21 20:41:57.335 Using screen 0, 1600x1200 at 0,0 | ||
+ | </pre> | ||
'''X reports to mythfrontend:''' | '''X reports to mythfrontend:''' | ||
− | 723mm 302mm | + | <pre> |
+ | 723mm 302mm | ||
dpi 101 101 | dpi 101 101 | ||
+ | </pre> | ||
'''videoout_xv.cpp calculation:''' | '''videoout_xv.cpp calculation:''' | ||
+ | <pre> | ||
w_mm = w_mm * gui_w / w; | w_mm = w_mm * gui_w / w; | ||
w_mm = 723 * 1600 / 2880 = 401 | w_mm = 723 * 1600 / 2880 = 401 | ||
Line 43: | Line 53: | ||
display_aspect = 1.33 = 4/3 | display_aspect = 1.33 = 4/3 | ||
Correct in my case. | Correct in my case. | ||
+ | </pre> | ||
== The possible things that may go wrong include: == | == The possible things that may go wrong include: == | ||
− | |||
'''Setting NoTwinViewXineramaInfo:''' | '''Setting NoTwinViewXineramaInfo:''' | ||
− | Option "NoTwinViewXineramaInfo" "boolean" | + | <tt><br> |
− | + | Option "NoTwinViewXineramaInfo" "boolean"<br> | |
− | + | When in TwinView, the NVIDIA X driver normally provides<br> | |
− | + | a Xinerama extension that X clients (such as window<br> | |
− | + | managers) can use to to discover the current TwinView<br> | |
− | + | configuration. Some window mangers can get confused by<br> | |
− | + | this information, so this option is provided to disable<br> | |
− | + | this behavior. Default: TwinView Xinerama information<br> | |
− | + | is provided.<br> | |
− | + | </tt> | |
− | / | ||
− | (--) VIA(0): Virtual size is 720x576 (pitch 720) | + | '''Forcing a dots per inch, as shown from 'ps aux | grep dpi':''' |
+ | <tt><br> | ||
+ | /usr/bin/X11/X -dpi 100 -nolisten tcp<br> | ||
+ | <br> | ||
+ | (--) VIA(0): Virtual size is 720x576 (pitch 720)<br> | ||
(**) VIA(0): *Mode "720x576": 26.8 MHz (scaled from 0.0 MHz), 30.5 kHz, 50.3 | (**) VIA(0): *Mode "720x576": 26.8 MHz (scaled from 0.0 MHz), 30.5 kHz, 50.3 | ||
− | Hz | + | Hz<br> |
− | (II) VIA(0): Modeline "720x576" | + | (II) VIA(0): Modeline "720x576" 26.80 720 752 848 880 576 588 593 605<br> |
− | (**) VIA(0): | + | (**) VIA(0): Default mode "640x480": 25.2 MHz (scaled from -0.0 MHz), 31.5 |
− | kHz, 60.0 Hz | + | kHz, 60.0 Hz<br> |
− | (II) VIA(0): Modeline "640x480" | + | (II) VIA(0): Modeline "640x480" 25.20 640 656 752 800 480 490 492 525 |
− | -hsync -vsync | + | -hsync -vsync<br> |
− | (++) VIA(0): DPI set to (100, 100) | + | (++) VIA(0): DPI set to (100, 100)<br> |
+ | </tt> | ||
'''Using a incorrect DisplaySize in /etc/X11/XF86Config-4, correct example:''' | '''Using a incorrect DisplaySize in /etc/X11/XF86Config-4, correct example:''' | ||
− | DisplaySize 183 146 # (99.93 dpi:100.21 dpi for 720x576) | + | <tt><br> |
− | dpi = resolution / ( mm / 25.4 ) | + | DisplaySize 183 146 # (99.93 dpi:100.21 dpi for 720x576)<br> |
− | dpi = 720 / ( 183 / 25.4) = 99.93 dpi | + | dpi = resolution / ( mm / 25.4 )<br> |
+ | dpi = 720 / ( 183 / 25.4) = 99.93 dpi<br> | ||
+ | </tt> | ||
− | If you still can't get this to work, please post your /etc/X11/XF86Config-4 | + | If you still can't get this to work, please post your /etc/X11/XF86Config-4, /var/log/XFree86.0.log and mythfrontend log on the mythtv-users mail list. |
− | |||
''Paul Andreassen'' | ''Paul Andreassen'' | ||
+ | |||
+ | [[Category:Glossary]] |
Latest revision as of 12:00, 7 April 2007
Xinerama is an extension to the X Window System which allows applications and window managers to use the two (or more) physical displays as one large virtual display [1].The calculation for display_aspect, including the support for Xinerama, is done in mythtv/libs/libmythtv/videoout_xv.cpp.
Basicly, it takes the total display size in mm, and scales from the total display resolution to the size of the view display resolution.
An example with my system
Section "ServerFlags" Option "Xinerama" "true" EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Screen 0" Screen "Screen 1" RightOf "Screen 0" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" EndSection
From /var/log/XFree86.0.log:
... (II) NVIDIA(0): Virtual screen size determined to be 1600 x 1200 (--) NVIDIA(0): Display dimensions: (400, 300) mm (--) NVIDIA(0): DPI set to (101, 101) ... (II) NVIDIA(1): Virtual screen size determined to be 1280 x 960 (--) NVIDIA(1): Display dimensions: (350, 260) mm (--) NVIDIA(1): DPI set to (92, 93)
From mythfrontend:
Total desktop width=2880, height=1200, numscreens=2 2005-07-21 20:41:57.335 Using screen 0, 1600x1200 at 0,0
X reports to mythfrontend:
723mm 302mm dpi 101 101
videoout_xv.cpp calculation:
w_mm = w_mm * gui_w / w; w_mm = 723 * 1600 / 2880 = 401 h_mm = 302 * 1200 / 1200 = 302 display_aspect = 1.33 = 4/3 Correct in my case.
The possible things that may go wrong include:
Setting NoTwinViewXineramaInfo:
Option "NoTwinViewXineramaInfo" "boolean"
When in TwinView, the NVIDIA X driver normally provides
a Xinerama extension that X clients (such as window
managers) can use to to discover the current TwinView
configuration. Some window mangers can get confused by
this information, so this option is provided to disable
this behavior. Default: TwinView Xinerama information
is provided.
Forcing a dots per inch, as shown from 'ps aux | grep dpi':
/usr/bin/X11/X -dpi 100 -nolisten tcp
(--) VIA(0): Virtual size is 720x576 (pitch 720)
(**) VIA(0): *Mode "720x576": 26.8 MHz (scaled from 0.0 MHz), 30.5 kHz, 50.3
Hz
(II) VIA(0): Modeline "720x576" 26.80 720 752 848 880 576 588 593 605
(**) VIA(0): Default mode "640x480": 25.2 MHz (scaled from -0.0 MHz), 31.5
kHz, 60.0 Hz
(II) VIA(0): Modeline "640x480" 25.20 640 656 752 800 480 490 492 525
-hsync -vsync
(++) VIA(0): DPI set to (100, 100)
Using a incorrect DisplaySize in /etc/X11/XF86Config-4, correct example:
DisplaySize 183 146 # (99.93 dpi:100.21 dpi for 720x576)
dpi = resolution / ( mm / 25.4 )
dpi = 720 / ( 183 / 25.4) = 99.93 dpi
If you still can't get this to work, please post your /etc/X11/XF86Config-4, /var/log/XFree86.0.log and mythfrontend log on the mythtv-users mail list.
Paul Andreassen