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 2.6.18.2
  • 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/libglx.so”
SubSection “extmod” ## added for beryl
Option “omit xfree86-dga” # don’t initialise the DGA extension ## added for beryl
EndSubSection ## added for beryl
EndSection

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
EndSection

Section “Extensions”
Option “Composite” “Enable”
Option “RENDER” “Enable” ## added for beryl
EndSection

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

and /etc/sysconfig/xgl:

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
COMPOSITING_WM_START=yes

# if COMPOSITING_WM is not empty, it overrides the default compositing
# window manager (which is compiz)
COMPOSITING_WM=/usr/bin/beryl

# 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
COMPOSITING_WINDOW_DECORATOR=/usr/bin/emerald

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.

20 Responses

  1. Thanks, it did.. I had the black screen problem after switching users..

    Greetings,
    Ger.

  2. hm,i’m Ubuntu and SuSe user and i feel it is quite easy running beryl on it…after i look at new arrival of Mandriva One 2007 “Metisse” last 2 days..i wonder..can i combien both effects?i mean can i install beryl on it..so i decided i’m going to install beryl after i can manage to control metisse desktop. . .i hope your guide in this website will help me a lot..and also hope you also will try to use beryl on metisse desktop and i really hope you will post hack setting for beryl base if there is need to change something in beryl with running on metisse..thanks

  3. Hi alex – I poked around the web site for metisse, but have yet to actually try it out. Unfortunately, I do not have a capable machine available to really test with, and am pretty happy with my desktop right now, so until it becomes a little less experimental, I will probably not do anything with it. I did read however that future releases of compiz will be able to use metisse, so I would assume beryl will do the same.
    I will be sure to post configs and links of anything I get working, however – this is a main purpose of my blog. ^____^

    Cheers!

  4. hello again..
    i’m feel quite scare to run beryl on Metisse..so i guess i will try it after i found article that prove beryl can run on metisse..but now..i will continue to use ubuntu in my first harddisk and will install MAndriva metisse in external..(i also scare if Mandriva boot loader can’t detect my ubuntu so i decided to install it in external~i have experience install ubuntu after install fedora(ubuntu grub doesn’t detect fedora system)..thanks for your reply(”,)

  5. Hello,

    I had the same black screen problem. Your fix works also on Gentoo!
    Thanks

  6. Thanks, areuareu – glad it was helpful for you.

  7. Thanks,planning to install Beryl on Mandriva 2007 Free and will soon do it thanks to this tutorial of sorts and then get all my friends to switch from Vista to Linux who are raving about the eye-candy in Vista.Mu Ha Ha Ha…

  8. Easwar Hariharan: Good luck with that, hope they switch. Bear in mind that this tutorial may be out a little out of date now – I am not sure the instructions work with the newer versions (especially following the merge of beryl and compiz). Let me know how it goes for you.
    Thanks!

  9. You might want to use S-U-B instead of U-S-B as it makes sense to Sync before Umounting!

    I have to try out this Sync to VBlank. I am tired of this lock up.

  10. Duh – typo I missed. Sometimes I am dyslexic.

    Thanks!

  11. Thank you for giving us a solution about the Black screen-tty switch problem:)
    (seems to work for anyone running beryl)
    Good luck

  12. Good to hear, Mark. Glad it helped!

  13. I was just about to give up on Beryl when I came about your “Sync to VBlank” solution and things work.

    Thank you very much.

    Do you know of a list of (un)safe screen savers?

  14. Symbolik:
    Though I couldn’t install Beryl on Mandriva 07 due to bad media,I am glad to report that I’ve tried both Beryl and Compiz-Fusion with Xgl on my ATi Radeon XPress 200 onboard card with fglrx drivers and they work fine,thank you.Presently using Compiz-Fusion and seriously drooling over it.🙂

  15. Happy to help, Easwar.

    Kees – glad the fix worked for you. As far as unsafe or safe screensavers, you will just have to experiment. I am running Cooker, and they can change from one update to the next. Some or none of what I find on my system may apply to a stable version.

  16. Thanks a lot – it works even on fedora 6🙂

  17. Thank you for this! I had the same problem with compiz-fusion with regards to not being able to switch back to X from a tty. I’ve been looking for hours and then I came upon your post here. Thanks for the info!

  18. When I initially left a comment I seem to have clicked the -Notify
    me when new comments are added- checkbox and now each
    time a comment is added I get 4 emails with the same comment.

    There has to be a way you are able to remove me from that service?
    Cheers!

  19. Have you ever thought about including a little bit more than just your articles?
    I mean, what you say is important and everything.
    However imagine if you added some great visuals or
    videos to give your posts more, “pop”! Your content is excellent but
    with images and videos, this website could definitely be one of the greatest in
    its field. Wonderful blog!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: