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!

Mandriva Upgrade and NVIDIA-Linux-x86-1.0-9755…

I upgraded via urpmi again (still running Cooker – I know, I’m nuts, but I love it). After doing a “gdm-stop” in tty1 and re-running as root (because these upgrades usually change enough stuff that the nvidia driver feels it and stops accelerating), the installer dutifully complained that it appeared to have been altered, I pressed on, and it completed without much more drama.

So I test by typing “X”.

And I get the “(EE) Failed to load module “nvidia” (module not found)”, or words to that effect. So I tinkered with the /etc/X11/xorg.conf file for a little bit (no dice), ran “less /var/log/Xorg.0.log | grep EE” (nothing new), and logged into tty2 and fired up lynx. I could have changed the driver in /etc/X11/xorg.conf from “nvidia” to “nv” , started gdm, and surfed that way, but I run Cooker – I *like* pain.

Actually, it is a lot easier to use lynx in another tty than comment out all the beryl-glx-other stuff in my xorg.conf file. Going to google, I soon found the answer and uninstalled the nvidia driver with “ –uninstall”.

I then reinstalled with “ –x-prefix=/usr –x-module-path=/usr/lib/xorg/modules”, tested with “X”, and got the NVIDIA logo and X with no errors. I then was able to fire up gdm, no problem.

Thanks to dive on – thread is posted HERE.

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.

Hot keys….

Here is a list of hot keys I use, and what they mean (some are application-specific):

  • CTRL+ALT+BACKSPACE :: Kills the xserver and restarts it – useful if your desktop session just craps its pants and freezes up.
  • CTRL+ALT+F1…F6 :: Switches between console virtual terminals, supporting multiple logins at once – useful for when you are doing multiple things as root when you do not want to use a GUI.
  • CTRL+ALT+F7…F11 :: Switches between multiple GUI sessions – sustains having multiple folks locally logged into their desktops at the same time, great for family PCs.
  • CTRL+ALT+F12 :: Real-time kernel logs – watch ’em scroll by.
  • CTRL+<plus> :: Enlarges font size in Firefox/Mozilla.
  • CTRL+<minus> :: Reduces font size in Firefox/Mozilla.
  • CTRL+ALT+<plus> :: Increases X resolution.
  • CTRL+ALT+<minus> :: Decreases X resolution.
  • CTRL+ESC :: Starts KSystem Guard in KDE -shows the process table (similar to Task Manager in Windows).
  • ALT+TAB :: Tab through running apps, same as in Windows.
  • ALT+1..x :: Switch through tabs in Firefox/Mozilla.
  • CTRL+F1…F12 :: Switch through desktops in KDE.
  • CTRL+C :: Copy – same as in Windows.
  • CTRL+X :: Cut – same as in Windows.
  • CTRL+V :: Paste – same as in Windows.
  • CTRL+Z :: Undo – same as in Windows.
  • CTRL+Y :: Redo – same as in Windows.
  • CTRL+N :: New – same as in Windows.
  • CTRL+S :: Save – same as in Windows.
  • CTRL+A :: Select all – same as in Windows.
  • CTRL+C :: Stop a command or program running at a command line.
  • CTRL+T :: Make a new tab in Firefox/Mozilla.
  • CTRL+M :: Manage your bookmarks in Firefox/Mozilla.

And now for some MAGIC KEYS (only work if they are compiled into the kernel, but real life-savers)…

  • CTRL+ALT+SYSRQ+R :: Sets keyboard from raw mode to XLATE – very useful if your system locks out the keyboard.
  • CTRL+ALT+SYSRQ+S :: Disk sync.
  • CTRL+ALT+SYSRQ+E :: Kills all non-essential processes – doing this will nuke X, but may allo you to get to a console on F1 and reboot gracefully.
  • CTRL+ALT+SYSRQ+I :: Kills everything else except the bare essentials – may as well reboot by this time, but maybe there’s still hope…
  • CTRL+ALT+SYSRQ+B :: Boot – nope, no hope. This will appear as an unclean shutdown, and is the same as bumping the reset button on the front of your box.

Just remember, Raising Skinny Elephants Is Boring. Do it in sequence, from least spectacular to most. I think there are other keys out there, but I do not know what they are. BTW, the SYSRQ key is usually the same as the “Print Screen” key.

Video card upgrade…

Well, I absolutely do not seem to be able to use any nvidia driver past 8776 on my puny 128 meg 5200 nvidia card (AGPx4) – the screen just fritzs whenever I start the xorg server and the system locks up hard. Nothing works except magic key sequences (thank God for those!).

My main machine has an XFX-overclocked 6600GT (128 meg, AGPx8), and I am quite pleased with it, or was. I upgraded a friend’s computer last week with more RAM and a video card (she was only using the on-board intel adapter) – I steered her towards a 7600 GS AGP card (256 meg), and things moved along much more respectably. I, of course, fired up “glxgears” to see what was what, and the thing floored me. That damn card, a $140 GS, was flogging my year-old $200 6600GT by a factor of four, and is five times faster than the quadra 960 I use at work!  I can only guess at how fast the 7600GT is…

But I think I just figured out what I want for Christmas….

(I also think my son will like a 6600GT….)