Beryl Tip – Desktop Octagon

Everyone seems to associate beryl with a 3D rotating cube.  Well, try this in beryl-settings-manager:

  • General Options menu, General Options – change Horizontal Virtual Size to 8.
  • Desktop menu, Rotate Cube – increase the Zoom setting (mine is around 14).
  • Visual Effects menu, 3D Effects – check “Draw backsides of windows” under Advanced.
  • Visual Effects menu, 3D Effects – check “Enable window depth”
  • Play around with the various acceleration, time-step, speed interval, and transparency settings.
  • Add skycaps and a skydome, and turn on rotating with mouse wheel.

You will end up with transparent rotating desktop octagon or other other polygonal desktop (past 10 really looks busy) with pop-out 3D application windows that float over the desktop – looks even more impressive than a rotating cube.  All rotating in your skydome backdrop image.

Beryl just rules.

Beryl Performance Tip – Beryl/Compiz Consumes CPU

I thought I would put in a quick observation about CPU utilization under Beryl (which I assume would be similar for Compiz, maybe incorrectly). As I was wandering through my blog stats, I saw a search entry on “compiz consumes CPU”, so here is my experience in improving graphics performance under beryl:

  • Turn off mipmaps.

I updated my system about a couple of weeks ago, and in playing around with the settings for beryl, I decided to try mipmaps. My graphics performance really seemed to take a hit, which translated into a large jump in CPU utilization. I confirmed this when running “glxgears” from konsole. The frame rate was horrible (using an nvidia 7600 GS card, no less) and CPU load was over 90%. After disabling mipmaps in beryl-settings-manager (there are quite a few places where they can be enabled or disabled), frame rates jumped from the low hundreds back to well over 2000 fps and CPU usage dropped to under 15%.  Nothing else made such a substantial difference.

Additionally, the level of detail I saw with mipmaps enabled was not readily obvious compared to when they were disabled. So, if your beryl (and maybe compiz) is dogging your graphics when you are sure it shouldn’t, uncheck those mipmap boxes first and see if things don’t improve. By the way, the settings affecting 3d, while seemingly the best place to start when dealing with performance issues, did not make nearly the same difference that disabling mipmaps did – so disable those 3d settings only if you are still not happy with performance. By that time, it might be wise to either look at getting a new card, or stopping the X server and reinstalling your video driver.

Hope this helps!

More Good Beryl Info….

I found this blog, and and since most of the visitors here are looking for information on Beryl, thought I would post a link to his archived beryl articles. They look quite useful and informative, as does the rest of his site.

Check it out at:

The Nameless One’s Beryl Archive…

Installing Beryl on Mandriva 2007…

(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
  • 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:

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:

Section “Module”
Load “dbe” # Double-Buffering Extension
Load “v4l” # Video for Linux
Load “extmod”
Load “type1”
Load “freetype”
# Load “glx” # 3D layer
Load “/usr/lib/xorg/modules/extensions/”
SubSection “extmod” ## added for beryl
Option “omit xfree86-dga” # don’t initialise the DGA extension ## added for beryl
EndSubSection ## added for beryl

Section “Device”
Identifier “device1”
VendorName “nVidia Corp.”
BoardName “NVIDIA GeForce FX (generic)”
Driver “nvidia”
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

Section “Extensions”
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:


and /etc/sysconfig/xgl:

XGL = no

and finally /etc/sysconfig/compositing-wm:

# 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.