X.org 1.14.3 and metamodes: xinerama extension reports physical resolution instead of ViewPortIn scr

I noticed a strange issue on my Debian Jessie box (32bit, Xorg 1.14.3, 8600GTS with driver 331.20):

If I use a metamode, either scaled or cropped, the screen size reported by the xinerama extension reflects the physical graphics mode, not the current screen size.

This causes display issues for example with mame which by default uses the xinerama extension to get the size of the first screen - mame then sets up for the wrong resolution.

For example, setup a scaled 1152x864 screen on a 1024x768 LCD using the metamode option in xorg.conf:

Option "metamodes" "1024x768 @ 1152x864 { ViewPortIn = 1152x864, ViewPortOut = 1024x768+0+0 }"

Using nvidia-settings to configure the metamode has the same effect.

The screen is setup fine:

hias@tv:~$ xrandr -q
Screen 0: minimum 8 x 8, current 1152 x 864, maximum 8192 x 8192
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
TV-0 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected 1152x864+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   75.0     70.1
   800x600        75.0     72.2     60.3
   640x480        75.0     72.8     59.9
DVI-I-3 disconnected (normal left inverted right x axis y axis)

but the xinerama extension reports the physical resolution instead of the configured screen size:

hias@tv:~$ xdpyinfo -ext XINERAMA | tail -2
XINERAMA version 1.1 opcode: 141
  head #0: 1024x768 @ 0,0

The same is happening when using a builtin metamode, for example the 1024x576 metamode:

hias@tv:~$ xrandr -s 1024x576
hias@tv:~$ xdpyinfo -ext XINERAMA | tail -2
XINERAMA version 1.1 opcode: 141
  head #0: 1024x768 @ 0,0

However, using xrandr to setup a scaled mode works fine, xinerama reports the screensize, not the physical resolution:

hias@tv:~$ xrandr -s 1024x768
hias@tv:~$ xrandr --output DVI-I-2 --scale-from 1152x864
hias@tv:~$ xrandr -q
Screen 0: minimum 8 x 8, current 1152 x 864, maximum 8192 x 8192
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
TV-0 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected 1152x864+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   75.0     70.1
   800x600        75.0     72.2     60.3
   640x480        75.0     72.8     59.9
DVI-I-3 disconnected (normal left inverted right x axis y axis)
hias@tv:~$ xdpyinfo -ext XINERAMA | tail -2
XINERAMA version 1.1 opcode: 141
  head #0: 1152x864 @ 0,0

On my Debian Wheezy box (64bit, Xorg 1.12.4, 8800GT with driver 331.20) everything’s fine, xinerama always reports the configured screensize (ViewPortIn). For example a 1366x768 screen on a 1920x1200 resolution:

hias@camel2:~$ xrandr -s 1366x768
hias@camel2:~$ xdpyinfo -ext XINERAMA | tail -2
XINERAMA version 1.1 opcode: 150
  head #0: 1366x768 @ 0,0

so long,

Hias

nvidia-bug-report.log.gz (80.8 KB)

Thanks for reporting this issue. Filed Bug 1414964 to track this issue.