Monday, June 4, 2007

Ubuntu 7: No window borders on Desktop Effects

Ubuntu 7 is great, but with it's own truck load of bugs. One common bug (I am not sure whether it's bug, but it happens to lot of people out there) is that you loose your window borders once you enable desktop effects or your system just won't start in X the next time you re-start your System.

I have faced the above mentioned both problems on two different occasions and this is what I have done to overcome it. I have made it into two scenarios for i) No window border but having X-Windows and ii) No X-Windows at all.

Scenario # 1
If you are stuck in text mode after enabling desktop effects with the following error messages in nVIDIA card machine,
Error: API mismatch: the NVIDIA kernel module has the version 1.0-7184, butthis client has the version 1.0-9631. Please make sure that the kernelmodule and all NVIDIA driver components have the same version.
The reason-----------When the script /sbin/lrm-manager (executed by upstart during boot on /etc/rcS.d/S07linux-restricted-modules-common) loads kernel modules, it loads all so nvidia, nvidia_legacy, nvidia_new will be loaded, respectively. So after loading nvidia, loading nvidia_legacy and nvidia_new has no effect. Essentially, loading them all is not appropriate.
try the following:
edit /etc/default/linux-restricted-modules-common
sudo vi /etc/default/linux-restricted-modules-common

move to the section where it says

DISABLED_MODULES=""

add add the below between the quotes. To append text in vi editor keep the cursor in the first double quote, press Escape and then hit 'a' which will enable you to append text in the position next to cursor .

Now type nvidia nvidia_legacy between the quotes.

(it should appear like this: DISABLED_MODULES="nvidia nvidia_legacy" )

Press Escape, hit : and type w to save the changes. To quit the editor, hit Escape, : and then type q.

Now type startx, it should do the magic.

Scenario # 2
You have the GUI, but there is no window title bar, borders and the terminal appears blank. Try the following:

1. Try changing DefaultDepth to 24 in the ' Screen ' section.
2. Delete, if existing, these entries in ' Section "Module" ' :
Load "dri"Load "GLCore"
3. Add this entry in ' Section "Module" ' :
Load "glx"
4. Change in Section "Device" the ' Driver "nv" ' entry to :
Driver "nvidia"
5. Add this entry in ' Section "Screen" ' :
Option "AddARGBGLXVisuals" "True"
6. Add this section at the end of the file:
Section "Extensions"

Option "Composite" "Enable"

EndSection

This should do the magic probably. Don't forget to install Nvidia/ATI graphic card drivers before you try these.

Adios.