
paulx at andreassen
Jul 22, 2005, 12:15 AM
Post #10 of 12
(1518 views)
Permalink
|
Wendy and Martin, Attached is an trimmed version of mythtv/libs/libmythtv/videoout_xv.cpp which shows the calculation done for display_aspect, this includes support for Xinerama. Basicly, it takes the total display size in mm, and scales from the total display resolution to the size of the view display resolution. In my case /etc/X11/XF86Config-4 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 show 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 and /var/log/XFree86.0.log so I can do some checking. Hope this helps, Paul Maybe I should put this on a wiki somewhere? --
|