VMware Communities
akbhargava
Contributor
Contributor

Struggling with display/screen size/resolution on a Linux VM

Hello,

I have installed CrunchBang 8.10.02.i386 as a VM on my MacBook 10.5.6. I have been running Fusion 2.0.2 with a Windows XP VM successfully for some time now. But I am unable to overcome a display resolution issue with my CrunchBang VM. I have looked in every possible forum (VMware, #!, Ubuntu, googled etc) without success. I tried the suggestions here: http://communities.vmware.com//message/1206897 and http://crunchbanglinux.org/forums/topic/731/resolved-resolution/ I installed, un-installed and re-installed successfully vmware-tools on the CrunchBang system. Now, I have previously installed an Ubuntu VM before and when I ran vmware-tools-install.pl it would invoke vmware-tools-config.pl that would towards the end query for the screen/display size; this never happened when I installed the #! VM - so right away that tells me that the vmware-tools installation is having some issues.

Anyways I tracked down two issues:

1. Xorg starts unable to find the correct screen resolution and defaults to 800x600.

2. vmware-user, a daemon necessary for the guest OS (i.e. #!) to respond to the user's interaction with the native OS. I solved this by launching the daemon as the first line in .config/openbox/autostart.sh. The daemon also "hears" from VMware on the native OS and sets the screen size to 1200x800.

So what is the problem?

Well the font size is set to serif 8 but appears much larger consequently not really giving me a usable 1200x800 screen. I suspect that may be because Xorg started with the resolution as 800x600. I could be wrong but I am new to Linux and still figuring my way around.

I would greatly appreciate any help to fix this issue. I have attached the files xorg.conf and Xorg.0.log (note line 302: ++(II) VMWARE(0): Not using mode "1280x800" (no mode of this name)) for reference.

Thanks very much and best,

m

HOST

  • MacBook 10.5.6 2 GHz C2D 2GB RAM

  • VMware Fusion Version 2.0.2 (147997)

GUEST

Crunchbang is a graphical (and some others) variant of Ubuntu. Here is what I have for guest info:

OS:

xxx@xxx-laptop:~$ cat /etc/lsb-release

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=8.10

DISTRIB_CODENAME=intrepid

DISTRIB_DESCRIPTION="Ubuntu 8.10"

The VM was created in Fusion using a Crunchbang i386 ISO

VMware Tools:

VMware Tools for Linux

Version 7.9.3, build-147997

0 Kudos
6 Replies
philipl
VMware Employee
VMware Employee

Hi,

There's a couple of things going on here:

1) In the absence of an explicit entry in xorg.conf, the initial resolution is left up to Xorg to decide. The algorithm used here has varied from release to release and sometimes the Distro may patch in something different. In your case it ends up at 800x600, which isn't too unreasonable as far as wild guesses go.

2) The vmware X11 driver attempts to keep the DPI constant with respect to the initial resolution. It does this because most people have fixed DPI (ie: LCD) displays these days. However, as the initial DPI is calculated from the initial resolution, it means that if you have a very small initial resolution and then grow the screen, the final DPI may be wildly different from what you expect. This behaviour cannot be changed without modifying the X11 driver, although it's easy to do if you're prepared to pull out your friendly compiler.

Your attempt to force the initial resolution to 1280x800 is the right approach but X doesn't have a built-in modeline for 1280x800 (and due to a bug in the shipping driver, the driver's built-in list is not evaluated early enough to help).

So you will need to generate one and add it to the Monitor section of xorg.conf. You can use the 'cvt' utility that comes with Xorg to do it.

Here's an example which should work fine:

Modeline "1280x800" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync

0 Kudos
akbhargava
Contributor
Contributor

Hi Phil,

Thanks so much for your response - it is most helpful. I understand what you are saying and that led me to question why my earlier Ubuntu installation had been seamless. So I decided to try an Ubuntu installation. Since VMware now supports Ubuntu 8.10, I did not need to perform a vmware-tools installation; it was already there. And the screen was resizing dynamically as I adjusted the OS X window. The font size was perfect.

So I decided to examine the Xorg.conf file on the Ubuntu system and it was pretty much the standard boiler-plate mostly empty file.

Then I decided to use xrandr on the Ubuntu system to query the system. I issued two different (in very minor ways, IMO) xrandr commands and got inconsistent results.

"xrandr -q --verbose" - the output of this did NOT include the 1280x800 mode

"xrandr -q" - the output DID include the 1280x800 mode

what gives???!!!!

Anyways one thing I concluded is that VMware sets some other parameter (perhaps in the bootloader entry - I dont know how to check) that allows the VM to come up nice and clean. Even the login window has the resolution set perfectly.

In case you are curious, I have attached xorg.conf and the outputs of the xrandr's below.

Of course, any help is greatly appreciated.

Best,

-m

/etc/X11/xorg.conf

Section "Device"

Identifier "Configured Video Device"

EndSection

Section "Monitor"

Identifier "Configured Monitor"

EndSection

Section "Screen"

Identifier "Default Screen"

Monitor "Configured Monitor"

Device "Configured Video Device"

EndSection

First I issued "xrandr -q --verbose" and the output did not include 1280x800:

xxx@ubuntu:~$ xrandr -q --verbose

Screen 0: minimum 320 x 200, current 937 x 666, maximum 5120 x 3200

default connected 937x66600 (0x85) normal (normal) 0mm x 0mm

Identifier: 0x63

Timestamp: 110929

Subpixel: unknown

Clones:

CRTC: 0

CRTCs: 0

800x600 (0x64) 28.8MHz

h: width 800 start 0 end 0 total 800 skew 0 clock 36.0KHz

v: height 600 start 0 end 0 total 600 clock 60.0Hz

800x600 (0x65) 26.9MHz

h: width 800 start 0 end 0 total 800 skew 0 clock 33.6KHz

v: height 600 start 0 end 0 total 600 clock 56.0Hz

800x600 (0x66) 0.0MHz

h: width 800 start 0 end 0 total 800 skew 0 clock 0.0KHz

v: height 600 start 0 end 0 total 600 clock 0.0Hz

640x480 (0x67) 18.4MHz

h: width 640 start 0 end 0 total 640 skew 0 clock 28.8KHz

v: height 480 start 0 end 0 total 480 clock 60.0Hz

640x480 (0x68) 0.0MHz

h: width 640 start 0 end 0 total 640 skew 0 clock 0.0KHz

v: height 480 start 0 end 0 total 480 clock 0.0Hz

320x240 (0x69) 0.0MHz

h: width 320 start 0 end 0 total 320 skew 0 clock 0.0KHz

v: height 240 start 0 end 0 total 240 clock 0.0Hz

400x300 (0x6a) 0.0MHz

h: width 400 start 0 end 0 total 400 skew 0 clock 0.0KHz

v: height 300 start 0 end 0 total 300 clock 0.0Hz

512x384 (0x6b) 0.0MHz

h: width 512 start 0 end 0 total 512 skew 0 clock 0.0KHz

v: height 384 start 0 end 0 total 384 clock 0.0Hz

1024x768 (0x6c) 0.0MHz

h: width 1024 start 0 end 0 total 1024 skew 0 clock 0.0KHz

v: height 768 start 0 end 0 total 768 clock 0.0Hz

1152x864 (0x6d) 0.0MHz

h: width 1152 start 0 end 0 total 1152 skew 0 clock 0.0KHz

v: height 864 start 0 end 0 total 864 clock 0.0Hz

1280x960 (0x6e) 0.0MHz

h: width 1280 start 0 end 0 total 1280 skew 0 clock 0.0KHz

v: height 960 start 0 end 0 total 960 clock 0.0Hz

1400x1050 (0x6f) 0.0MHz

h: width 1400 start 0 end 0 total 1400 skew 0 clock 0.0KHz

v: height 1050 start 0 end 0 total 1050 clock 0.0Hz

1600x1200 (0x70) 0.0MHz

h: width 1600 start 0 end 0 total 1600 skew 0 clock 0.0KHz

v: height 1200 start 0 end 0 total 1200 clock 0.0Hz

1920x1440 (0x71) 0.0MHz

h: width 1920 start 0 end 0 total 1920 skew 0 clock 0.0KHz

v: height 1440 start 0 end 0 total 1440 clock 0.0Hz

2048x1536 (0x72) 0.0MHz

h: width 2048 start 0 end 0 total 2048 skew 0 clock 0.0KHz

v: height 1536 start 0 end 0 total 1536 clock 0.0Hz

2560x1920 (0x73) 0.0MHz

h: width 2560 start 0 end 0 total 2560 skew 0 clock 0.0KHz

v: height 1920 start 0 end 0 total 1920 clock 0.0Hz

854x480 (0x74) 0.0MHz

h: width 854 start 0 end 0 total 854 skew 0 clock 0.0KHz

v: height 480 start 0 end 0 total 480 clock 0.0Hz

1280x720 (0x75) 0.0MHz

h: width 1280 start 0 end 0 total 1280 skew 0 clock 0.0KHz

v: height 720 start 0 end 0 total 720 clock 0.0Hz

1366x768 (0x76) 0.0MHz

h: width 1366 start 0 end 0 total 1366 skew 0 clock 0.0KHz

v: height 768 start 0 end 0 total 768 clock 0.0Hz

1920x1080 (0x77) 0.0MHz

h: width 1920 start 0 end 0 total 1920 skew 0 clock 0.0KHz

v: height 1080 start 0 end 0 total 1080 clock 0.0Hz

1280x800 (0x78) 0.0MHz

h: width 1280 start 0 end 0 total 1280 skew 0 clock 0.0KHz

v: height 800 start 0 end 0 total 800 clock 0.0Hz

1440x900 (0x79) 0.0MHz

h: width 1440 start 0 end 0 total 1440 skew 0 clock 0.0KHz

v: height 900 start 0 end 0 total 900 clock 0.0Hz

1680x1050 (0x7a) 0.0MHz

h: width 1680 start 0 end 0 total 1680 skew 0 clock 0.0KHz

v: height 1050 start 0 end 0 total 1050 clock 0.0Hz

1920x1200 (0x7b) 0.0MHz

h: width 1920 start 0 end 0 total 1920 skew 0 clock 0.0KHz

v: height 1200 start 0 end 0 total 1200 clock 0.0Hz

2560x1600 (0x7c) 0.0MHz

h: width 2560 start 0 end 0 total 2560 skew 0 clock 0.0KHz

v: height 1600 start 0 end 0 total 1600 clock 0.0Hz

720x480 (0x7d) 0.0MHz

h: width 720 start 0 end 0 total 720 skew 0 clock 0.0KHz

v: height 480 start 0 end 0 total 480 clock 0.0Hz

720x576 (0x7e) 0.0MHz

h: width 720 start 0 end 0 total 720 skew 0 clock 0.0KHz

v: height 576 start 0 end 0 total 576 clock 0.0Hz

320x200 (0x7f) 0.0MHz

h: width 320 start 0 end 0 total 320 skew 0 clock 0.0KHz

v: height 200 start 0 end 0 total 200 clock 0.0Hz

640x400 (0x80) 0.0MHz

h: width 640 start 0 end 0 total 640 skew 0 clock 0.0KHz

v: height 400 start 0 end 0 total 400 clock 0.0Hz

800x480 (0x81) 0.0MHz

h: width 800 start 0 end 0 total 800 skew 0 clock 0.0KHz

v: height 480 start 0 end 0 total 480 clock 0.0Hz

1280x768 (0x82) 0.0MHz

h: width 1280 start 0 end 0 total 1280 skew 0 clock 0.0KHz

v: height 768 start 0 end 0 total 768 clock 0.0Hz

1280x1024 (0x83) 0.0MHz

h: width 1280 start 0 end 0 total 1280 skew 0 clock 0.0KHz

v: height 1024 start 0 end 0 total 1024 clock 0.0Hz

5120x3200 (0x84) 0.0MHz

h: width 5120 start 0 end 0 total 5120 skew 0 clock 0.0KHz

v: height 3200 start 0 end 0 total 3200 clock 0.0Hz

937x666 (0x85) 0.0MHz *current

h: width 937 start 0 end 0 total 937 skew 0 clock 0.0KHz

v: height 666 start 0 end 0 total 666 clock 0.0Hz

Then I issued "xrandr -q" and this time 1280x800 was there!

xxx@ubuntu:~$ xrandr -q

Screen 0: minimum 320 x 200, current 937 x 666, maximum 5120 x 3200

default connected 937x66600 0mm x 0mm

800x600 60.0 56.0 0.0

640x480 60.0 0.0

320x240 0.0

400x300 0.0

512x384 0.0

1024x768 0.0

1152x864 0.0

1280x960 0.0

1400x1050 0.0

1600x1200 0.0

1920x1440 0.0

2048x1536 0.0

2560x1920 0.0

854x480 0.0

1280x720 0.0

1366x768 0.0

1920x1080 0.0

1280x800 0.0

1440x900 0.0

1680x1050 0.0

1920x1200 0.0

2560x1600 0.0

720x480 0.0

720x576 0.0

320x200 0.0

640x400 0.0

800x480 0.0

1280x768 0.0

1280x1024 0.0

5120x3200 0.0

937x666 0.0*

0 Kudos
akbhargava
Contributor
Contributor

Phillip,

I also decided to try the modeline you included in your post but Xorg did not like it:

(II) VMWARE(0): Not using mode "1280x800" (hsync out of range)

I also used both cvt and gtf to generate modelines. cvt generated the same modeline as yours. gtf was a little bit different. I tried both thesealso with the same result.

- m

0 Kudos
akbhargava
Contributor
Contributor

I have not discovered a solution yet. I installed Ubuntu for which this works fine but could not figure out how to get the display manager (gdm/slim etc) to display in the appropriate resolution. For the user session, VMware relies on the session manager initialization to launch vmware-user that reconfigures the screen resolution correctly.

0 Kudos
philipl
VMware Employee
VMware Employee

There are two ways to control what resolution gdm (or any other session manager) uses.

1) Edit xorg.conf and make sure the resolution you want is listed in the Display section - it should be the largest resolution in the list. Don't worry, after you log in, you can still go larger.

2) Put vmware-user in the gdm session. I've never tried this and haven't investigated how exactly you do it, but I know it is possible.

Hope that helps.

0 Kudos
woodmeister
Enthusiast
Enthusiast

Had something of a similar problem when upgrading to 2.02 on

Fedora9. After installing VMware tools, it seems it created

the generic empty Xorg.conf file. When ls'ing the X11 directory

i noticed a new Xorg.conf backup file. It had all the VMware

drivers and such called out. I just replaced the new generic

Xorg.conf with the previous one and all was fine.

A proper Xorg.conf for a Fusion VM should have listings for

VMware display, video card and even mouse as I recall.

0 Kudos