virtualbox guest additions cause windows to be invisible when using compiz

Asked by Stephen Wade

Host configuration:
VirtualBox 4.1.4 – Mac OS X 10.7.2

Guest configuration:
Ubuntu 11.10
2 processors – 1 GB RAM
128 MB video memory – 3D acceleration enabled

The VirtualBox guest additions were installed through "Additional Drivers". After rebooting, all the UI is visible including the login screen and the Unity interface, but when any application is opened, its window is invisible.

Notes:
When the virtual machine is logged in with "Ubuntu 2D", I can run "compiz --replace" and get compiz working properly.
The problem occurred on both a VM upgraded from 11.04 to 11.10 and a fresh install of 11.10 (used for screencasts below).
The problem occurred using both the guest additions package from "Additional Drivers" and the guest additions ISO shipped with VirtualBox.

"Ubuntu" video here: http://screencast.com/t/wZIug5RsG3fh
"Ubuntu 2D" video here: http://screencast.com/t/R6LsrTVyIC

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu compiz Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Add a startup item to run: compiz --replace

It will run at startup and be ok.

Revision history for this message
Claudio Satriano (claudiodsf) said :
#2

Same problem here with exactly the same configuration (VirtualBox 4.1.4 – Mac OS X 10.7.2 - 64bit)

The solution proposed by actionparsnip doesn't work for me.

Revision history for this message
Stephen Wade (stephenwade) said :
#3

This doesn't work when logging in with the default mode "Ubuntu".

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

You may need a sleep so that the desktop can load fully. If you run:

gksudo gedit /usr/bin/startcompiz

add these 3 lines:

#!/bin/bash
sleep 10
compiz --replace

Save the new file, close gedit then add a new startup item to run 'startcompiz' remove the startup item you added earlier

Revision history for this message
Stephen Wade (stephenwade) said :
#5

This only works when logging in with "Ubuntu 2D". "compiz --replace" never works when logging in with "Ubuntu".

Revision history for this message
Todd Mostak (tmostak) said :
#6

Add me to the list of victims (VirtualBox 4.1.4 - Mac OS X 10.7.2, 64-bit, with 4GB ram and 2 processors allocated)

Can anyone help?

Revision history for this message
Stephen Wade (stephenwade) said :
#7

I don't have a Windows or Linux host to test this on, but I will do some testing to see if it is related to the number of processors or what video acceleration is turned on. I notice that others are having the same problem with 2 processors enabled.

Revision history for this message
Todd Mostak (tmostak) said :
#8

Computergeeksjw...

Disabling 3d video acceleration in Virtualbox settings solves the problem, and the Unity interface seems to be fine, but I don't have much experience with Ubuntu so I don't know what would be different with video acceleration enabled.

Todd

Revision history for this message
Stephen Wade (stephenwade) said :
#9

Haven't had a lot of time lately, but it does appear that compiz will work in Unity 2D if it is manually started or if a startup item is added. I'll use that on my main Ubuntu VM for now, but I'd still like to figure out why this doesn't work as it should. I'm going to try filing a bug report.

Revision history for this message
Daeld (daeld-daeldia) said :
#10

Messy but useful WORKAROUND:

Log in to Ubuntu (3D) as normal. Open a window. Window is invisible.
Click on Workspace Switcher on the dock. The windows become visible again. Click on the workspace to use the window. (note that the title bar is still invisible if not maximised. If maximised, there will still be some minor problems. Using workspace switcher will fix most of these.

Now this is not a long-term workable solution, but it may help others work in the environment in question and be able to come up with a solution or a better workaround.

Revision history for this message
Daeld (daeld-daeldia) said :
#11

This is OK as a temporary workaround:
Step 1: Login to Unity
Step 2: type Alt-F2 (or fn-alt-F2 on a Mac)
Step 3: type "killall nautilus" (without the ") and press enter (you will now be able to see windows, but don't open any nautilus windows)
Step 4: install pcmanfm (or other file manager either from terminal: "sudo apt-get install pcmanfm" or from Software Centre)
Step 5: open a window with the new file manager and add it to the unity launcher
Step 6: remove the nautilus home folder from the launcher

When you reboot and log in again, you would have to follow steps 2 again, so to prevent that there should be a way to automate the killall nautilus command. However, I tried to just put it in the start-up applications and this killed the gnome session.

Be aware that almost any launching of nautilus will make windows invisible again. The most common reason to use nautilus from there is to use the Trash. For some reason, if pcmanfm is opened, Trash (but not other nautilus windows) will open normally (with nautilus) without making everything else invisible. However, as soon as you open trash without pcmanfm opened, the bug happens again. Also, I was tempted to just uninstall nautilus, but there are a bunch of packages that would also be uninstalled that seemed pretty important, so I left it.

Hopefully someone will come around soon with a proper workaround or fix.

Can you help with this problem?

Provide an answer of your own, or ask Stephen Wade for more information if necessary.

To post a message you must log in.