[gnome-shell/wip/hadess/always-launch-discrete-gpu: 1/4] 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/4] shell-app: Launch on integrated GPU when requested
- Date: Wed, 23 Oct 2019 09:56:36 +0000 (UTC)
commit 4295b6131a149484dd55bcaa31721b8ed7750a3a
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]