Skip to content

Instantly share code, notes, and snippets.

@davidar
Created February 22, 2026 04:30
Show Gist options
  • Select an option

  • Save davidar/400cb20f115fc20529f7da9245d74dc3 to your computer and use it in GitHub Desktop.

Select an option

Save davidar/400cb20f115fc20529f7da9245d74dc3 to your computer and use it in GitHub Desktop.
Fix slow Flatpak/app launches on NVIDIA hybrid laptops caused by GPU D3 sleep wake latency

Fix Slow App Launches on NVIDIA Hybrid Laptops (GPU D3 Sleep)

Problem

Apps (especially Flatpaks) take ~2 seconds to launch because the NVIDIA dGPU enters D3 power state when idle. Waking from D3 adds ~2 seconds of latency to any GPU operation.

This affects hybrid laptops (NVIDIA + AMD/Intel iGPU) where the kernel's runtime power management suspends the dGPU.

Solution

Two things are needed:

1. Enable nvidia-persistenced

Keeps the NVIDIA driver loaded so the GPU doesn't fully reinitialize:

sudo systemctl enable --now nvidia-persistenced

2. Disable Runtime PM via udev Rule

nvidia-persistenced alone isn't enough — the kernel can still suspend the GPU. Create a udev rule to prevent it:

# /etc/udev/rules.d/80-nvidia-pm.rules
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", ATTR{power/control}="on"

Apply without rebooting:

sudo udevadm control --reload-rules && sudo udevadm trigger

Verify

cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
# Should say "active" (not "suspended")

Tradeoff

The GPU draws ~10W at idle when kept awake vs ~0W when suspended. This impacts battery life but eliminates app launch delay. Good for AC-powered use; you may want to disable it on battery.

Reverting (Restore Battery Savings)

sudo systemctl disable --now nvidia-persistenced
sudo rm /etc/udev/rules.d/80-nvidia-pm.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

Alternative: Integrated Mode

If your system supports GPU switching (e.g., via supergfxctl), you can disable the dGPU entirely:

supergfxctl -m Integrated  # AMD iGPU only, requires logout
supergfxctl -m Hybrid      # Back to hybrid mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment