VMware Communities
AzironaZack
Contributor
Contributor
Jump to solution

Mavericks Guest OS Resolution resets on restart

I run a virtualized automation lab via VMWare Fusion.  This lab is used to QA test Mac software.  I have dozens of VMs running on a variety of Mac hardware using VMWare Fusion 6.0.2.  The problem I am seeing is that the Mavericks VMs have their screen resolution reset to 1024x768 upon every reboot and that is the only resolution available in the System Preferences Display panel.

The way I set up VMs is like so:

1. Using the VMWare Fusion app create a new VM and install the operating system.

2. Install VMWare Tools in the guest.  Restart the VM.

3. Configure the guest OS with my settings.  This always includes setting the screen resolution to something above 1400x1050.  I do this by stretching the window in the VMWare Fusion application or by setting the resolution via System Preferences.

4. Shutdown the VM and make a copy of it.  This copy is my default state.

In actual use after that the VMs are run headless using vmrun with the nogui argument.  For all versions of OS X VMs the resolution stays the same when the VM is restarted.  For Mavericks VMs the resolution is changed to 1024x768.

For all other OSes multiple resolutions show up in the System Preferences Display panel.  For Mavericks only that one resolution appears in the Scaled options.

I have tried the steps in KB 1003:

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1003&slice...

but that did not fix the problem.

I have tried turning 3d acceleration on and off and the problem exists in both cases.  Changing the resolution by resizing the window while using VMWare Fusion app works fine but that is not possible when running headless.

Tech support via phone suggested I post this problem to the community and see if there are any answers here.  Thanks in advance.

Message was edited by: AzironaZack to add more details.

1 Solution

Accepted Solutions
HPReg
VMware Employee
VMware Employee
Jump to solution

If you are familiar with writing C code to do user<->kernel communication via IOServiceGetMatchingService/IOServiceOpen/IOConnectCallStructMethod, send me your email address at hpreg@YouKnowTheCompany.com, and I will email you the trivial piece of C code we use in the guest to request that the VMware SVGA driver does steps #a through #c.

View solution in original post

0 Kudos
45 Replies
WoodyZ
Immortal
Immortal
Jump to solution

At one point I tested every command line utility I could find and none worked and even a coupe GUI apps didn't work either in an OS X Mavericks Virtual Machine.  Regardless of the resolution set at shutdown in Single Windows view it will always default to 1024 x 768 when started back up with the GUI in Single Windows view or using vmrun with nogui and the only thing I have to offer if you want to run in Single Windows view is an AppleScript I wrote.  Have a look at: Re: Mavericks Screen Resolution

0 Kudos
AzironaZack
Contributor
Contributor
Jump to solution

Yes, I've seen your AppleScript solution.  Unfortunately since I run exclusively in nogui mode that solution is not appropriate in my case.  Thanks.

One solution I'm looking into is writing an application that uses the Core Graphics API to set the resolution.  Unfortunately the only display mode that Core Graphics shows available for the VM display is 1024x768.  I'm playing around with an undocumented call in that API to see if maybe I can build up a display mode out of whole cloth and then apply it.

Still seeking solutions, of course.  The best solution would be from VMWare, of course, with a fix to make this feature work in Mavericks guests like it does in non Mavericks ones.  If I find something I'll post it but hopefully somebody here has a solution already.

0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

Not sure if it will help for your problem, but you also saw this post?

Fusion 6, Retina and Display Resolution - Can I disable "auto fit"?

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
AzironaZack
Contributor
Contributor
Jump to solution

Yes, I've seen that article and I've played with the preference settings referred to in that article.  Those fixes do not work for me.  Thanks!

0 Kudos
admin
Immortal
Immortal
Jump to solution

My setup doesn't exactly match yours but this was successful for me:

1. Disable automatic resolution changes using this vmx setting:

svga.autodetect = "FALSE"

2. Explicitly set video memory and maximum resolutions for your test setup using these vmx settings:

svga.vramSize = 20971520

svga.maxWidth = 2560

svga.maxHeight = 2048

svga.numDisplays = 1

Note: See VMware KB: Adding video resolution modes to Windows guest operating systems for details.

3. With these changes in place boot OS X and set the resolution you want under System Preferences > Displays

4. Rebooting the VM should result in OS X retaining the solution you set in the step above.

Notes:

The resolution on the login screen appears to be distinct from the user desktop setting. I didn't dig in to this.

Tested using Fusion 6.0.2 with a Mountain Lion Server VM booted using nogui and accessed via ARD. Host was 10.9.x.

0 Kudos
AzironaZack
Contributor
Contributor
Jump to solution

Thanks spb2011.  I've tried those settings in the vmx for this VM but they did not help.  With those settings I still only see the one available resolution in System Preferences (1024x768).  Since I can't stretch the window to resize the resolution when running in nogui mode I can't change the resolution in Mavericks VMs running that way at all.

0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi AzironaZack,

I tried again with a Mavericks guest and am seeing the same behaviour as you. This looks like a less than helpful change between 10.8 and 10.9.

-Simon

0 Kudos
HPReg
VMware Employee
VMware Employee
Jump to solution

WoodyZ and AzironaZack,

You are right that the VMware SVGA driver behaves differently depending on the Mac OS guest version:

o For versions < 10.9: System Preferences > Display offers multiple resolutions that the user can choose from.

The list of resolutions contains standard resolutions as well as the "custom" resolution (i.e. the resolution of the virtual flat panel display, which is non-standard, for example 1025x769). When the user resizes the VM's single window, Fusion interprets this as "the user wants to set the size of the virtual flat panel display", and Fusion instructs the VMware Tools to essentially do the following inside the VM:

a) Unplug the virtual flat panel from the virtual machine.

b) Manufacture a new virtual flat panel, with a resolution corresponding to the new size of the VM's single window.

c) Plug the virtual flat panel to the virtual machine.

o For versions >= 10.9: System Preferences > Display only shows one resolution: the "custom" resolution.


The assumption in the thread Mavericks Screen Resolution and in this thread is that somehow the new behavior in Mavericks is a VMware bug and that VMware should fix it. I wish it was that simple Smiley Happy The new behavior is actually imposed by Apple (you can check on a physical machine with a flat panel display): up to Lion, the list of resolutions was directly accessible under System Preferences > Display. With Mountain Lion, Apple started to hide the list under the "Scaled" radio button. The writing was on the wall. With Mavericks, the list is further filtered and only the resolutions which have the same aspect ratio as the largest resolution are valid (all other resolutions offered by the driver are rejected by the WindowServer process). What seems to be happening in Mavericks (that is probably imposed by the iOS convergence) is that Apple no longer wants users to switch resolutions: there is only one true resolution, and that is the one of your flat panel display.


When we noticed that, we thought it would be no big deal: "oh well, at least with a virtual machine, the user can resize her virtual flat panel display at will just by resizing the single VM's window". Of course we were wrong: in your headless use case, it is a big deal, because you have no single VM window to resize.


We are not planning to fight the Mavericks behavior, but we can certainly find a solution to your problem. We could remember (inside the VM, typically in a file) the last resolution that was set, and programmatically apply it when the VMware Tools start in the VM. This would allow you to set the resolution once for all using the UI, and then after that you could run the VM headless and the resolution you chose would stick. If you don't want to run the UI even once, you could simply create the file yourself. Would that solution work for your use case?

0 Kudos
AzironaZack
Contributor
Contributor
Jump to solution

Thanks for the detailed explanation.  Your proposed solution would work fine for me.

I was curious if there is any way for me to talk to the VMware Tools directly in the VM.  If I could simulate whatever the Fusion UI says to VMware Tools to make steps a through c happen that would be a fine solution too.

Thanks again.

0 Kudos
HPReg
VMware Employee
VMware Employee
Jump to solution

If you are familiar with writing C code to do user<->kernel communication via IOServiceGetMatchingService/IOServiceOpen/IOConnectCallStructMethod, send me your email address at hpreg@YouKnowTheCompany.com, and I will email you the trivial piece of C code we use in the guest to request that the VMware SVGA driver does steps #a through #c.

0 Kudos
AzironaZack
Contributor
Contributor
Jump to solution

Thanks!  The email has been sent.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

HPReg wrote:

The assumption in the thread Mavericks Screen Resolution and in this thread is that somehow the new behavior in Mavericks is a VMware bug and that VMware should fix it.

The reason I assume it's a bug or shortcoming of what VMware Fusion offers is because OS X 10.9 Mavericks when run natively on Apple-branded hardware when selecting Scaled from Display under System Preferences displays more then one resolution unlike what VMware Fusion does!  So if you're not replicating or cannot replicate the same behavior that is available natively then IMO VMware isn't doing something right!

0 Kudos
HPReg
VMware Employee
VMware Employee
Jump to solution

> OS X 10.9 Mavericks when run natively on Apple-branded hardware when selecting Scaled from Display under System Preferences displays more then one resolution

But don't all these resolutions have the same aspect ratio (like I wrote 5 posts above)? That is what is preventing us from making this work: the custom resolution can have an arbitrary aspect ratio, which is completely different from the aspect ratio of standard resolutions.

0 Kudos
AzironaZack
Contributor
Contributor
Jump to solution

HPReg,

Thank you for the solution.  I've put together a little program based on your code that does exactly what you described.  That program is invoked by launchd at login and works like a charm.  It's definitely a viable workaround for the issue and I appreciate your willingness to share it with me.

A thousand thanks.

0 Kudos
HPReg
VMware Employee
VMware Employee
Jump to solution

AzironaZack, you are welcome. In return, feel free to share your little program with other forum members, if they ask you.

Note: Although the driver interface your program uses has not changed since the inception of VMware Tools for Mac OS, I make no claim future versions of VMware Tools for Mac OS will stay compatible with your program.

0 Kudos
rsd3k
Contributor
Contributor
Jump to solution

Hi ArizonaZack,

Would you be able to share the C program and simple steps to use it to fix OS X guest video problem.

rsd3k@yahoo dot com

AzironaZack wrote:

HPReg,

Thank you for the solution.  I've put together a little program based on your code that does exactly what you described.  That program is invoked by launchd at login and works like a charm.  It's definitely a viable workaround for the issue and I appreciate your willingness to share it with me.

A thousand thanks.

0 Kudos
AzironaZack
Contributor
Contributor
Jump to solution

Done.

0 Kudos
sconline
Contributor
Contributor
Jump to solution

I wonder if you would be so kind as to let me also have a copy of the C program and simple steps to use it to fix OS X guest video problem.

don@screencastsonline at com

Thanks

0 Kudos
rsd3k
Contributor
Contributor
Jump to solution

sconline wrote:

I wonder if you would be so kind as to let me also have a copy of the C program and simple steps to use it to fix OS X guest video problem.

don@screencastsonline at com

Thanks

Done

0 Kudos