To address the lag on your external monitor connected to the NVIDIA dGPU on a Linux system with an AMD iGPU, follow these steps:
1. Identify Which GPU the External Monitor is Using
-
Open a terminal and run:
xrandr --listproviders
This will list your GPUs (providers) and their connected displays. Look for:
- GPU:0 (likely the NVIDIA dGPU).
- GPU:1 (likely the AMD iGPU).
-
Check if your external monitor is connected to the NVIDIA GPU (GPU:0). If it shows as connected to the iGPU (GPU:1), proceed to Step 2 (Reverse PRIME is needed). If it’s already on the dGPU, skip to Step 3.
2. Configure Reverse PRIME (If External Monitor is on the AMD iGPU)
Reverse PRIME allows rendering on the NVIDIA GPU and displaying on the iGPU. To set this up:
3. Ensure NVIDIA is Active for the External Monitor
If the external monitor is already on the NVIDIA GPU but still laggy:
- Force NVIDIA Persistence Mode (prevents the GPU from power-saving):
nvidia-smi -pm 1
- Check NVIDIA Settings:
Run
nvidia-settings and ensure the external display is explicitly assigned to the NVIDIA GPU under X Server Display Configuration.
4. Wayland-Specific Fixes
5. Update Drivers and Software
6. Test with Xorg
If lag persists on Wayland, try switching to an Xorg session:
- Log out, select your username, then choose GNOME on Xorg (or similar) before logging back in.
7. Check for GPU Throttling
- Use
nvidia-smi to monitor GPU usage and temperature. If the GPU is throttling, ensure proper cooling and BIOS settings.
Summary of Key Commands:
# Check GPU providers and displays
xrandr --listproviders
# Enable NVIDIA persistence mode
nvidia-smi -pm 1
# Open NVIDIA settings (for display configuration)
nvidia-settings
# Check GPU status
nvidia-smi
Final Notes:
- If the external monitor is already on the NVIDIA GPU but still laggy, the issue may stem from driver configuration or Wayland compositor limitations. NVIDIA’s Wayland support is improving, but Xorg might still be more stable for Optimus setups.
- If Reverse PRIME is configured correctly but lag remains, consider using the
__NV_PRIME_RENDER_OFFLOAD=1 environment variable for specific applications (e.g., __NV_PRIME_RENDER_OFFLOAD=1 firefox).
Let me know if you need further clarification!