(Editorial note on May 22, 2007 – Since I wrote this article, Beryl had changed quite a bit, even merging with Compiz. I do not know how much of this is still accurate or relevant, so YMMV. When I get more time, I will put together more current instructions…. now, back to the article.)
This took a while – it was easy to get running, and I had none of the problems that seemed to be filling various Beryl forums, but troubleshooting and researching a few last tricky problems was tedious.
My setup before Beryl was:
- Xorg 7.1.1
- Vanilla kernel 188.8.131.52
- NVIDIA-9746 (proprietary driver) with an XFX-6600GT AGP card (128 MB)
- KDE 3.5.5
- Mandriva 2007.1 (Cooker)
- GDM (instead of KDM for the login manager – it just looks and seems to work better)
After getting everything working, my setup is the same.
The links I used to get started were:
- “Install Beryl on Mandriva – Beryl Wiki”
- “SoS Wiki – Beryl Mandriva 2007”
- “Installing Beryl On Mandriva 2007”
- “Beryl – ArchWiki”
I first started by running the following commands to install the needed Beryl components:
- urpmi cgwd
- urpmi beryl-manager
- urpmi -a libbery
(An alternative would be to run “urpmi -a cgwd beryl-“.)
This installed everything called for, all dependencies, and the libberyl-core0-devel package as well (doesn’t hurt, but probably not needed).
I also made sure to turn off all composite effects (shadows and transparency) in KDE (Window Behavior), and turn off KDE Preloading under KDE Performance. You may want to turn off any special themes as well before going further, to ensure there is nothing that can gum up the works later.
I then edited my xorg.conf file (located at /etc/X11/xorg.conf). Here is what the relevant sections now look like:
Load “dbe” # Double-Buffering Extension
Load “v4l” # Video for Linux
# Load “glx” # 3D layer
SubSection “extmod” ## added for beryl
Option “omit xfree86-dga” # don’t initialise the DGA extension ## added for beryl
EndSubSection ## added for beryl
VendorName “nVidia Corp.”
BoardName “NVIDIA GeForce FX (generic)”
Option “RenderAccel” “True”
Option “AllowGLXWithComposite” “true”
Option “Rotate” “off”
Option “DisableGLXRootClipping” “true” ## added for beryl
Option “BackStoring” “True” ## added for beryl
Option “TripleBuffer” “True” ## added for beryl
Option “AddARGBGLXVisuals” “True” ## added for beryl
Option “Composite” “Enable”
Option “RENDER” “Enable” ## added for beryl
Note that this doesn’t completely agree with some of the instructions on the above links, but no change in functionality or stability was encountered by having an option in the “Device” section as opposed to the “Screen” section. I tried both, and ended up here, as other links I researched _did_ call for this.
I next had to edit /etc/sysconfig/compiz:
COMPIZ = no
XGL = no
and finally /etc/sysconfig/compositing-wm:
# COMPOSITING_WM_START values:
# yes: start compositing window manager on session start
# auto: start compositing window manager on session start
# if Xgl is started
# or if direct rendering and GLX_EXT_texture_from_pixmap are available
# no: do not start compositing window manager on session start
# if COMPOSITING_WM is not empty, it overrides the default compositing
# window manager (which is compiz)
# if COMPOSITING_WM_ARGS is defined, it is used as
# arguments for the compositing window manager
COMPOSITING_WM_ARGS=”–indirect-rendering –replace –use-tfp”
# if COMPOSITING_WINDOW_DECORATOR is defined, it overrides the default
# window decorator, the specified program will be run after
# compositing window manager
After restarting X (“init 3” followed by “init 5” as root at a console tty), I logged in and got the KDE splash, followed by the Beryl splash overlaid on it. The desktop came up and just looked fantastic as things zipped in (two superkaramba themes, yakuake, and gkrellm are running by default). Windows wobbled. Drop shadows and translucency worked. and CPU usage was *way* down from before, when I had been using shadows and transparency from within KDE (Window Behavior) via Composite.
The screen saver worked, GoogleEarth worked, everything seemed great. So I used “Switch User” from the KMenu, selected “Start New Session”, and logged into my wife’s desktop. Beryl worked there too (she is also running some superkaramba themes). Her screen saver worked too. Things were going great, right up until I switched back to my desktop session. No matter how I did it (CTRL-ALT-F7, ALT-F7, Switch User from KMenu or from the screensaver), all I got was a black screen with my cursor on it.
Sometimes the keyboard still worked, and I suspected that KDE was still running, I just couldn’t see it. Switching back and forth between desktop0 and desktop1 would usually cause the keyboard to lock, and I would have to use CTRL-ALT-SysRq-R to switch over to tty1 (CTRL-ALT-F1) and as root, type “init 3” then “init 5” to restart X and get back to the GDM login manager. Of course, session changes made in the desktops were lost. I also discovered that logging into just one desktop and switching to tty1 would also cause this behavior when attempting to switch back (CTRL-ALT-F1, then CTRL-ALT-F7). Black screen, only a cursor (which I could move around in vain), nothing else.
This really really sucked, because we always use the computer in this way, both of us logged into our desktops, and yet in 10 minutes of playing around with Beryl, I was thoroughly addicted. I did *not* want to go back.
I noticed that when starting the beryl-manager (from the “Run Command..” dialog instead of xterm as one link recommended), my desktop flashed black for a second, and anything I then opened had no window borders or decorations (such as the minimize/maximize/close buttons). Additionally, I was unable to select Beryl as my window manager – it was set to “Compiz with COW” instead. After closing beryl-manager, I would have to log out and log back in before things came back to normal, with any changes made in beryl-manager being applied at that time.
Some digging turned up that when running Beryl, it uses .beryl-managerrc and .beryl/, both located in $HOME. I “deleted” (renamed) both after logging out, logged back in, and a new file and folder were created, clearing up all the beryl-manager issues I had been having. Guess the .beryl folder contents got screwed up at some point.
Now, back to the problem of the black screen when switching back to a desktop session. Researching more finally got me to a site that said it was a known fault with NVIDIA drivers in the 96 series or higher, so I backed down to the 8776 driver. No luck, same problem, no change. Xorg.conf changes made no difference. I further read about removing the NVIDIA drivers, and using the PLF drivers instead (installed via urpmi). I have always had better results with the NVIDIA drivers than with the PLF urpmi drivers, so I did not try this.
Turns out the solution was in beryl-manager. Opening Beryl Settings Manager, selecting General Options in the left menu, and unchecking Sync to VBlank (which was checked by default), fixed it. After restarting X, I was able to switch between desktop sessions and tty sessions, with and without screen savers running. I upgraded to the 9746 NVIDIA driver, and everything still worked fine.
I did find out while playing around with screen savers that some non-GL screen savers in Mandriva can cause the desktop to lock up and spike the CPU, even when previewed in the configuration dialog. I selected non-GL, safe screensavers for both of us to avoid tempting fate with Beryl running. It is really cool, but somewhat quirky at times, and I have had Firefox lock up one time (so hard that I thought the magic keys weren’t going to work – I ended up doing a s-u-b reboot on that one). This happened on the 8776 NVIDIA driver – not sure if that had anything to do with it.
That hasn’t happened since, and I am rotating desktops and having a pretty good time playing around with this. I have seen and used Aero in Windows Vista, and it does not even compare to Beryl. Also, since using Beryl, glxgears now run at 2400 FPS. Before, if I used shadows and translucency, it would drop to 700 FPS or lower.
The only thing I miss is having different wallpapers on different desktops. Beryl treats all desktops as part of one desktop, so only one wallpaper image is shown. I have read about a Compiz plugin that gets around this (same in Compiz) and allows you to have a different wallpaper for each desktop, but haven’t seen anything for Beryl. Also, dragging open windows from the taskbar to the pager to move something to another desktop is gone – same for sending an app to a different desktop. If you open an app in a different desktop, it stays – clicking on it in the taskbar rotates the desktop into view.
Oh well, if this is the trade-off, I can live with it.
Hope this helps somebody out there.