Bug 16049

Summary: vmware driver and physical screen size
Product: xorg Reporter: Skip Collins <skip.collins>
Component: Driver/VMWareAssignee: linux-graphics-maintainer <linux-graphics-maintainer>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: skip.collins
Version: 7.3 (2007.09)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Skip Collins 2008-05-21 07:52:32 UTC
I am running Hardy in VMware Player 2.0.3 with vmware tools 6.0.3. There is an inconsistency in the way screen sizes are detected. Some programs like emacs and xfce-terminal display smaller or larger fonts depending on whether I have shrunk or expanded the vmware window. If I start with a size of 1024x768, xdpyinfo reports:
  dimensions:    1024x768 pixels (271x203 millimeters)
  resolution:    96x96 dots per inch

If I expand the window by dragging the lower right corner, it reports:
  dimensions:    1268x986 pixesl (271x203 millimeters)
  resolution:    119x123 dots per inch

The problem is that the physical size of the display is now larger than 271x203 millimeters. The resolution in DPI remains constant, not the size.

Looking in the vmware.c driver code, I see an attempt to do the right thing:
        modemm->mmWidth *= modemm->mode->HDisplay / (double)(modemm->virtX);
        modemm->mmHeight *= modemm->mode->VDisplay / (double)(modemm->virtY);

When I invoke a screen resize using:
  xrandr -s 1024x768 --verbose
The screen successfully resizes and I get the following output:
 SZ:    Pixels          Physical       Refresh
 0   1024 x 768    ( 271mm x 203mm )   85   75   70   60   0   
 1    832 x 624    ( 271mm x 203mm )   75  
 2    800 x 600    ( 271mm x 203mm )   85   75   72   60   56   0   
 3    640 x 480    ( 271mm x 203mm )   85   75   73   60   0   
 4    720 x 400    ( 271mm x 203mm )   85  
 5    640 x 400    ( 271mm x 203mm )   85   0   
 6    640 x 350    ( 271mm x 203mm )   85  
 7    320 x 240    ( 271mm x 203mm )   0   
[---snip---]
 30  2360 x 1770   ( 271mm x 203mm )   0   
 31  1176 x 1050   ( 271mm x 203mm )   0   
 32  1296 x 1049   ( 271mm x 203mm )   0   
*33  1268 x 986    ( 271mm x 203mm )  *0   
Current rotation - normal
Current reflection - none
Rotations possible - normal 
Reflections possible - none
Setting size to 0, rotation to normal
Setting reflection on neither axis
Event received, type = 115
Got a screen change notify event!
 window = 64
 root = 64
 size_index = 65535
 rotation 1
 timestamp = 116051, config_timestamp = 1728665
 Rotation = 1
 1268 X 986 pixels, 271 X 203 mm
Display width   1268, height   986
Display widthmm 271, heightmm 203
new Subpixel rendering model is unknown
[---end output---]

No matter what size I switch to via xrandr, all physical sizes are reported as 271x203 millimeters. But when I do
  xrandr --dpi 75 --verbose
I get:
  screen 0: 1024x768 346x260 mm  75.00dpi
which looks promising. But it has no effect on what xdpyinfo and xrandr subsequently report for size and dpi.

Perhaps the driver should call XRRSetScreenSize whenever the size is changed or when the mode list is initiated.

I also suggest that the vmware driver imitate the nvidia driver and implement an option to specify a constant DPI at startup.
Comment 1 Jakob Bornecrantz 2013-04-15 13:01:00 UTC
Changing to the default assignee.
Comment 2 Martin Peres 2019-11-29 18:51:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware/issues/1.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.