[gnome-shell/wip/hadess/always-launch-discrete-gpu: 2/5] shell-app: Launch on integrated GPU when requested
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/hadess/always-launch-discrete-gpu: 2/5] shell-app: Launch on integrated GPU when requested
- Date: Wed, 23 Oct 2019 13:29:25 +0000 (UTC)
commit 01f857b7c91f25a9df011b7fb9bb2af09dc2a744
Author: Bastien Nocera <hadess hadess net>
Date: Mon Oct 21 12:12:39 2019 +0200
shell-app: Launch on integrated GPU when requested
Always set the DRI_PRIME environment variable when launch apps, so that
applications are force launched on the integrated GPU by default.
See: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1804
src/shell-app.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 33d5ec3a7a..63f3edeabc 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1289,8 +1289,7 @@ shell_app_launch (ShellApp *app,
global = shell_global_get ();
context = shell_global_create_app_launch_context (global, timestamp, workspace);
- if (discrete_gpu)
- g_app_launch_context_setenv (context, "DRI_PRIME", "1");
+ g_app_launch_context_setenv (context, "DRI_PRIME", discrete_gpu ? "1" : "0");
/* Set LEAVE_DESCRIPTORS_OPEN in order to use an optimized gspawn
* codepath. The shell's open file descriptors should be marked CLOEXEC
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]