Monday, August 20, 2007

AIGLX + Compiz Fusion on MacBook

Install AIGLX. Following the instructions for setting up AIGLX, I did the following.
  1. Edit /etc/X11/xorg.conf file as suggested in the above instructions. My xorg.conf file is below.
  2. Restart the X server with '/etc/init.d/gdm restart'.
    # /etc/X11/xorg.conf (xorg X Window System server configuration file)
    #
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    #
    # Edit this file with caution, and see the xorg.conf(5) manual page.
    # (Type "man xorg.conf" at the shell prompt.)
    #
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    #
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    # sudo dpkg-reconfigure -phigh xserver-xorg

    Section "Files"
    FontPath "/usr/share/fonts/X11/misc"
    FontPath "/usr/share/fonts/X11/cyrillic"
    FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/Type1"
    FontPath "/usr/share/fonts/X11/100dpi"
    FontPath "/usr/share/fonts/X11/75dpi"
    # path to defoma fonts
    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    EndSection

    Section "Module"
    Load "i2c"
    Load "bitmap"
    Load "ddc"
    Load "dri"
    Load "extmod"
    Load "freetype"
    Load "glx"
    Load "int10"
    Load "vbe"
    Load "dbe"
    EndSection

    Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    EndSection

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

    Section "InputDevice"
    Identifier "Synaptics Touchpad"
    Driver "synaptics"
    Option "SendCoreEvents" "true"
    Option "Device" "/dev/psaux"
    Option "Protocol" "auto-dev"
    Option "HorizScrollDelta" "0"
    Option "SHMConfig" "on"
    EndSection

    Section "InputDevice"
    Identifier "MacBook Touchpad"
    Driver "synaptics"
    Option "AccelFactor" "0.015"
    Option "BottomEdge" "310"
    Option "Device" "/dev/psaux"
    Option "FingerHigh" "30"
    Option "FingerLow" "20"
    Option "HorizScrollDelta" "0"
    Option "LeftEdge" "100"
    Option "MaxDoubleTapTime" "180"
    Option "MaxSpeed" "0.88"
    Option "MaxTapMove" "220"
    Option "MaxTapTime" "150"
    Option "MinSpeed" "0.79"
    Option "Protocol" "auto-dev"
    Option "RightEdge" "1120"
    Option "SendCoreEvents" "true"
    Option "SHMConfig" "on"
    Option "TapButton2" "3"
    Option "TapButton3" "2"
    Option "TopEdge" "50"
    Option "VertScrollDelta" "25"
    Option "VertTwoFingerScroll" "true"
    EndSection


    Section "InputDevice"
    Driver "wacom"
    Identifier "stylus"
    Option "Device" "/dev/input/wacom"
    Option "Type" "stylus"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "InputDevice"
    Driver "wacom"
    Identifier "eraser"
    Option "Device" "/dev/input/wacom"
    Option "Type" "eraser"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "InputDevice"
    Driver "wacom"
    Identifier "cursor"
    Option "Device" "/dev/input/wacom"
    Option "Type" "cursor"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "Device"
    Identifier "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
    Driver "i810"
    Option "XAANoOffscreenPixmaps"
    BusID "PCI:0:2:0"
    EndSection

    Section "Monitor"
    Identifier "Generic Monitor"
    Option "DPMS"
    HorizSync 28-64
    VertRefresh 43-60
    EndSection

    Section "Screen"
    Identifier "Default Screen"
    Device "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
    Monitor "Generic Monitor"
    DefaultDepth 24
    SubSection "Display"
    Depth 1
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 4
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 8
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 15
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 16
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 24
    Modes "1280x800"
    EndSubSection
    EndSection

    Section "ServerLayout"
    Identifier "Default Layout"
    Screen "Default Screen"
    InputDevice "Generic Keyboard"
    InputDevice "Configured Mouse"
    InputDevice "stylus" "SendCoreEvents"
    InputDevice "cursor" "SendCoreEvents"
    InputDevice "eraser" "SendCoreEvents"
    # InputDevice "Synaptics Touchpad"
    InputDevice "MacBook Touchpad"
    Option "AIGLX" "true"
    EndSection

    Section "DRI"
    Mode 0666
    EndSection

    Section "Extensions"
    Option "Composite" "Enable"
    EndSection


Un-install Beryl, Compiz, Emerald, etc.
apt-get remove compiz-core desktop-effects
apt-get remove beryl-ubuntu beryl-manager emerald
Install Compiz Fusion.
  1. Add repositories.
    deb http://download.tuxfamily.org/3v1deb feisty eyecandy
    deb-src http://download.tuxfamily.org/3v1deb feisty eyecandy
  2. Import key.
    wget http://download.tuxfamily.org/3v1deb/DD800CD9.gpg -O - | sudo apt-key add -
  3. Install Compiz Fusion.
    apt-get update
    apt-get install compiz compizconfig-settings-manager compiz-plugins compiz-gnome compiz-fusion-plugins-extra compiz-fusion-plugins-unofficial libcompizconfig-backend-gconf
    apt-get install sexy-python
    apt-get upgrade
  4. [Optional] Test.
  5. compiz --replace
  6. Setup with the Compiz Config Settings Manager.
    ccsm
  7. Add compiz to AutoStarted Programs.
  8. Restart the X server with '/etc/init.d/gdm restart'.