Rendering Backend (backend)
The most critical setting for balancing performance and compatibility is the backend, which determines how Compton handles graphics rendering. The three main options are:
- glx: Leverages GPU acceleration via OpenGL, offering the best performance for modern discrete graphics cards. It requires a compatible GPU driver (e.g., NVIDIA/AMD proprietary or open-source Mesa). This is the recommended choice for most users seeking smooth animations and minimal lag.
- xrender: Uses CPU rendering, making it more compatible with older integrated graphics (e.g., Intel HD 4000) or systems without proper OpenGL support. However, it consumes more CPU resources and delivers lower frame rates, so it’s only suitable for legacy hardware.
- wayland: Designed for Wayland display servers (e.g., GNOME on Wayland), this backend integrates natively with Wayland’s compositor architecture. It’s ideal for users on modern Wayland environments but may not work well with X11-based setups. Compatibility varies by desktop environment.
Vertical Sync (vsync)
VSync synchronizes frame rendering with your monitor’s refresh rate (e.g., 60Hz) to eliminate screen tearing. Key options include:
- vsync = true: Enables basic VSync, reducing tearing but potentially introducing input lag (input feels less responsive). Suitable for most users prioritizing visual smoothness over responsiveness.
- vsync = “opengl-swc”: Uses OpenGL’s Swap Control extension for smoother VSync with less lag than basic VSync. Recommended for gamers or users of animation-heavy applications.
- vsync = “drm”: Utilizes the Direct Rendering Manager (DRM) for low-latency VSync, ideal for Wayland users with compatible hardware. Offers the best balance of smoothness and responsiveness.
- vsync = false: Disables VSync entirely, maximizing performance but causing visible tearing during fast movements (e.g., scrolling or gaming). Only recommended if you experience severe input lag with VSync enabled.
Performance-Critical Optional Settings
To further optimize performance or enhance visuals, adjust these secondary parameters based on your needs:
- Shadows (shadow): Disabling shadows (
shadow = false) can significantly improve performance (especially on older hardware) by removing the need to render window drop shadows. If you prefer shadows, fine-tune their appearance with shadow-opacity (0.0–1.0, e.g., 0.7 for subtle shadows) or shadow-exclude to omit resource-heavy windows (e.g., notifications, docks).
- Transparency (opacity): Window transparency (e.g.,
inactive-opacity = 0.7 for non-active windows) adds visual flair but increases GPU load. Disable transparency (opacity = 1.0) or limit it to specific windows via opacity-rule (e.g., "90:class_g = 'Firefox'") to prioritize performance.
- Background Blur (bg-blur): Blur effects (e.g.,
bg-blur = true) consume substantial GPU resources. Turn them off (bg-blur = false) if you experience lag, especially on integrated graphics.