Since its official inclusion in KDE, the Desktop Effects component of KWin has received mixed reviews. Many of the negative reviews point to performance problems, some of which are the result of the dramatically diverse offering of Linux drivers available for graphics cards.
Not all graphics cards are equal, but one would expect them to perform the same or close to the same on one operating system as they do on another. Unfortunately, the lack of cooperation from some graphics chip manufacturers and the slow development of some open source drivers have created an environment where every user’s experience may be different.
KDE has several settings that you can tweak to get better performance with desktop effects. Unfortunately, there is no solution that fixes all issues, and even two users with the same graphics chip manufacturer but different models may have dramatically different results. The intent of this guide is to help you understand the different settings and what they can do to help improve performance.
Enable Desktop Effects
Many current Linux distributions will enable desktop effects by default. If your distribution does but you still cannot get desktop effects working, you should first check the settings.
- Open “System Settings” from the K-menu or press Alt+F2 and type “System Settings”.
- Under Workspace Appearance and Behavior, click “Desktop Effects”.
- Check the “Enable desktop effects” box.
If you cannot check the box and it tells you that it could not be enabled, KDE may have your graphics card on its black list. To get around this problem, you will need to manually edit ~/.kde/share/config/kwinrc. You can use the following commands from a terminal:
kwriteconfig -file kwinrc -group Compositing -key Enabled true kwriteconfig -file kwinrc -group Compositing -key OpenGLIsUnsafe false kwriteconfig -file kwinrc -group Compositing -key CheckIsSafe true
The “Advanced” tab in the “Desktop Effects” configuration allows you to tweak your effect system to work better with your graphics card. As a warning, you should know that some settings may cause your screen to become unreadable or cause desktop effects to stop working. Fortunately, any changes you make will revert back to their previous settings if you are unable to confirm them.
There are two choices here: OpenGL (3D) and XRender (2D). From my experience, graphics cards with good 3D hardware and drivers should always use OpenGL. Nvidia and AMD cards usually fall into this category, although the AMD/ATI drivers may vary in performance depending on the age of your card. Recent Intel graphics drivers have been horrendous, and your 3D performance will probably be significantly lower than it would in Windows. Because of this, I recommend using XRender with Intel graphics chips until the drivers are improved. The down side of XRender is that it will disable some effects, such as Desktop Cube and Cover Switch. Most, however, such as Transparency, Shadows, and Desktop Grid, will continue to function.
If you want to make sure desktop effects stay enabled no matter what, check the “Disable functionality checks” box. This may help if some effects work with your card but are not supported.
Keep window thumbnails
In most situations, you can leave the setting “Only for Shown Windows”. If you experience any problems, you can always disable it.
This is all about speed vs. quality, and only the discerning eye will know the difference. “Crisp” is faster and more rigid, while “Smooth” is slower and more polished.
If you think suspending desktop effects will improve performance, you can check “Suspend desktop effects for fullscreen windows”. This may help some games and videos.
There are three settings for OpenGL mode:
- Texture from Pixmap – In this setting, textures are stored directly in the graphics card’s memory, which is usually faster than storing them in the system memory
- Shared memory – This stores the textures in your X server’s shared memory, which is a section of your system memory. Use this only if pixmaps do not work, as it is usually slower.
- Fallback – This setting simply tries Texture from Pixmap and then switches to Shared memory if the former does not work.
This is one setting that will vary greatly from one graphics card / driver combination to another. Generally, direct rendering should be faster as it bypasses X and sends instructions directly to the graphics card, but some cards have stability issues or incompatibility with this option.
With vertical synchronization, all screen drawing is synced with the monitor’s vertical display updates. It is designed to make the screen easier on the eyes and prevent tearing. For some, however, it can slow down performance.
The Right Combination
It is impossible to know what the perfect combination of settings will be without trying them on your own graphics card. Until the Linux graphic driver situation improves, KDE users will have to do some tweaking to get optimal performance.