Difference between revisions of "Beryl"

From ArchWiki
Jump to: navigation, search
(Undo revision 45970 by Fbz (Talk))
m (o-o-d)
Line 2: Line 2:
[[Category:Desktop environments (English)]]
[[Category:Desktop environments (English)]]
[[Category:HOWTOs (English)]]
[[Category:HOWTOs (English)]]
{{out of date}}
<span style="color:red;">'''''NOTE: The development of Beryl has stopped due to the merger of Compiz+Beryl to [[Compiz Fusion]]. (i.e. Beryl can be considered deprecated)'''''</span>
<span style="color:red;">'''''NOTE: The development of Beryl has stopped due to the merger of Compiz+Beryl to [[Compiz Fusion]]. (i.e. Beryl can be considered deprecated)'''''</span>

Revision as of 17:07, 14 December 2008

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Beryl#)

NOTE: The development of Beryl has stopped due to the merger of Compiz+Beryl to Compiz Fusion. (i.e. Beryl can be considered deprecated)


Beryl is a window and composition manager. It was created as a fork of Compiz. Arch Linux provides Beryl release and development (git) packages.


Stable version

There are binary packages available in the extra repository. Install beryl using one of the following commands:

# pacman -S beryl
# pacman -S beryl-kde
# pacman -S beryl-gnome

This will install all necessary packages. There are some nice extra plugins:

# pacman -S beryl-extras

Development (git) version

If you want to try the latest beryl development version, activate the unstable repository in pacman.conf. Like above, install beryl using one of the following commands:

# pacman -S beryl-git
# pacman -S beryl-git-kde
# pacman -S beryl-git-gnome

To get the extra plugins, type

# pacman -S beryl-git-extras


Preparing Xorg for beryl

Beryl has two rendering paths. The "Texture from Pixmap" path runs faster but doesn't work on all hardware yet. The "Copy" path works on almost any hardware, but uses more CPU and RAM.

Using "Texture from Pixmap" rendering

The GLX_EXT_texture_from_pixmap extension is needed for this rendering path. This extension is currently provided by Xorg if you use either the 9xxx nvidia drivers or the AIGLX extension. It is also provided by Xgl.

This rendering path is used by default if possible. You can force it by setting Advanced Beryl options -> Rendering path -> Texture from Pixmap in beryl-manager or starting beryl --use-tfp.

Refer to the Composite wiki for more information.

Beryl and Xgl

After installing nVidia/ATI drivers and preparing xorg.conf, open Beryl-Manager. Right-click on the gem in the panel and choose 'advanced beryl options'. It is safest to set all options to "automatic", especially if you have a separate KDM session for "KDE with XGL support"; Auto settings will allow Beryl to utilize XGL if detected, or the nVidia/ATI drivers for normal sessions without XGL support. Refer to this wiki entry for installing Xgl. Once installed, log out, and restart X. Right-click on the gem in the panel and go to 'select window manager'. Choose 'Beryl'. At this point Beryl should load up, and you're done. Note: If 3D Desktop support is not starting automatically on login, try going to 'select window manager', choosing 'Beryl', and then disabling 'Launch fallback windows manager if beryl crashes'. Apparently when logging out, Beryl may crash, forcing KWIN window manager on next login.

Using "copy" rendering

To use this rendering path, your graphics driver has to support 3D acceleration and the Composite extension, and they have to play well together. This is true for older nvidia drivers, but unfortunately not for ATI's fglrx driver.

This rendering path is used by default if texture from pixmap is not available. You can force it by setting Advanced Beryl options -> Rendering path -> Copy in beryl-manager or starting beryl --use-copy.

Starting Beryl

Just try it

If you simply want to try beryl, you can start

$ beryl-manager

This will start the beryl manager and launch beryl. It works with KDE, GNOME and XFCE, but fails with many standalone window managers. Right-click on the gem in the panel and go to 'select window manager'. Choose Beryl, and you should be set.


You can run xfce4 with startxfce4 or xfce-session and gdm (probably kdm too) by modifying some files. You can also use startx; skip the first file below in that case.

First, edit /etc/X11/session/xfce4-svn.desktop (this is the file for svn version. For xfce 4.2 it should probably be xfce4.desktop):

[Desktop Entry]

Next, edit ~/.xinitrc:


# ~/.xinitrc
# Executed by startx (run your window manager from here)

. /etc/profile
. $HOME/.bashrc

xrdb $HOME/.Xresources

# start beryl and beryl-manager
beryl-manager &
emerald &  

And, finally, delete your previous sessions stored by xfce4:

$ rm -r .cache/sessions/*

NOTE: If you were modifying these files while running xfce4 do not save your session on exit.

Alternative configuration using Autostarted apps

As an alternative to the above, you can get beryl/emerald to start by making an entry for beryl-manager in Settings -> Autostarted Applications.


Method 1 - Autostart Link

Anything in the .kde/Autostart folder will be executed on login.

Simply make a link to "beryl-manager" in this location

 ln -s /usr/bin/beryl-manager ~/.kde/Autostart/beryl-manager

And that's it! Log in and beryl will start automatically.

Method 2 - Beryl without loading kwin (Faster)

Using this method will load beryl as the default window manager instead of kwin from the start. This method is faster then loading beryl-manager in the ~/.kde/Autostart/ because it avoids loading KDE's default WM (kwin) and then loading Beryl. This way also stops that annoying black screen flicker you might see using other methods (when kwin switches to beryl on load).

Edit your ~/.bashrc and add the following

 export KDEWM=beryl

This will load beryl when KDE loads the Window Manager during KDE's splash screen. Now for a nice, clean KDE-style Autostart of beryl-manager, create ~/.kde/Autostart/beryl-manager.desktop file with the following contents.

 [Desktop Entry]

Creating a .desktop file in Autostart is more KDE-friendly than just a straight symbolic link. If, for instance, you use something like gtk-qt-engine, then this way beryl manager's menu will obey your KDE styles, giving a more-integrated feel.

The final step is to make sure beryl-manager & beryl aren't saved with KDE's session manager as we are already loading them at startup. Doing this will help minor UI issues from showing up later. Add the following in this area.

Control Center (kcontrol) --> KDE Components --> Session Manager --> Advanced --> Applications to be excluded from sessions:


Method 3 - KDM menu entry

If you want Beryl to start as the default WM, you can also put an entry in the KDM menu. To do this, create the file /usr/bin/startberyl.sh:

 export KDEWM="/usr/bin/beryl-manager"
 exec startkde

Do a chmod 755 /usr/bin/startberyl.sh And then create /etc/X11/sessions/beryl.desktop:

 [Desktop Entry]

Restart KDM (log out of your KDE session), select Beryl in the session menu, and log in to test if everything is OK.


The simplest way is to add "beryl-xgl" to the applications that start with your session. You can do this by going to:

[Desktop] -> [Preferences] -> [Sessions] -> [Startup Programs]

Adding "beryl-manager" to the list might be a good idea, too, so you can switch back to Metacity if need be.

No Desktop, Beryl as window manager only

This is an example ~/.xinitrc to create a "lightweight" Beryl environment. It is rather uncomfortable unless you add a panel and maybe other management applications.

if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`

emerald &
beryl-manager &

# Start other applications here
# Example: set wallpaper + open a terminal
# feh --bg-scale ~/Wallpapers/wallpaper.jpg &
# urxvt -depth 32 -fg grey80 -bg rgba:0000/0000/0000/dddd &

# Now start something you need all the time, like a panel
exec gnome-panel

Note: The .xinitrc that was here before forced beryl to start twice (since beryl-manager starts beryl too), which led to X closing. I'm not sure if we can just do exec beryl-manager instead of opening something else like I do.

Alternatively, you can use the wait command to tell X to close with emerald.


emerald & wmpid=$!
beryl-manager &
  feh --bg-center ~/.wallpaper.jpg &
  conky &

  urxvt &
wait $wmpid

Configuring Beryl

  • beryl (WM and compositor): Just run beryl-settings or select Beryl Settings Manager from the beryl manager dockapp.
  • emerald (window decorator): Run emerald-theme-manager or select Emerald Theme Manager from the beryl manager dockapp.
  • aquamarine/heliodor (KDE/GNOME window decorator): Check the usual KDE or GNOME theme settings; aquamarine/heliodor will use those automatically.

Running beryl-manager will give you more control on beryl. With that nice tray icon you can get back to metacity/kwin, launch the beryl settings or the theme manager, etc.

You can migrate compiz-quinn's settings to beryl by copying ~/.compiz/csm_settings to ~/.beryl/settings.


nVidia beta drivers and black windows

The community over at nV News has come up with a great solution (thanks djdoo for compiling all of this information together) to the black window bug. As far as I know, nVidia has yet to address this issue, so this is by far the best alternative if you want to use Beryl with an nVidia card.

Beryl not starting in KDE

If you are having problems starting or running Beryl under KDE, try resetting KDE's settings. You can do this by removing the ~/.kde directory and ~/.kderc file. Note that you should backup your important data like Kopete, Kmail, and Amarok configuration. Also, make sure you choose 'Beryl' as your window manager, (right-click beryl gem in panel, select window manager/Beryl) and try disabling "Launch-Fallback window manager if Beryl crashes". Apparently under certain conditions, logging out will cause Beryl to crash, forcing KWIN window manager on next login.


You should read this if you have problems with ATI.

Uninstalling fglrx

Don't forget that:

  • xf86-video-ati are the ATI open-source drivers
  • ati-fglrx(-beyond, ...) are the proprietary ones which won't work with Beryl
  • You have to replace "fglrx" by "radeon" in BOTH the xorg.conf and rc.conf files
  • You have to uninstall ati-fglrx(-beyond, ...), ati-fglrx-utils and then install libgl-dri to get everything to work properly. As Veek said in this post:
Attention, anyone who was previously using the fglrx drivers:
Both the ati-fglrx-utils package and the libgl-dri package provide a version of the openGL
shared library /usr/lib/libGL.so.1 (your version may be different).
However the one supplied by the Mesa package implements things not implemented by the one in ATI's package.
That's why it can be exceedingly confusing trying to figure out why things aren't working
even though you apparently have the necessary libraries.
The solution is to install libgl-dri and everything shoud work as outlined in spack's guide.
This is my understanding of the issue, just wanted to clarify for anyone else that was confused.
  • Uninstalling commands:
pacman -Rd ati-fglrx(-beyond,...) ati-fglrx-utils
pacman -S libgl-dri xf86-video-ati


  • I had some black-screen troubles when trying to launch KDE. Sometimes KDE would also crash. It is fixed when adding the following line to the Device section of the xorg.conf:
BusID       "PCI:1:0:0"
  • After this KDE would launch but a bit slowly, and glxgears wouldn't launch but kept complaining:
*********************************WARN_ONCE******** *************************
File radeon_mm.c function radeon_mm_alloc line 216
Ran out of GART memory!
Please consider adjusting GARTSize option.
************************************************** *************************

Fixed when you add the following line to the device section of your xorg.conf (seen in this post):

Option "GARTSize" "64"

So everything works fine here on my ATI Radeon Mobility 9600, Beryl, and KDE. Here is my xorg.conf.

  • Q: When maximizing a window, the window borders go all-white (screenshot) on ThinkPad X32 (ATI Mobility M6) using radeon driver.
    • A: (Solution from here). Add the following option to xorg.conf under the card settings:
 Option "AGPSize" "32"

Desktop clipping/drawing error on Radeon 7500

Users of Radeon 7500 graphics cards may experience a "clipping" effect where the desktop is limited to 1024x768 resolution. Screen areas outside this box are not drawn correctly, and larger windows lack decorations, etc.

The fix for this is to download and build driconf from AUR. Then set up your graphics card as you wish. The program creates a file called .driconf in your home directory.

Open this file, and change the line

<option name="allow_large_textures" value="X" /> 

where "X" equals the current value there, and change it to

<option name="allow_large_textures" value="2" />
    • DOESN'T WORK ON MY IBM R40 (1400*1050), anyone help?
  I fixed it by adding "Option "AGPSize" "32" in xorg.conf in card section. The whole part is like:

Section "Device"

       Identifier  "ATI|Radeon Mobility M7 LW (AGP)"
       Driver      "ati"
       VendorName  "All"
       BoardName   "All"
       Option "XAANoOffscreenPixmaps"
       Option "DRI" "true"
       Option "AGPSize" "32"


Black screen when starting X with radeon open-source drivers on ATI X700

You have to add this option to the "Device" section of the xorg.conf:

Option      "MonitorLayout" "LVDS,NONE"

This will solve the problem.

Window Decorations Disappear

If you are using KDE, open: KDE Control Center -> Desktop -> Behavior and check "Show Icons on desktop" option. (Does not always work.)

No Window Decorations with Beryl and Emerald running

Check that XLIB_SKIP_ARGB_VISUALS=1 is not present in your environment ('env | grep XLIB_SKIP_ARGB_VISUALS'). If it is, remove all traces from initialization scripts (usual suspects: /etc/profile.d/flash.sh and ~/.bashrc), restart Xorg, and try again.

Another solution as mentioned in the beryl project wiki: change your default color depth in xorg.conf to 24.

Firefox/Swiftfox Crashing

If you are experiencing crashing of Firefox or Swiftfox when viewing sites that use Flash, you can try this fix.

Open up /usr/bin/firefox or /usr/bin/swiftfox, and add "export XLIB_SKIP_ARGB_VISUALS=1" before EOF (end of file), on its own line. Save and restart the browser.

Note: Adding this line to an initialization script (such as .bashrc or in /etc/profile.d/) may result in emerald being unable to display window decorations.

Locale Errors

If you are having trouble launching Beryl, Beryl-Manager, Beryl Settings Manager, and/or Emerald and get output to this effect:

  (beryl-manager:4204): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
(emerald:4269): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
(beryl-settings:4278): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
Traceback (most recent call last):
  File "/usr/bin/beryl-settings", line 35, in ?
    locale.setlocale(locale.LC_ALL, "")
  File "/usr/lib/python2.4/locale.py", line 381, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

See the Configuring locales entry.

Java Apps: Empty Window

Some Java applications (with Java GUI) are not correctly displayed with Beryl running; only an empty window is visualized. A workaround is to append:

export AWT_TOOLKIT="MToolkit"

in your .bashrc (for single user) or /etc/profile (for all users).

This may cause other errors. If this is the case, the bug is fixed in java 1.6_u10 (currently in beta but available for download at sun.java.com).

Crashes while Yakuake is running

Running an app which updates a screen in Yakuake causes crashes. For example, running pacman -Syu (while the screen is updating), or as a test, while true;do ls -l;done. Then open a new tab and open a graphical application, e.g KWrite.

In order to fix it the source code needs to be edited. See Gentoo bug report.

Improper focus-stealing apps / Sometimes on bottom

In KDE w/ beryl sometimes apps steal focus improperly when unminimized and end up underneath other apps. This little quirk can get quite annoying. Some problematic apps are Yakuake and asmn. An easy fix is to set this option:

 Beryl Settings Manager --> General Options --> Level of Focus Stealing Prevention = None

Tips & Tricks


Cairo-Clock is a elegant-looking analog clock that works with Beryl. To install it, grab it from the AUR here. Currently Cairo-Clock doesn't work properly with AIGLX and the Nvidia GLX_Texture_From_Pixmap extension, but I have found a fix to this. Launch Cairo-Clock with the following command:
cairo-clock -w 127 -g 127 -s
That should fix it right up, so it will display properly. Check out the project page for more details and screenshots here.

Terminal with true transparency

Gnome-terminal does true transparency with Beryl running, but some people prefer a more-lightweight terminal. Install rxvt-unicode, and launch it with this command:
urxvt -depth 32 -bg rgba:0000/0000/0000/cccc -fg white

Additional Resources

  • Xgl
  • Composite -- A Xorg extension required by composite managers
  • Compiz Fusion -- A composite and window manager offering a rich 3D accelerated desktop environment
  • Compiz -- The original composite/window manager from Novell
  • Xcompmgr -- A simple composite manager capable of drop shadows and primitive transparency
  • Beryl -- A composite/window manager forked from Compiz (since merged to become Compiz Fusion)
  • Wikipedia: Compositing Window Managers