Question about framework 16 before I buy

I’m thinking about buying a Framework 16 laptop with the GPU module, but I have some questions about how the hybrid graphics works in Linux. I’ve read some posts about how you have to set environment variables to use the dGPU for applications, but I’m still quite new to Linux and I don’t really understand what that entails. Does every application need to be individually set to use the dGPU? What about applications that run through Steam? Do I only set the environment variable for Steam, and then all the games also have the same setting, or do I have to set it for ever game individually?

Since I’m not very comfortable with this level of tinkering in Linux yet, I’m wondering if there’s away to just use the dGPU for everything. I understand the battery life will be worse if I do this, but that honestly doesn’t bother me, since the laptop will be plugged in 90% of the time anyway. So is there a way that I can easily set up my system to exclusively use the dGPU for every application? I’d really like to know if this is possible, since it will make things a lot simpler for me.

My game plan is to use Fedora, not sure if this changes anything.
Thank you in advance!

Most games will use the dGPU without you needing to do anything to force it.

Check out “nvtop” - its a tool you can use to verify if the dGPU or iGPU is being used.

As for "how do I do this with Steam, if a game isn’t using the dGPU, you can force it with:

DRI_PRIME=1  %command% 

This is a “launch option” for the game and is set on a per-game basis:

Settings → Properties → Launch options

Oh that’s cool, I didn’t realize it was automatic.

So does DRI_PRIME=1 %command% only work for steam? Or can it also be used to force non-steam games?

For “non-steam” games I can’t really speak to that.

If a game is in your application’s menu, you can “right click” it and “use dGPU” (at least on gnome).

But again, any of the very few non-steam games I have played uses the dGPU automatically.

DRI_PRIME=1 is a standard environment variable. the steam syntax of that followed by %command% is just telling steam that it needs to put that in front of the actual executable name.

you can do the same thing on the command line yourself, or set up a shell script. many desktop environment launchers also have a way of specifying the same thing. assuming, of course, that the app/game in question doesn’t do the thing you expect automatically.

It’s even easier than using DRI_PRIME=1:
switcherooctl launch %command%
This should even work for all other programs as well, e.g.
switcherooctl launch firefox

There is an article about this tool here (It’s about openSUSE, but applies to all linux distros)

Edit:
Sometimes DRI_PRIME didnt work for me, but switcherooctl worked pretty well so far.

I would argue that its not any “easier” to use switcherooctl over DRI_PRIME=1. But rather user preference.

But yes, switcherooctl is a very good option as well.

As well, you could likely edit the .desktop file for a particular application to force the use of the dGPU.

Example:

[Desktop Entry]
Name=Brotato
Comment=Play this game on Steam
Exec=steam steam://rungameid/1942280
Icon=steam_icon_1942280
Terminal=false
Type=Application
Categories=Game;
PrefersNonDefaultGPU=true <<<<< This line

I haven’t fully tested this. But this was the default entry in Blender’s .desktop file.

I used the Brotato .desktop entry as an example as this is a much smaller entry.

EDIT: I tested this with “Brotato” and it does not seem to work. However, since that was a Steam game, it may be why.

I can finagle around with this on some non-steam apps. But I do not currently have any non-steam games to test with that do not already use the dGPU.

As for Epic and other launchers, if you use “Heroic Launcher” there is a GUI option to handle this as well:

1 Like