Skip to content

Instantly share code, notes, and snippets.

@kRHYME7
Last active June 6, 2025 07:44
Show Gist options
  • Save kRHYME7/1d2574e8f3a4b7ad4059535503ce1eaa to your computer and use it in GitHub Desktop.
Save kRHYME7/1d2574e8f3a4b7ad4059535503ce1eaa to your computer and use it in GitHub Desktop.
# Hyprland Environment Variables for NVIDIA and Intel Setups

Hyprland Environment Variables for NVIDIA and Intel Setups

I made this guide because I have a hybrid GPU. In some setup like HyDE, there is a chance that the environment variables are being set for NVIDIA ONLY setup.

Environment Variable NVIDIA Only Hybrid (NVIDIA+Intel) Intel Only Explanation / Notes
LIBVA_DRIVER_NAME,nvidia ✅ Use ❌ Avoid (use iHD or comment out) ❌ Avoid (use iHD) VA-API driver for NVIDIA. Causes issues on hybrid or Intel-only setups. Use iHD for Intel VA-API.
LIBVA_DRIVER_NAME,iHD ❌ Avoid ✅ Use (for Intel VA-API) ✅ Use VA-API driver for Intel. Not needed for NVIDIA-only setups.
__GLX_VENDOR_LIBRARY_NAME,nvidia ✅ Use ✅ Use ❌ Avoid Required for NVIDIA GLX. Disable if you experience screenshare or XWayland conflicts.
NVD_BACKEND,direct ✅ Use (with nvidia-vaapi-driver) ✅ Use (if NVIDIA VA-API needed) ❌ Avoid Enables VA-API hardware acceleration on NVIDIA. Not used on Intel-only setups.
GBM_BACKEND,nvidia-drm ✅ Use ✅ Use (if using NVIDIA) ❌ Avoid Sets GBM backend for NVIDIA. May cause Firefox crashes; remove if issues occur.
MOZ_ENABLE_WAYLAND,1 ✅ Use ✅ Use ✅ Use Enables Wayland support in Firefox/Mozilla apps. Safe for all setups.
MOZ_DISABLE_RDD_SANDBOX,0 Optional Optional Optional Disables Firefox RDD sandbox. Use only if necessary; may reduce security.
XWAYLAND_NO_GLAMOR,1 ✅ Use (if issues) ✅ Use (if issues) ❌ Avoid Disables Glamor acceleration for XWayland. Use if you have performance or compatibility problems.
__GL_MaxFramesAllowed,1 ✅ Use ✅ Use ❌ Avoid Limits max buffered frames for NVIDIA. Not needed for Intel-only.
__GL_VRR_ALLOWED,0 ✅ Recommended ✅ Recommended ❌ Avoid Disables Adaptive Sync/VRR on NVIDIA. Not needed for Intel-only.
__VK_LAYER_NV_optimus,NVIDIA_only ❌ Avoid ✅ Use (for Vulkan offload) ❌ Avoid Vulkan layer forcing NVIDIA GPU. Only for hybrid setups with Vulkan offloading.
PROTON_ENABLE_NGX_UPDATER,1 ✅ Use ✅ Use ❌ Avoid Enables NVIDIA NGX updater for Proton (gaming). Not needed for Intel-only.
VDPAU_DRIVER,nvidia ✅ Use ✅ Use (if NVIDIA VDPAU) ❌ Avoid VDPAU driver for NVIDIA. Use Intel or AMD drivers for other GPUs.
VDPAU_DRIVER,va_gl ❌ Avoid ✅ Use (for Intel VDPAU) ✅ Use VDPAU driver for Intel. Not needed for NVIDIA-only setups.
AQ_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 ❌ Avoid ✅ Use (for hybrid multi-GPU) ❌ Avoid Enables fallback between GPUs in hybrid setups. Can cause blank screens if misconfigured.
WLR_NO_HARDWARE_CURSORS=1 Optional (DEPRECATED for hyprland) Optional (DEPRECATED for hyprland) Optional (DEPRECATED for hyprland) Disables hardware cursors to avoid glitches. Use if you experience cursor issues.

Summary and Recommendations

NVIDIA-Only Setup

  • Use all NVIDIA-specific environment variables.
  • Avoid Intel-specific VA-API and VDPAU drivers (LIBVA_DRIVER_NAME,iHD, VDPAU_DRIVER,va_gl).
  • Disable variables that cause XWayland or screenshare issues if encountered (e.g., __GLX_VENDOR_LIBRARY_NAME,nvidia).

Hybrid NVIDIA + Intel Setup

  • Use NVIDIA variables for rendering and VA-API if you want to offload to NVIDIA.
  • Use Intel VA-API (LIBVA_DRIVER_NAME,iHD) if you want Intel video acceleration.
  • Use AQ_DRM_DEVICES to enable fallback between GPUs.
  • Avoid setting conflicting VA-API drivers simultaneously.
  • Use Vulkan offload variables (__VK_LAYER_NV_optimus,NVIDIA_only) if using Vulkan with NVIDIA GPU.

Intel-Only Setup

  • Use Intel-specific VA-API and VDPAU drivers (LIBVA_DRIVER_NAME,iHD, VDPAU_DRIVER,va_gl).
  • Avoid all NVIDIA-specific environment variables.
  • Enable Wayland support in Firefox (MOZ_ENABLE_WAYLAND,1).

Common Conflicts and Issues

  • Setting LIBVA_DRIVER_NAME,nvidia on Intel or hybrid setups can break video acceleration.
  • GBM_BACKEND,nvidia-drm may cause Firefox crashes; remove if needed.
  • AQ_DRM_DEVICES must be carefully configured for hybrid setups; incorrect settings can cause blank screens.
  • __GLX_VENDOR_LIBRARY_NAME,nvidia can cause XWayland conflicts; disable if you have issues with screenshare or XWayland.

This guide should help you configure your environment variables correctly based on your GPU setup for optimal performance and compatibility with Hyprland.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment