18 Nov 2008

Common problems running compiz

I will run through the most common problems running COMPIZ with ATI drivers:
  • Try runnign compiz as ROOT
    this may seems stupid, but solved a lot of issues
    $ killall compiz
    $ sudo compiz
    At lest, if it works, you'll know what direction you have to look.

  • “desktop effects could not be enabled”
    if the desktop effects gui will raise this message, try running “compiz” inside a terminal, and see that it tells you.
  • “Checking for Xgl: not present.”
    this message is not a real problem as it may seems, compiz tries other configs, so don't loose time trying to fix it. Go ahead on this guide instead
  • “Another window manager is already running”
    this means exactly what it tells.
    Check inside “System preferences” → “Preferences” → “Sessions” if you have another wm running, for example: XCompMgr.
    In that case, kill it and try compiz again;
    $ killall xcompmgr
    $ sudo compiz
  • compiz white screen
    After reboot, when you login in GDM, your desktop is just a white screen?
    Follow this other POST to get back to a normal desktop.
  • compiz with no window decoration
    Your compiz has no window decoration? no window borders?
    This is mostly caused by compiz don't finding the needed files ...
    Open a termina and:
    $ killall compiz
    $ sudo compiz
    If this solved, you may need to check the System → preferences → Sessions and see what's wrong with the startup script.

  • compiz with no window decoration [2]
    Another possible cause may be the Video Drivers you'r using. Check for the latest version !!! or look for another driver to use with a newer but similar video card to the one you have.

Adding the compiz settings manager

it may be helpful to get the additional settings window available (in case you don't have it):

$ sudo aptitude install compizconfig-settings-manager

- or -

$ yum install ccsm

now, to run the compiz settings manager, go to
“System preferences” → “Preferences” → “Advanced Desktop Effects Settings”

or simply run:
$ ccsm

ATI DRIVER on DEBIAN / UBUNTU / GOS ...

Forget all the old complex installation methods with restricted drivers & xorg.conf modifications ...
Make it simpler!

what you need to make it work is:
  1. First of all: always make a copy of you old xorg.conf file:
    $ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf .myoldconf
  2. install xserver-xgl:
    $ sudo apt-get install xserver-xgl
    You don't have to do anything else to set it up but restarting X (press: Ctrl + Alt + Bksp)
  3. download ati driver from http://ati.amd.com
    for Radeon cards: http://ati.amd.com/support/drivers/linux/linux-radeon.html
  4. install it (selecting all the default options)
    $ sudo sh ati-driver-installer-8-10-x86.x86_64.run
    In case of errors: don't worry, you may just need the kernel headers & gcc compiler. Checkout the log file shown upon compilation failure to see what you need.
    In my case it was:
    • $ sudo apt-get install linux-headers-2.6.24-26-generic (!! check the your kernel version!! by typing $uname-a );
    • $ sudo apt-get install gcc
  5. configure it
    $ sudo aticonfig –initial
  6. restart X server (by pressing CTRL + ALT + BKSP)

In short: follow those steps:

sudo apt-get install xserver-xgl
wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8-11-x86.x86_64.run
sudo sh ati-driver-installer-8-10-x86.x86_64.run
sudo aticonfig –initial


Commands to check if it is well installed:


me@gos:~$ glxinfo | grep direct
direct rendering: Yes

me@gos:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: Radeon X1300/X1550 Series
OpenGL version string: 2.1.8087 Release



Troubleshooting: startx X don't start

in case X server don't start, check the messages in the console after the $startx command.
It will explain you the reason.
In many cases, instead of loosing time, it may be a LOT EASYER to just remove the xorg.conf file.
$ rm /etc/X11/xorg.conf
and let startx use a default config:
$ startx
at this point, take a look inside the file /var/log/Xorg.0.log
you will find some lines similar to those of the xorg.conf syntax.
Finally: copy those lines in a new xorg.cong file and run startx. It should work.


Troubleshooting: Unable to find any supported Screen sections

Your /etc/X11/xorg.conf file has something wrong with the line:

Section “Screen”

or

Section "ServerLayout"
Screen [...]


File example for xorg.conf with ATI drivers:

Section "ServerLayout"
Identifier "Builtin Default Layout"
Screen 0 "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Files"
EndSection

Section "Module"
Load "extmod"
Load "dbe"
Load "glx"
Load "freetype"
Load "record"
Load "dri"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
# !!! set your keyborad layout here !!!
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
Identifier "Builtin Default Monitor"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]-0"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "Builtin Default ati Device 0"
Driver "ati"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]-0"
Driver "fglrx"
BusID "PCI:1:0:0"
EndSection

Section "Screen"
Identifier "Builtin Default ati Screen 0"
Device "Builtin Default ati Device 0"
Monitor "Builtin Default Monitor"
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device "aticonfig-Device[0]-0"
Monitor "aticonfig-Monitor[0]-0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection



Troubleshooting: Unable to find fglrx

If receiving many error messages with STARTX or compiling the ATI DRIVERS ...
even in the case you already installed the fglrx,

then it may be necessary to cleanup you system a little bit:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoclean
sudo apt-get clean

then try running again the 1st script (reinstall the ATI drivers, run ATICONFIG ... and so on)