Skip to content

Hybrid GPU Performance

ulises-jeremias edited this page Mar 14, 2026 · 2 revisions

Hybrid GPU Performance Guide

Hardware Setup

  • iGPU: Intel Raptor Lake-S UHD Graphics
  • dGPU: NVIDIA RTX 4060 Max-Q Mobile
  • Physical Connection:
    • Laptop Display (eDP-1) โ†’ Intel iGPU
    • External Monitor (HDMI-A-5) โ†’ NVIDIA dGPU (physical HDMI port)

The Performance Problem

When your external monitor is connected directly to the NVIDIA HDMI port, it creates a Reverse PRIME situation:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                      โ”‚
โ”‚  Intel iGPU (renders everything)                    โ”‚
โ”‚         โ”‚                                            โ”‚
โ”‚         โ”œโ”€โ”€โ–บ eDP-1 (laptop) โœ“ Direct                โ”‚
โ”‚         โ”‚                                            โ”‚
โ”‚         โ””โ”€โ”€โ–บ [Frame Copy] โ”€โ”€โ–บ NVIDIA dGPU           โ”‚
โ”‚                                    โ”‚                 โ”‚
โ”‚                                    โ””โ”€โ”€โ–บ HDMI-A-5     โ”‚
โ”‚                                         (external)   โ”‚
โ”‚                                                      โ”‚
โ”‚  Overhead: ~5-15ms latency per frame copy           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Impacts

  • โŒ Additional latency: 5-15ms per frame copy
  • โŒ NVIDIA always active: Doesn't enter deep power-save
  • โŒ Higher power consumption: ~5-10W extra even without gaming
  • โš ๏ธ Possible tearing: If VRR isn't properly configured

Solutions and Trade-offs

โœ… Option 1: Keep Reverse PRIME (Current Configuration)

Advantages:

  • Better battery life than NVIDIA full-time
  • Wayland works better with Intel as compositor
  • NVIDIA available for gaming with prime-run

Disadvantages:

  • Frame copies Intelโ†’NVIDIA
  • ~5-15ms latency on external monitor
  • NVIDIA never completely turns off

When to use:

  • Working primarily on battery
  • Not gaming on external monitor
  • Prioritize efficiency over minimal latency

โšก Option 2: NVIDIA as Primary GPU

Change to have NVIDIA render everything (including compositor).

Required configuration:

# In environment.conf, change to:
env = LIBVA_DRIVER_NAME,nvidia
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1

# Remove:
# env = __NV_PRIME_RENDER_OFFLOAD,1

Advantages:

  • No frame copies for external monitor
  • Minimal latency on HDMI-A-5
  • Better for fulltime gaming

Disadvantages:

  • โŒ MUCH higher consumption (+15-25W even at idle)
  • โŒ Fans always active under Wayland
  • โŒ Worse Wayland support on NVIDIA
  • โŒ Battery drains 2-3x faster

When to use:

  • External monitor always connected
  • Intensive gaming on external monitor
  • Laptop always plugged into power

๐ŸŽฏ Option 3: Dynamic Hybrid Mode (Recommended)

Use different profiles depending on usage:

For Work/Battery (Current config)

# Already configured - uses Intel for compositor
hyprctl reload

For Gaming/Performance

# Script to temporarily switch to NVIDIA primary
prime-run hyprland  # Or configure separate Hyprland session

Current Applied Configuration

Your system is configured for Option 1 (Optimized Reverse PRIME):

environment.conf

  • Intel handles VA-API (video decode)
  • NVIDIA configured to present on physical HDMI port
  • __NV_PRIME_RENDER_OFFLOAD variables active
  • Hardware cursors enabled (test for glitches)

monitors.conf

  • eDP-1 explicitly configured
  • HDMI-A-5 with auto-detect
  • Reverse PRIME flow documented

Verifying Performance

1. Check which GPU Hyprland uses

# See active GPU for Hyprland
hyprctl systeminfo | grep -i "gpu"

# Or verify processes:
nvidia-smi  # Check if Hyprland appears here

2. Check input latency

# On external monitor, move windows quickly
# Feel if there's noticeable lag vs laptop screen

3. Measure power consumption

# See power consumption
cat /sys/class/power_supply/BAT*/power_now
# Lower number = better (values in ยตW)

# See NVIDIA GPU usage
nvidia-smi dmon

4. If you see cursor glitches on external monitor

# Uncomment in environment.conf:
env = WLR_NO_HARDWARE_CURSORS,1

Recommendations

For your case (2 monitors, hybrid laptop)

  1. Keep current configuration (Reverse PRIME) for daily use
  2. Monitor latency on external monitor
  3. If you notice annoying lag: Consider switching to NVIDIA primary
  4. For gaming: Use prime-run or launch games with NVIDIA variables

Signs you should switch to NVIDIA primary

  • โœ“ Noticeable lag/tearing on external monitor
  • โœ“ Frequently gaming on external monitor
  • โœ“ Laptop always plugged into power
  • โœ“ Don't care about fan noise

Keep Reverse PRIME if

  • โœ“ Regularly use battery
  • โœ“ Current lag is imperceptible
  • โœ“ Prioritize silence/low temperature
  • โœ“ Not doing intensive gaming

Troubleshooting

Problem: External monitor has noticeable lag

Solution: Switch to NVIDIA primary (Option 2)

Problem: Cursor corrupts on external monitor

Solution: Enable WLR_NO_HARDWARE_CURSORS,1

Problem: NVIDIA doesn't release memory

Solution:

# Kill persistent NVIDIA processes
sudo systemctl restart display-manager

Problem: Tearing on external monitor

Solution:

# In hyprland.conf, verify:
misc {
    vrr = 1  # Variable Refresh Rate
    no_direct_scanout = false
}

Useful Commands

# See active GPUs
lspci | grep -E "VGA|3D"

# See processes using NVIDIA
nvidia-smi

# See monitors in Hyprland
hyprctl monitors

# See DRM outputs
drm_info | grep -A5 "Connector"

# See which GPU a specific window uses
hyprctl clients | grep -A10 "class:"

# Launch specific app on NVIDIA
prime-run <app>
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <app>

Performance States Explained

NVIDIA GPUs have different performance states (P-states):

P-State Mode Power Usage Use Case
P0 Maximum Performance ~50-55W Gaming, Heavy Compute
P2 Balanced ~20-30W Video Editing
P5 Low Power ~5-10W Display Output Only
P8 Idle (not achievable with display) ~1-2W No display connected

In Reverse PRIME mode with external monitor, NVIDIA stays at P5 (5W) minimum.

Expected Performance Metrics

Battery Life Impact

  • Before optimization: ~15-25W additional GPU consumption
  • After (Reverse PRIME): ~5W (3-5x better battery duration)
  • NVIDIA Primary: ~20-30W (worst battery life)

Latency

  • Laptop Monitor (eDP-1): 0ms overhead โœ“
  • External Monitor (HDMI-A-5): ~5-10ms overhead (frame copy)

Gaming

Use prime-run to force full NVIDIA:

prime-run steam
prime-run lutris
prime-run godot

Advanced: Creating Profile Scripts

Create profile switching scripts for different scenarios:

~/.local/bin/dots-gpu-mode-battery

#!/usr/bin/env bash
# Switch to battery-optimized mode (Intel primary)

# Copy environment.conf with Intel settings
# Reload Hyprland
hyprctl reload
notify-send "GPU Mode" "Switched to Battery Mode (Intel primary)"

~/.local/bin/dots-gpu-mode-performance

#!/usr/bin/env bash
# Switch to performance mode (NVIDIA primary)

# Copy environment.conf with NVIDIA settings
# Reload Hyprland
hyprctl reload
notify-send "GPU Mode" "Switched to Performance Mode (NVIDIA primary)"

References

Related Documentation

๐Ÿ“š HorneroConfig Wiki

๐Ÿ  Getting Started

๐ŸชŸ Window Manager & Desktop

Hyprland (Wayland)

Visual Components

Terminal & Shell

๐Ÿ”ง Scripts & Utilities

๐Ÿ“œ Core Scripts

๐ŸŽฏ Key Tools

Quickshell-first flows:

Media & Screen:

System:

๐ŸŽต Studio & Audio

๐Ÿ›ก๏ธ System & Hardware

๐Ÿงช Development


๐Ÿ” Quick Access

Essential:

Recent Updates:

  • โญ Dots Scripts - Quickshell-first command reference
  • ๐Ÿ†• Hybrid GPU - NVIDIA/Intel power management
  • ๐Ÿ†• Changelog 2025 - Latest changes

Clone this wiki locally