I don’t know what you’ve tried or how you’re testing this, but I’ve got a few tips. Note though, that I have the RX 7700s module, not the 5070. I used to have a Razer laptop running Arch with a 3070 though.
- Don’t use tools like
nvtopto check whether the dGPU is on or not. These tools wake the device up and they themselves will prevent the dGPU from turning on. It’s better to run a command likecat /sys/class/drm/card1/device/power_stateand check to see if the dGPU is in D0 (on) or d3Cold (off). This doesn’t wake the dGPU. - Some apps (e.g. Discord, Steam, some web browsers) will turn the dGPU on for a moment but then it will re-enter sleep on it’s own. If you have a tool running that’s watching for dGPU activity, when these other apps turn on the dGPU, that measurement tool could then latch onto it and prevent it from turning on. For example, I have modified the firmware on my keyboard to turn one of the lights red when the dGPU is on. When the dGPU is on, I have to change the sampling rate so that I don’t accidentally keep it on through the act of observing it. RGB Keyboard Custom Firmware - PC Utilization Stats
- You can use
nvtopto figure out which processes are binding to the dGPU, and then configure the env variables/launch options for that application to prefer a given GPU. For example, these env variables I use when I want to force an app onto the iGPU.DRI_PRIME=0 DXVK_FILTER_DEVICE_NAME="AMD Radeon 780M Graphics (RADV PHOENIX)"- Technically, only DRI_PRIME or the filter variable should be needed, but I like to be certain.
- You can get the name needed by the filter variable with
vulkaninfoe.g.,vulkaninfo | grep 5070 - If those don’t work, you can also try loading the game with gamescope and making use of it’s
--perfer-vk-deviceparameter. Unfortunately, I’ve deleted my sample of that command though.
- If you’re trying to run an application/game with mangohud and on the iGPU, you’ll need to toggle mangohud off temporarily. I’ve noticed that if I successfully launch a game on the iGPU with mangohud running, mangohud will latch onto the dGPU rather than the GPU in use and then mangohud itself will report the dGPU’s stats and keep the dGPU online. I can get around this by hitting shift + f12 to toggle the overlay off, wait ~10 seconds, then turn it back on.
That’s all I can think of off the top of my head. I’ll make another comment if I think of more.