From owner-svn-doc-head@FreeBSD.ORG Sat Apr 4 21:28:29 2015 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85994F6; Sat, 4 Apr 2015 21:28:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66916DF7; Sat, 4 Apr 2015 21:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t34LSSSM075898; Sat, 4 Apr 2015 21:28:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t34LSS2S075897; Sat, 4 Apr 2015 21:28:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504042128.t34LSS2S075897@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 4 Apr 2015 21:28:28 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r46462 - head/en_US.ISO8859-1/books/handbook/x11 X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2015 21:28:29 -0000 Author: eadler Date: Sat Apr 4 21:28:28 2015 New Revision: 46462 URL: https://svnweb.freebsd.org/changeset/doc/46462 Log: handbook: migrate compiz fusion article The compiz fusion article previously duplicated portions of the handbook in an effort to be complete. In addition, there was no reference from the handbook so it was often forgotten. By moving the article into the handbook, the article can be simplified, text removed, and cross references can be added. In addition, adding nice effects is a common enough task and isn't too technical that it could be combined with the handbook. As a part of the migration, reduce the focus on requiring an nVidia driver. Modified: head/en_US.ISO8859-1/books/handbook/x11/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/x11/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/x11/chapter.xml Sat Apr 4 13:42:45 2015 (r46461) +++ head/en_US.ISO8859-1/books/handbook/x11/chapter.xml Sat Apr 4 21:28:28 2015 (r46462) @@ -1239,6 +1239,198 @@ DisplayManager.requestPort: 0 + + Installing Compiz Fusion + + One way to increase the pleasantness of using a desktop + computer is by having nice 3D effects. + + Installing the Compiz Fusion + package is easy, but configuring it requires a few steps that + are not described in the port's documentation. + + + Setting up the &os; nVidia driver + + Desktop effects can cause quite a load on the graphics card. + For an an nVidia-based graphics card, the proprietary driver + is required for good performance. Users of other graphics + cards can skip this section and continue with the + xorg.conf configuration. + + + To determine which nVidia driveris needed see the FAQ question + on the subject. + + + Having determined the correct driver to use for your card, + installation is as simple as installing any other package. + + For example, to install the latest driver: + + &prompt.root; pkg install x11/nvidia-driver + + The driver will create a kernel module, which needs to be loaded + at system startup. Add the following line to + /boot/loader.conf: + + nvidia_load="YES" + + + To immediately load the kernel module into the + running kernel by issuing a command like + kldload nvidia, however it has been noted that + the some versions of &xorg; will not + function properly if the driver is not loaded at boot time. After + editing /boot/loader.conf, a reboot is + recommended. + + + With the kernel module loaded, you normally only need to change + a single line in your xorg.conf file to enable + the proprietary driver: + + Find the following line in + /etc/X11/xorg.conf: + + Driver "nv" + + and change it to: + + Driver "nvidia" + + Start the GUI as usual, and you should be greeted by the + nVidia splash. Everything should work as usual. + + + + Configuring xorg.conf for desktop effects + + To enable Compiz Fusion, + /etc/X11/xorg.conf needs to be + modified: + + Add the following section to enable composite effects: + + Section "Extensions" + Option "Composite" "Enable" + EndSection + + Locate the Screen section which should look similar + to the one below: + + Section "Screen" + Identifier "Screen0" + Device "Card0" + Monitor "Monitor0" + ... + + and add the following two lines (after Monitor will + do): + + DefaultDepth 24 + Option "AddARGBGLXVisuals" "True" + + Locate the Subsection that refers to the + screen resolution that you wish to use. For example, if you wish to + use 1280x1024, locate the section that follows. If the desired + resolution does not appear in any subsection, you may add the relevant + entry by hand: + + SubSection "Display" + Viewport 0 0 + Modes "1280x1024" + EndSubSection + + A color depth of 24 bits is needed for desktop composition, + change the above subsection to: + + SubSection "Display" + Viewport 0 0 + Depth 24 + Modes "1280x1024" + EndSubSection + + Finally, confirm that the glx and + extmod modules are loaded in the Module + section: + + Section "Module" + Load "extmod" + Load "glx" + ... + + The preceding can be done automatically with + x11/nvidia-xconfig by running (as + root): + + &prompt.root; nvidia-xconfig --add-argb-glx-visuals + &prompt.root; nvidia-xconfig --composite + &prompt.root; nvidia-xconfig --depth=24 + + + + Installing and configuring Compiz Fusion + + Installing Compiz Fusion + is as simple as any other package: + + &prompt.root; pkg install x11-wm/compiz-fusion + + When the installation is finished, start your graphic desktop and + at a terminal, enter the following commands (as a normal user): + + &prompt.user; compiz --replace --sm-disable --ignore-desktop-hints ccp & + &prompt.user; emerald --replace & + + Your screen will flicker for a few seconds, as your window manager + (e.g. Metacity if you are using + GNOME) is replaced by + Compiz Fusion. + Emerald takes care of the window + decorations (i.e. close, minimize, maximize buttons, title bars + and so on). + + You may convert this to a trivial script and have it run at + startup automatically (e.g. by adding to Sessions in + a GNOME desktop): + + #! /bin/sh + compiz --replace --sm-disable --ignore-desktop-hints ccp & + emerald --replace & + + Save this in your home directory as, for example, + start-compiz and make it executable: + + &prompt.user; chmod +x ~/start-compiz + + Then use the GUI to add it to + Startup Programs + (located in System, + Preferences, + Sessions on a + GNOME desktop). + + To actually select all the desired effects and their settings, + execute (again as a normal user) the + Compiz Config Settings Manager: + + &prompt.user; ccsm + + + In GNOME, this can also be found in + the System, + Preferences menu. + + + If you have selected gconf support during the build, + you will also be able to view these settings using + gconf-editor under apps/compiz. + + + + + Troubleshooting @@ -1520,5 +1712,52 @@ EndSection Now having completed these simple editing steps, X should start on your new widescreen monitor. - - + + + Troubleshooting Compiz Fusion + + + + + I have installed + Compiz Fusion, + and after running the commands you mention, my windows are left + without title bars and buttons. What is wrong? + + + + You are probably missing a setting in + /etc/X11/xorg.conf. Review this file + carefully and check especially the DefaultDepth + and AddARGBGLXVisuals directives. + + + + + + When I run the command to start + Compiz Fusion, the X server + crashes and I am back at the console. What is wrong? + + + + If you check your /var/log/Xorg.0.log + file, you will probably find error messages during the X + startup. The most common would be: + + (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X + (EE) NVIDIA(0): log file that the GLX module has been loaded in your X + (EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If + (EE) NVIDIA(0): you continue to encounter problems, Please try + (EE) NVIDIA(0): reinstalling the NVIDIA driver. + + This is usually the case when you upgrade + &xorg;. You will need to reinstall the + x11/nvidia-driver package so + glx is built again. + + + + + +