[gnome-shell/wip/hadess/always-launch-discrete-gpu: 1/6] shell-app: Launch on integrated GPU when requested
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/hadess/always-launch-discrete-gpu: 1/6] shell-app: Launch on integrated GPU when requested
- Date: Mon, 21 Oct 2019 11:23:41 +0000 (UTC)
commit 3f627cb409bacf58fac8be50faba38e1e93c6a56
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: #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]