Compiz and Fullscreen with Windows hosts

Description

When running a Windows 7 host on an early '08 Macbook (Intel GMA X3100 graphics,) I cannot go into fullscreen with compiz enabled. If I do, the guest will continue to respond to the keyboard, but it will not respond to the mouse. If I leave fullscreen, the problem goes away. Also, if I turn off compiz, then I can use the mouse just fine in fullscreen mode.

Change History

I appreciate this is a late reply to this post, and my solution is for the latest version of VirtualBox (4.0.4), however, this hopefully helps other people & hopefully my "solution" isn't too obvious...

With compiz enabled, as above, mouse & keyboard integration are fine and everything works, but when hitting Ctrl-F to get to Fullscreen, mouse does not respond & VBox becomes laggy.

My workaround is simply to load my Ubuntu 10.10 but it is important that it DOES NOT load in fullscreen if compiz is enabled. If you start the guest in windowed mode, let it boot fully into Ubuntu and THEN hit Ctrl-F, you should have full keyboard & mouse functionality. At least I do now, and I've been waiting many years for this!

Unfortunately, the workaround you mentioned doesn't seem to work for me, even if I start non-fullscreen, and then switch to fullscreen after starting Ubuntu, I still have the problem that the guest stops responding to mouse and keyboard. However, I'm using 10.04, not 10.10, so maybe it's on the Ubuntu side.

Running into the same issue on 4.1.4, but a little more info to provide, hopefully this issue is still being tracked.

I'm running Linux Mint 11 Katya, which is based on Ubuntu 11.04.

The full screen issue seems to have something to do either with the primary display or certain resolution levels. On my laptop if I try to full screen on the main display of my Samsung 900x (which has a max resolution of 1366x768) I have the same issue described above. However, if I connect a 26" NEC external monitor as an extended screen (resolution 1920x1200) and set the VM to full screen there then it works just fine.

I have tried adjusting the resolution on my laptop down to slightly lower 16:9 resolutions, but still get the same issue on the primary display. Does VirtualBox need a higher resolution for compiz to work perhaps? And will there eventually be a workaround for this limitation?

Short version:
Turn off auto-resize Guest Display under the VM view menu and add a mode to your xorg.conf with 1 point lower resolution for the width than your native resolution (ie: 1365x768 instead of 1366x768)

Full explanation:

It seems the problem is specifically with 16:9 resolutions like 1366x768. At first I thought something was hanging up when the screen would auto-resize. Because if I turned that off it would still work fine when I turned on full screen (though I would still get decently sized black boarders at the top and bottom because of the resolution that was being taken up by the win7 window bars.

I then noticed once in full screen with "auto-resize the guest display" turned off I could set the resolution within the preferences and it would still work (in this case the highest resolution included by default was 1024x768 - 4:3). So I modified my /etc/X11/xorg.conf to add 1366x768. However, when I set that resolution it caused the same unresponsiveness issue described by the original post. So at random I tried 1350x750, and it worked just fine. Then I tried 1365x768 and that worked fine as well.

I'm not sure why but something about compiz being turned on wants the leeway of that 1 extra pixel on the width of the screen.

In your xorg.conf add the modes line to the screen / display subsection as shown below (replace 1365x768 with a resolution one pixel lower than your native for width).

Hopefully Oracle can figure out the underlying cause of this issue (I'm guessing it's something to do with both Aero and Compiz overlap) or they can simply adjust the auto-resize guest display feature to drop one pixel off automatically when dealing with 16:9 screens so compiz will work properly. But in the meantime, this seems to work well to be able to use 99+% of your screen in full screen mode with compiz working. :-)

I found a little bit simpler workaround to this problem: you could set the guest's max. resolution on host by "VBoxManage setextradata <guest name> GUI/MaxResolution <x,y>"
For example, if your host's native resolution is 1600x900 and the guest's name is UbiGuest, then you can set it on the host:

I tried the work around to set the modes the width to 1 pixel less than the actual width. And it worked for me in fullscreen. However after exiting from full screen the resolution remained at that value. (it did not auto adjust)

Anyway after rummaging through more links online i found out that there are certain workarounds in the compiz settings manager. i was able to find one particular option that solves this problem (Yippie!!)

first you need to install compizconfig-settings-manager using
sudo apt-get install compizconfig-settings-manager.

Then in Preferences->Compizconfig-settings-manager look for Utility. And then 'check' the workaround item. Finally in the settings for the workaround item, look for 'Force fullscreen redraws (buffer swap) on repaint' and check this option. Thats it!