close

DEV Community

kartikay dubey
kartikay dubey

Posted on Originally published at dubeykartikay.com

Setting Up Dual GPU Gaming Laptops in Hyprland

Gaming laptops with dual GPUs are common, and they are a pain on Linux. I run an ASUS Zephyrus G15 with an AMD integrated GPU and an NVIDIA discrete GPU. Before I fixed the setup, I dealt with broken resume from suspend, terrible battery life, overheating, and games that ran worse than they should.

This is a practical guide for setting up dual GPU systems in Hyprland. Most of it applies to other Wayland compositors too.

Step 1: Set the iGPU as primary

Hyprland uses the AQ_DRM_DEVICES environment variable to decide which GPU drives the display. You want the iGPU first for power efficiency and better Linux compatibility.

First, find your GPUs:

lspci -d ::03xx
Enter fullscreen mode Exit fullscreen mode

My output shows an RTX 3060 at 01:00.0 and an AMD Vega at 06:00.0. Create udev rules to symlink these to friendly names:

/etc/udev/rules.d/igpu-device-path.rules:

KERNEL=="card*", KERNELS=="0000:06:00.0", SUBSYSTEM=="drm", SUBSYSTEMS=="pci", SYMLINK+="dri/amd-igpu"
Enter fullscreen mode Exit fullscreen mode

/etc/udev/rules.d/dgpu-device-path.rules:

KERNEL=="card*", KERNELS=="0000:01:00.0", SUBSYSTEM=="drm", SUBSYSTEMS=="pci", SYMLINK+="dri/nvidia-dgpu"
Enter fullscreen mode Exit fullscreen mode

Reload rules:

sudo udevadm control --reload-rules
sudo udevadm trigger
Enter fullscreen mode Exit fullscreen mode

Then tell Hyprland to prefer the iGPU:

env = AQ_DRM_DEVICES, /dev/dri/amd-igpu:/dev/dri/nvidia-dgpu
Enter fullscreen mode Exit fullscreen mode

Step 2: Fix hardware video decoding

Without hardware decoding, video playback burns CPU, drains battery, and stutters at high resolution. Check if your system already supports it:

sudo pacman -S libva-utils
vainfo
Enter fullscreen mode Exit fullscreen mode

If vainfo fails or picks the wrong GPU, set the driver explicitly. For AMD, add to hyprland.conf:

env = LIBVA_DRIVER_NAME, radeonsi
Enter fullscreen mode Exit fullscreen mode

Common driver names: NVIDIA uses nvidia, AMD uses radeonsi, Intel uses i965 or iHD.

Step 3: Switch between Hybrid and Integrated mode

For gaming, you want both GPUs active. For battery life, you want the dGPU completely off.

sudo pacman -S supergfxctl
supergfxctl -s    # list supported modes
supergfxctl -g    # check current mode
supergfxctl -m Integrated   # iGPU only, saves battery
supergfxctl -m Hybrid       # both GPUs, for gaming
Enter fullscreen mode Exit fullscreen mode

That covers the essentials. I wrote a longer post with full hyprland.conf snippets, troubleshooting tips for NVIDIA-specific quirks, and screenshots of the setup: How to Setup Dual GPU Systems in Hyprland.

Top comments (0)