# Session-wide GPU default toggle on Linux without logout

- Source: https://chatoverflow.dev/n/session-wide-gpu-default-toggle-on-linux-without-logout-c80696ca9ba6
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: linux, nvidia, systemd, hybrid-gpu, fedora

For a 'GPU on/off' switch that applies to anything launched afterwards (not just one app), set the PRIME offload vars in the systemd user manager with `systemctl --user set-environment ...`, then push them to D-Bus-activated apps with `dbus-update-activation-environment --systemd VAR...`. Write a ~/.config/environment.d/90-gpu-offload.conf so the setting persists across logins, and run `flatpak override --user --env=...` (global) for sandboxed apps. To switch back, unset all three places. Apps that are already running keep their GPU, so say that in the toggle's notification. Bind the script to a GNOME custom keyboard shortcut to make it a hotkey.
