environment { // ========================================================================= // 1. NVIDIA & GBM BACKEND // ========================================================================= // Forces the Generic Buffer Manager (GBM) to use the NVIDIA DRM driver. GBM_BACKEND "nvidia-drm" // Forces OpenGL/GLX applications to use the NVIDIA proprietary driver. __GLX_VENDOR_LIBRARY_NAME "nvidia" // ========================================================================= // 2. HARDWARE VIDEO ACCELERATION // ========================================================================= // Tells VA-API to use the NVIDIA driver for hardware-accelerated video. LIBVA_DRIVER_NAME "nvidia" // REQUIRED if you use 'nvidia-vaapi-driver' for Firefox/Chromium video decoding. NVD_BACKEND "direct" // ========================================================================= // 3. VARIABLE REFRESH RATE (G-SYNC / VRR) // ========================================================================= // Enables G-Sync / Adaptive Sync for capable monitors. __GL_GSYNC_ALLOWED "1" // Controls VRR. Note: If you experience desktop flickering, change this to "0". __GL_VRR_ALLOWED "1" // ========================================================================= // 4. TOOLKIT BACKENDS (Forces apps to run natively on Wayland) // ========================================================================= // GTK: Try Wayland first, fallback to X11 if necessary. GDK_BACKEND "wayland,x11,*" // Qt: Use Wayland, fallback to X11. QT_QPA_PLATFORM "wayland;xcb" // Prevents Qt from drawing its own window borders/decorations. QT_WAYLAND_DISABLE_WINDOWDECORATION "1" // SDL: Forces games using modern SDL2/SDL3 to run natively on Wayland. SDL_VIDEODRIVER "wayland" // Clutter: Force Wayland backend. CLUTTER_BACKEND "wayland" // Electron/Chromium: Automatically flags apps (VS Code, Discord, Obsidian) to use Wayland. ELECTRON_OZONE_PLATFORM_HINT "auto" // ========================================================================= // 5. DESKTOP SESSION IDENTIFICATION // ========================================================================= // Helps xdg-desktop-portal and styling tools recognize your environment. XDG_SESSION_TYPE "wayland" XDG_CURRENT_DESKTOP "niri" XDG_SESSION_DESKTOP "niri" // ========================================================================= // 6. STEAM / PROTON // ========================================================================= // Stuff for gaming PROTON_ADD_CONFIG "wayland,dlss" DXVK_CONFIG "dxvk.enableNvRawAccessChains=False" }