Jump to content

VMware SVGA II display driver for OS X, v1.2.5


308 posts in this topic

Recommended Posts

VMware SVGA II display adapter driver for OSx86 Leopard running as a VMware guest.

 

Version 1.1.0

 

Framebuffer features

1. Set one of 13 pre-canned display modes from System Preferences/Displays pane.

2. Hardware mouse cursor support.

3. Support for VMware's fit-guest feature via a modified vmware-tools-guestd from Darwin.ISO Tools 2.0.5.

4. Optional EDID injection via Info.plist (see docs).

5. Can work standalone without the Accelerator component by using a refresh timer for framebuffer

updates, or VMware's SVGA_CAP_TRACES if available on the host.

 

Accelerator Features

1. Accurate framebuffer updates and FIFO synchronization when rendering with VMware's legacy 2D backend (uses GDI, etc).

2. Supports rendering with VMware's Direct3D/OpenGL backend - activate this with a Darwin boot option "-svga3d".

2. Supports framebuffer blits for moving windows around, using either the 2D or 3D backend.

3. Hardware video overlay support when playing movies in QuickTime/iTunes.

 

Upsupported features

1. 2560x1600 display mode.

2. Hardware OpenGL Acceleration (GLD Plugin).

3. multi-monitor.

 

Credits:

- VMwareIOFramebuffer.kext from Fusion 2.0.5.

- GeForce.kext, GeForceGA.plugin from OS 10.5.8.

- VMware's reference SVGA implementation on http://sourceforge.n...cts/vmware-svga.

- xf86-video-vmware-10.16.8 from X.Org.

 

Edit (10/25/2012): See post #158 for an update.

 

Link to Installation Package

Link to Docs

Link to Sources

All Project Files

  • Like 2
Link to comment
Share on other sites

Work on vmware fusion 3 and SL?
If you mean to ask whether it can work when the HOST is SL running Fusion 3, then I don't see why not. The driver is intended to work with any VMware host, although some of the more exotic features may fail. The driver is designed for a guest OS 10.5.x, and is built only for 32-bit. I haven't tested it on guest OS X Tiger, and certainly not on guest OS X SL. I haven't seen any distros of SL that run as VMware guest (except possibly retail running under Fusion.) I've been unsuccessful myself in my attempts to build a SL kernel that runs as a VMware guest. I also haven't tried building the driver for 64-bit, not even on Leopard.

 

PS: If you're not sure, you can make a snapshot of the guest VM, try installing it on the guest, and if it doesn't work - revert to snapshot.

Link to comment
Share on other sites

  • 2 weeks later...

I've completed a port of VMsvga2 1.1.0 to SnowLeopard - 32/64 bits. There's an installer in the files section under Display/SnowLeopard.

 

If you have a version of VMsvga2 dated Oct 2 that came with vmsl.tar.gz, you're encouraged to upgrade. That version was done in haste and had some portability bugs that weren't immediately obvious (the 3D renderer and video overlay didn't work at all.)

 

Don't mix the Leopard and SnowLeopard versions. Neither can run on the other system. The reasons are different, but they're all due to 64-bit portability issues.

 

Quicktime X doesn't use the hardware video overlay capability. The reason being that it's a 64-bit app. The video overlay is done using IOQTComponents, which is a 32-bit only library. I don't know if Apple is planning to migrate this component to 64-bit or if they consider it deprecated. iTunes 8 & 9 are still 32-bit apps so they can use this library and the video overlay.

 

I've separated the vmware-tools-guestd fit-guest patches to a different file - guestd_patches.tar.gz. There are patches there for VMware Tools from Fusion 2.0.5 and 2.0.6. I don't have patches for snowy-darwin from Fusion 3.0 yet.

Link to comment
Share on other sites

I've uploaded VMsvga2 version 1.1.1.

 

Changelog from 1.1.0 to 1.1.1

=============================

  1. Added three more display modes - 1920x1440, 2048x1536 and 2560x1600.
    • The mode list is trimmed to resolutions supported by the host, so not all modes may appear.

[*]Fixed blit bugs affecting window motion in "-svga3d" mode on VMware Workstation 7.

[*]The Leopard version of VMsvga2 impersonates VMwareIOFramebuffer, so it's no longer necessary to patch VMware darwin Tools from Fusion 2.x to get fit-guest support.

  • This feature is not available in the SnowLeopard version of VMsvga2. Apple made a change to IOKit in OS 10.6, so the impersonation option doesn't work.

[*]Fixed the shutdown procedure so it's possible to see changes in the display made after the WindowServer shuts down.

Link to comment
Share on other sites

great work.. I can now move windows around just fine.

 

But performance using -svga3d is worse than without.

The user interface just feels a bit more sluggish. It should be faster since it's using 3D graphics hardware. I dont't know why it is like this.

 

EDIT 1: I still had VMWareGfx kext installed though, maybe this is screwing it up. I will try to remove it and reboot and see what happens.

 

EDIT 2: That only seem to have sped up the boot and run the fit guest on the login screen(with both VMsvga2 and VMwareGfx installed it ran the fit guest on login). Still not as fluid user interface as I would like. I'm running Windows 7 with Aero in Workstation 7 with much better performance, so the lack of 3D horsepower is not the issue.

 

EDIT 3: Also ever since installing Snow Leopard I have lost the ability to take screenshots within Mac OS X. I have to use the VMWare Workstation screenshot function instead.

Look here for an explanation:

 

th_SnowLeopard-2009-10-16-17-23-20.png

Link to comment
Share on other sites

EDIT 3: Also ever since installing Snow Leopard I have lost the ability to take screenshots within Mac OS X. I have to use the VMWare Workstation screenshot function instead.

I can't see any picture with Preview on SL. Seems like a bug in vw7+sl. With quick preview(press space) everything ok.

Link to comment
Share on other sites

Screen Capture Problem

 

This is Apple's handiwork.

  • In OS 10.5, Apple implemented the screen capture by reading the image from the framebuffer, so any IOFramebuffer driver could do it.
  • In OS 10.6, they no longer read the image from the framebuffer. Instead, they use an acceleration feature called a CGSSurface to grab the image. As a result, plain IOFramebuffer drivers (NDRV, VMwareGfx) can't perform the capture anymore. Of course, Apple doesn't care since they have IOAccelerators for all their hardware.

VMsvga2 supports CGSSurfaces in -svga3d mode. The support isn't complete - it's not developed enough to make the capture work. It returns an error midway, which causes the capturer to generate a black image. I've made a checklist item to develop the surface support in VMsvga2 under -svga3d a little more so the capture can succeed. I'm not sure whether I'll implement this capability in 2D mode. I plan to eventually make "-svga3d" the default mode, once the performance problems there have been ironed out.

Anyhow, I don't have an immediate solution for this. You'll have to make do without screen capture in OS 10.6 for now.

Link to comment
Share on other sites

Hello,

 

I have installer Mac OS X 10.5.8 under ESX vSphere 4.0.

I have installed the SVGA II display driver for Leopard v1.1.1.

 

The max resolution available is 1152 x 864.

 

How can i have 1280 * 1024 or 1680 * 1050 available ?

 

Thank you.

 

Best regards.

 

___________________________________________________

 

Resolved, i have increased the vram of the virtual appliance.

Link to comment
Share on other sites

How to enable svga3d? Can I put it in com.apple.boot.plist? What should I do? Should I put in under Kernal flags?
hello, i would also like to know this answer! i have installed SL 10.6.1 inside vmware7 final (Win7 host) and it runs, but I don't think 3d is enabled. Gfx running very slow and mouse cursor shows up as a black square inside AppleRemoteDesktop sessions. :P
Link to comment
Share on other sites

Screen Capture Problem

 

This is Apple's handiwork.

  • In OS 10.5, Apple implemented the screen capture by reading the image from the framebuffer, so any IOFramebuffer driver could do it.
  • In OS 10.6, they no longer read the image from the framebuffer. Instead, they use an acceleration feature called a CGSSurface to grab the image. As a result, plain IOFramebuffer drivers (NDRV, VMwareGfx) can't perform the capture anymore. Of course, Apple doesn't care since they have IOAccelerators for all their hardware.

VMsvga2 supports CGSSurfaces in -svga3d mode. The support isn't complete - it's not developed enough to make the capture work. It returns an error midway, which causes the capturer to generate a black image. I've made a checklist item to develop the surface support in VMsvga2 under -svga3d a little more so the capture can succeed. I'm not sure whether I'll implement this capability in 2D mode. I plan to eventually make "-svga3d" the default mode, once the performance problems there have been ironed out.

Anyhow, I don't have an immediate solution for this. You'll have to make do without screen capture in OS 10.6 for now.

 

Oh so that explains it! Thanks for making note of this. That explains why in 10.5.7 I can take screenshots using the certain hotkeys and they work. In 10.6, neither the hotkeys work or the new application(s) I found in the utilities folder, called grab it or something like that. When I had Snow Leopard, pressing the hotkeys would not even make an image file appear on the desktop at all. Nothing would happen. I initially thought they screwed up with SL and the 10.6.1 update fixed it (but I couldn't update since it wasn't a retail install)

 

Anyway I just went back to 10.5.7 because I was having other issues too. Applications that once ran fine would crash.

 

I'm not using vmware though, but even just SL actually running on a machine is the same way.

 

 

How does this driver work? I mean, no matter why kind of a video card you have, this driver will work to provide hardware supported graphics acceleration (in a vmware host of course)? Or do I have the wrong idea?

Link to comment
Share on other sites

  • 2 weeks later...

I've posted VMsvga2 Version 1.2.0.

 

Changelog from 1.1.1 to 1.2.0

  1. Added four more display modes
    • 1920x1080, 1280x960, 1280x768, 1280x720
    • The modelist is now more or less in line with the Windows and Linux guest drivers except for a few odd modes.

[*]VMsvga2 now supports the Screen Capture (Screenshot) feature on OS 10.6.

[*]Added support for the new Screen Object feature of Workstation 7/Fusion 3.

  • The presence of Screen Object obsoletes the "-svga3d" option. With Screen Object, the driver will automagically select the best rendering sequence for each function.
  • For a VMX file with guestOS = "darwin..." the Screen Object feature is on by default.
  • For a VMX file with guestOS = "freebsd...", Screen Object needs to be enabled. Add the following lines to your VMX file
    svga.enableScreenObject = "TRUE"
    svga.enableTracesReg = "TRUE"


[*]Enhanced the support of CGSSurfaces for Apple applications that use them outside the OpenGL framework.

Link to comment
Share on other sites

I've posted VMsvga2 Version 1.2.0.

 

Changelog from 1.1.1 to 1.2.0

  1. Added four more display modes
    • 1920x1080, 1280x960, 1280x768, 1280x720

[*]VMsvga2 now supports the Screen Capture (snapshot) feature on OS 10.6.

[*]Added support for the new Screen Object feature of Workstation 7/Fusion 3.

  • The presence of Screen Object obsoletes the "-svga3d" option. With Screen Object, the driver will automagically select the best rendering sequence for each function.
  • For a VMX file with guestOS = "darwin..." the Screen Object feature is on by default.
  • For a VMX file with guestOS = "freebsd...", Screen Object need to be enabled. Add the following lines to your VMX file
    svga.enableScreenObject = "TRUE"
    svga.enableTracesReg = "TRUE"


[*]Enhanced the support of CGSSurfaces for Apple applications that use them outside of the OpenGL framework.

 

Thanks Zenith, this update improves rendering even more!

Link to comment
Share on other sites

Thanks Zenith, this update improves rendering even more!
The new Screen Object in Workstation 7/Fusion 3 is really great and helps solve all of the problems that existed with SVGA3D.

 

Now if I could only crack Apple's labyrinth of OpenGL drivers.... ;)

Link to comment
Share on other sites

I had a 10.6 installed in VMware 7 on a Win7 x64 host, was working just fine. I installed the new vmsvga driver and my system would no longer boot. I got a bunch of these errors in my vmware log:

Nov 08 15:51:37.019: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:51:37.025: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:51:58.112: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:51:59.996: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:52:13.116: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:52:19.437: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed

I found a solution, it was to enable the following option:4ezyo.png

 

Is this completely normal?

Link to comment
Share on other sites

The new Screen Object in Workstation 7/Fusion 3 is really great and helps solve all of the problems that existed with SVGA3D.

 

Now if I could only crack Apple's labyrinth of OpenGL drivers.... :)

 

Mmm... would that enable qe and ci?

 

Also have you had any luck with your Ensoniq Audio plugin and the slight stuttering issue?

Link to comment
Share on other sites

I had a 10.6 installed in VMware 7 on a Win7 x64 host, was working just fine. I installed the new vmsvga driver and my system would no longer boot. I got a bunch of these errors in my vmware log:

Nov 08 15:51:37.019: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:51:37.025: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:51:58.112: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:51:59.996: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:52:13.116: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed
Nov 08 15:52:19.437: vcpu-0| Guest: IOAC: VRAMRealloc(0, 5242880) failed

I found a solution, it was to enable the following option:4ezyo.png

 

Is this completely normal?

 

I had the same problem with guest 10.6 installed on VMware Workstation 7 on WinXP host, and could not boot either right after install. Your workaround did help on boot, thanks! but then I found I could not switch to the native resolution 1440 x 900 that my monitor supports due to the maximum 1280 x1024 restricted by VMware Display setting.

 

I thought it might be worth to try adding the two lines in vmx file even though my guestOS is configured as darwin10,

 

svga.enableScreenObject = "TRUE"
svga.enableTracesReg = "TRUE

 

With the default VMware Display setting, i.e. "Use host setting for monitors" and "Accelerate 3D graphics" under "3D Graphics", the two lines did the trick! I am able to boot again with native solution supported by the monitor!

 

:-)

 

EDITED: I was meant to say, thanks very much Zenith432! btw, my first post in this community! :-)

 

 

forgot to mention, Preview "Take Screen Shot" still doesn't work for me after 1.2 installed. and Preview could not open either png or jpeg files, but opening pdf files is fine.

Link to comment
Share on other sites

Is this completely normal?
No, it's not. It's a bug, and a pretty serious one. Thanks for pointing this out.

This happens if you're using Screen Object and you have less than the maximum amount of guest vram (128MB).

 

Edit: Bug fixed in VMsvga v1.2.1.

 

In the meantime you can work around it in two ways

 

1) Set the amount of guest vram in the VMX file to 128MB

svga.autodetect = "FALSE"
svga.vramSize = "134217728"

 

2) Disable ScreenObject

svga.enableScreenObject = "FALSE"

This forces the driver to revert back to its 2D mode, which was the default mode before v1.2.0. In 2D mode, the WindowServer doesn't use guest vram outside the framebuffer during its normal operation, so this bug doesn't happen.

Link to comment
Share on other sites

No, it's not. It's a bug, and a pretty serious one. Thanks for pointing this out.

This happens if you're using Screen Object and you have less than the maximum amount of guest vram (128MB).

 

I'll fix this by tomorrow and upload a bugfix.

 

In the meantime you can work around it in two ways

 

1) Set the amount of guest vram in the VMX file to 128MB

svga.autodetect = "FALSE"
svga.vramSize = "134217728"

 

2) Disable ScreenObject

svga.enableScreenObject = "FALSE"

This forces the driver to revert back to its 2D mode, which was the default mode before v1.2.0. In 2D mode, the WindowServer doesn't use guest vram outside the framebuffer during its normal operation, so this bug doesn't happen.

 

Zenith432, FYI, I have Nvidia Quadro 135M which does have 128MB GDDR3 RAM as per TechPower-up GPU-Z, and below is my settings in vmx file. Please note, I did not add in line svga.vramSize = "134217728" manually.

 

svga.autodetect = "TRUE"
svga.vramSize = "134217728"
mks.enable3d = "TRUE"
svga.enableScreenObject = "TRUE"
svga.enableTracesReg = "TRUE"

 

But I guess my 10.6 VM works in 2D mode as you pointed out. is there any way i could confirm whether it is working in 2D mode or not?

Link to comment
Share on other sites

I've uploaded installers for VMsvga2 v1.2.1 that fixes the VRAM size bug discussed above (see links in post #1).

 

Removed VMsvga2 v1.2.0.

 

System Profiler now shows the correct guest VRAM size (before it always showed 128MB.)

 

is there any way i could confirm whether it is working in 2D mode or not?

 

If Screen Object is on, the vmware.log file should contain the following lines

Guest: IOAC: Screen Object On
Guest: IOAC: SVGA3D On, 3D HWVersion == 2.0

Otherwise, it's using 2D mode.

 

Your VMX file looks ok. If you set "svga.autodetect" to true, your "svga.vramSize" setting is ignored. So if you want the "svga.vramSize" setting to matter, you should set "svga.autodetect" to false. I don't know how MKS calculates the vram size in auto-detect mode.

 

The ability to take Screenshots depends on the vram allocator working right, so the vram size problem also prevents that feature from working. Install v1.2.1 and try taking Screenshots. If it still doesn't work, increase your guest vram size.

 

The amount of vram on your host display adapter is not related to the guest vram. The guest vram is not real vram - it's simulated vram carved out of regular system memory.

Link to comment
Share on other sites

Thanks Zenith.. Screenshots now work, but Preview.app still wont display anything because it uses CI/QE I guess to render {censored}.

 

But you can always just use spacebar to preview images. I think it's better than preview.app anyways (bloatware).

 

I also installed the vmmouse for PS2 Voodoo that was bundled with the vmsvgaII package, but it didn't fix the issue I'm having with not being able to control certain apps with the mouse.

I guess it's because of the VMWare integration (a usermode app simulating mouse input as opposed to real hardware messages).

 

EDIT: Currently KeePassX (the binary downloadable from their site) and Vidalia (A GUI for Tor anonymizer network).

 

PS! Also somehow the audio works better now after the VMsvga2 update. Maybe the new display driver doesn't suck as much resources.

 

 

Nov 10 01:11:42.280: vcpu-1| Guest: IOFB: start

Nov 10 01:11:42.288: vcpu-1| Guest: IOAC: start

Nov 10 01:11:42.288: vcpu-1| Guest: IOAC: Screen Object On

Nov 10 01:11:42.288: vcpu-1| Guest: IOAC: SVGA3D On, 3D HWVersion == 2.0

Nov 10 01:11:58.109: vcpu-0| Guest: IOFB: setCursorImage: convertCursorImage() failed 0x0

Link to comment
Share on other sites

 Share

×
×
  • Create New...