If you need to fix this as soon as possible, you might want to skip to the end ("Treat it as a Unity/Compiz problem."). But, as explained there, I recommend performing the other troubleshooting steps and possible solutions first.
Check if the correct kernel is running.
Check that you're actually running the latest version of the kernel by running the command:
That will give you the version you are running now. If it's wrong, make sure the correct version is being selected in the GRUB menu (by shutting down and rebooting, and selecting it manually). If it's not available, make sure it's really installed.
You can use
apt-cache policy X to check if
X is installed and what versions of
X are available.
You can list installed packages related to the linux kernel with:
dpkg -l | grep linux-
Working around the problem, until it is solved (so you can fix it):
To run commands and use the machine while working on fixing this problem, you can work around the problem by installing the gnome-session-fallback package and selecting GNOME Classic or GNOME Classic (no effects) on the login screen.
If the current UI problem prevents you from installing that graphically or in a Terminal window, then you can switch to a virtual console to install it. To do that, press Ctrl+Alt+F1. Then log in and install it the same way you would in a Terminal window, by running:
sudo apt-get update && sudo apt-get install gnome-session-fallback
Alt+F7 brings you back to the GUI.
If your Ubuntu system is configured to log you in automatically, and you cannot access the Log Off option from the session indicator (which is part of the top panel), then you can log out by opening a Terminal window (Ctrl+Alt+T) and running the command:
If you can open a graphical Terminal window, then from the virtual console you can try running
sudo restart lightdm, but that will probably just start a new automatic login for you. Therefore, it may be necessary (in the virtual console) to run
cat /etc/lightdm/lightdm/conf to verify that automatic login is configured through
lightdm.conf (it will look like this), then temporarily disable it by renaming the file so it is not used:
mv /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.old
sudo restart lightdm should give you a login screen.
Check your video drivers.
Assuming you're running the latest version of the kernel, make sure you're running the right video drivers. If you installed your video drivers through Additional Drivers (or didn't manually install video drivers, or don't remember doing so), go there. In a GNOME Classic session, you should be able to find Additional Drivers in Applications > Preferences.
Or you can run Additional Drivers manually:
- In Ubuntu 12.04 and earlier, run the command
gksu jockey-gtk from a GUI Terminal window (Ctrl+Alt+F2), or from the Run... text box (Alt+F2).
- In Ubuntu 12.10 and later, open Software Sources (
gksu software-properties-gtk) and go to the Additional Drivers tab.
(In both cases, I only recommend running the command with
gksu in your particular situation, in case the window management problems you're experiencing get in the way of authenticating with PolicyKit. Ordinarily, you can just run
software-properties-gtk, then when you want to make a change that requires administrative power, you're automatically prompted for your password. PolicyKit spawns an ordinary window for authentication, whereas running
gksu manually should produce a full-screen, foreground dialog box that displays reasonably correctly even when the window manager is not working properly.)
If you installed your video drivers in some other way, you may need to do it again, to reinstall them.
- This may have the effect of reinstalling them, or of reconfiguring them so they work again.
Treat it as a Unity/Compiz problem.
If none of the above helps--and there's a substantial likelihood that it will not--then the problem is mostly likely in Compiz, and you can fix it with the solutions given for this related problem:
I understand that problem is different from what you're experiencing, in that you are able to get windows to appear (they just don't have their borders, which include their title bars). However, Compiz is what provides those borders and title bars, as well as what provides Unity with the ability to show its user interface elements. (Unity is a Nux plugin, so it uses Compiz to display everything, not just discrete window borders.)
If you like, you might try this first. But I recommend doing the above troubleshooting first, because if you skip to this, you might fix the symptom while leaving the underlying cause unaddressed. (For example, if your video drivers are not working properly, that can cause problems with Compiz, but might cause future performance or stability problems even after this specific Compiz-related problem is solved.)