Wednesday, October 15, 2008

Compiz Fusion: a not recommend configuration

UPDATE: Hooooray!! The border is on after I add the `decoration` plugin to the very last line of /usr/bin/compiz-start. Also I change this file to use `emerald` instead of `gtk-window-decorator` and it works!!!! So I know one thing, can't fully trust `ccsm` and always turn to reliable command line. Oh, if `emerald --replace` has no output, no error, it's probably means it's working. Compiz fusion rocks! Even better if I can have a better video card~



Compiz Fusion is not working perfectly on my gentoo. First of all, no window border. After several days googling, I gave up. A note, if `emerald --replace` or `gtk-window-decorator --replace` is working fine, then that's the compiz configuration problem. My case is that these two commands does nothing, no output, no change, no error. But I can live with that.

Second problem that took me a long time is the configuration. The setting in `ccsm` does not take effect and even cause a compiz segmentation error. Then I used a brute force configuration. Not recommended, only for desperate people.

  1. gain root privilege
  2. use `ccsm` to determine which plugins should be needed, the plugin name can be found in Preferences | plugins list.
  3. modify the last line of /usr/bin/compiz-start, delete "gconf", add all the plugins you want to enable. Backup before change.
  4. modify the corresponding xml files in /usr/compiz to change the behavior, remember to make backup file before change. And be careful.
  5. add all the compiz fusion related packages to package.mask to prevent from any modificaton.
  6. compiz-start and good luck. Check the error output in case the xml format is messed up.


APPENDIX: /etc/X11/xorg.conf
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "aticonfig-Screen[0]" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "TouchPad" "AlwaysCore"
InputDevice "Mouse1" "CorePointer"
EndSection

Section "Files"

FontPath "/home/fonts"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/cyrillic"
FontPath "/usr/share/fonts/wqy-bitmapfont"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/default"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/ttf-bitstream-vera"
FontPath "/usr/share/fonts/corefonts"
FontPath "/usr/share/fonts/zh-kcfonts"
FontPath "/usr/share/fonts/util"
# FontPath "/usr/local/share/fonts"
# FontPath "/usr/X11R6/share/fonts"

EndSection

Section "Module"
Load "freetype"
# Load "xtt"
Load "extmod"
Load "glx"
Load "dri"
Load "dbe"
Load "record"
Load "xtrap"
Load "type1"
Load "speedo"
EndSection

Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Emulate3Buttons"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/input/mice"
EndSection

Section "InputDevice"
Driver "synaptics"
Identifier "TouchPad"
Option "Device" "/dev/input/mouse0"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.09"
Option "MaxSpeed" "0.18"
Option "AccelFactor" "0.0015"
Option "SHMConfig" "on"
EndSection


Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
HorizSync 31.5 - 64.3
VertRefresh 60.0 - 90.0
DisplaySize 331.8 207.3 ## for 15.4", DPI=98
EndSection

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

Section "Device"
Identifier "Card0"
Driver "radeon"
Card "ATI Graphics Xpression"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]"
Driver "fglrx"
# BusID "PCI:2:0:0"
Option "DesktopSetup" "horizontal"
Option "VideoOverlay" "on"
Option "UseFastTLS" "2"
Option "EnablePrivateBackZ" "on"
Option "DynamicClocks" "on"
Option "XAANoOffscreenPixmaps" "true"
Option "TexturedVideo" "On"
Option "DRI" "true"
Option "MonitorLayout" "LVDS,AUTO" #Enable Externel Monitor
EndSection

Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Xvideo" "Enable"
Option "Composite" "Enable" ## critical
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" "1024x640"
EndSubSection
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]"
Device "aticonfig-Device[0]"
Monitor "aticonfig-Monitor[0]"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" "1024x640"
EndSubSection
EndSection

Section "ServerFlags"
# Option "DontVTSwitch" "True" # kills the Ctrl+Alt+F(1-6) virtual terminal switch commands
# Option "DontZap" "True" # kills the Ctrl+Alt+Backspace command
EndSection


No comments: