Selecting gpu for programs?

So I have the dGPU on my FW16, running Fedora 40, and I was looking into power usage.

I was checking to see that my dGPU was asleep when the system was idle, which it turns out it doesn’t seem to be.

Using nvtop and only filtering on the AMD Radeon RX 7700S things like Slack, Discord, Steam and Chrome are using it, which I would image are the culprits.

Is there any ways to force these to use the iGPU instead?
Some of these things are flatpaks, if it makes a difference.

I’ve only been using linux as my main OS since I got my framework last month so there’s an infinite number of things I don’t know.
I know exactly where to set this up in windows, but alas not on here.

you should be able to select iGPU by launching the application with DRI_PRIME=0 as an environment variable, e.g. for steam this means adding DRI_PRIME=0 %command% as the command line parameter in the game’s properties. Alternatively, you can launch games through Lutris (which connects to a bunch of other launchers) and it has graphical menu options for selecting the GPU. I.e. configure > system > display > GPU.

Edit: I evidently skimmed past your second sentence. Lutris likely wouldn’t help with what you’re trying to do.

Thanks, though this isn’t really for games.

The steam application itself is using the dGPU. I’m fine with the games using it.
Just trying to keep the power consumption low when the system is idle and the iGPU should be able to handle those workloads just fine

Setting DRI_PRIME=0 on either the system or changing the flatpak desktop files with --env=DRI_PRIME=0 had no effect.

Yeah, I misread your post at first. I definitely understand your frustration, I anticipated issues like that and it’s why I didn’t pick up the dGPU tbh. I wish I knew more.

1 Like

I found supergfxctl, which isn’t really guaranteed to work with FW 16.
I tried it out anyway and found it to work flawlessly (I did have issues launching things like slack afterwards, and ended up having to clean reinstall them and rebooting before they would work again for some reason)

Sadly you need to logout when you want to switch between hybrid and integrated mode.
Had hoped that you could just switch over to integrated-only when opening up the apps you want to force to use it, and then switch back to hybrid.

I hope there is actually a better way of doing this out there.
However for now I have gone from maybe 4h battery life on balanced, if I’m being generous, to over 8h (9+ on power saver).

So there’s a lot of battery life on the table being drained by the dGPU for no reason just because some apps are choosing it over the iGPU.