Transparency

From Fluxbox-wiki

Jump to: navigation, search

Alright people. Here's the HOWTO/tutorial/guide in making xcompmgr work. It's a bit of work-in-progress as the utility (and it's libs in x) are still in active developement (beta-phase, I believe) so with everything else there's no warrent on the things suggested here.

WARNING: These steps render true transparency with your X engine but can REALLY slow down your computer. Remember that this is nothing but eyecandy.

The steps

Install xcompmgr. Should be available on your local port/package distribution system(apt, emerge, ports, whatever), or from: http://freedesktop.org/xapps/release/xcompmgr-1.1.1.tar.gz.

Install transset(-df); get it while it's hot, from: http://forchheimer.se/transset-df/transset-df-4.tar.gz

Run this in an xterm to see if you need to enable both extensions:

 xdpyinfo | grep -i "render\|composite"

Add the following lines to /etc/X11/xorg.conf:

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

It's worth mentioning, that both RENDER and Composite extentions are still in early testing. However, I have succesfully used them for a longer period of time without them causing any damage, so hopefully yours should be fine as well.

Restart X completely (zap(ctrl-alt-backspace) your xdisplay and start it manually again). It should be working now, however if you want to check you can search your /var/log/Xorg.0.log for an entry like this: "(II) Initializing built-in extension COMPOSITE" - This means that the composite extention, which is what you need, has been loaded properly. If not, X may not even start, and thus you have to start troubleshooting (check for correct version first, only xrg 6.8RC4 and beyond supports the composite extention).

Now that you have xorg running with your composite extention, you should learn how to use the features. xcompmgr is started by the following command directly from a terminal inside x:

       xcompmgr -c &

Please note that other features are available for xcompmgr. Explore them with xcompmgr -h - or if you have the manpages, look at them.

Then, you start up an application like you normally would and see the shadows that the composite extention allows. It's neat, no? Now you want to set your transparency which is done in 10th of percentage; logic should be appearant. Type in the following command and hit enter:

       transset-df 0.6

Now click the application you want to be transparent. Please note, that since this is true transparency, not all text will be readable depending on your choice of background.

So, it's working.. But it's running SLOW(!) and it's hogging ressources, right? Yes, sure it is. The way to fix this, is to enable a few features in your xorg config. I'll guide you through it, step for step though. For nvidia cards (running the nvidia drivers with hardware accelleration, not the built-in drivers), add:

       Option        "RenderAccel" "true"

nvidia binary drivers accelerate the RENDER extension in hardware by default so if you use them you don't need this option (appendix-d of the nvidia docs).

And for ati cards (again running the ati drivers with hardware accelleration, not the built-in drivers) add:

       Option        "backingstore" "true"

Both of these cards also have a second optimizing feature which should apply for both:

       Option        "AllowGLXWithComposite" "true"

Note: In the NVidia 8762 driver README it states that AllowGLXWithComposite shouldn't be set for X.org servers >= 6.9.0 because NVidia's GLX works correctly with those servers when Composite is on.

All of these (the optimization features) goes into the device section (eg. where you actually define the driver of the video card; use the editors search feature to search for driver, and you should find it)! Please, do not put it anywhere else, or it will fail! There. The RENDER extention, plus the optimization features should make it run almost flawlessly.

So, there you have it.. A little tutorial on making everything truly transparent in xorg 6.8RC4 and beyond.

Benchmarking xcompmgr

It was suggested to me by a fellow ircer that I'd gather some information about how well xcompmgr works with what drivers/cards people have running. Therefore, I'd like to ask anyone that follows this guide to login and submit their results. I'll have to figure out a way of timing it first, so until then please just leave a note saying how well it went and an approximate benchmark of how xcompmgr runs with the above setting (being 'xcompmgr -c &'). Thanks in advance.

Personal tools
Google Ads