[gnome-control-center/wip/hadess/nvidia-dual-gpu] info: Fix "Graphics" entry with NVidia proprietary drivers
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/hadess/nvidia-dual-gpu] info: Fix "Graphics" entry with NVidia proprietary drivers
- Date: Fri, 25 Oct 2019 14:42:48 +0000 (UTC)
commit 2f02014e621dab9864dee30453bfd887206b53d3
Author: Bastien Nocera <hadess hadess net>
Date: Fri Oct 25 16:19:06 2019 +0200
info: Fix "Graphics" entry with NVidia proprietary drivers
DRI_PRIME=1 won't do anything when the NVidia driver is used for the
second "discrete" GPU, so also set the envvars necessary to fetch the
right GPU name from the gnome-session helper.
https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/604
panels/info-overview/cc-info-overview-panel.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index 65b7d21f1..951f6e4ef 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -244,6 +244,8 @@ get_renderer_from_helper (gboolean discrete_gpu)
{
envp = g_get_environ ();
envp = g_environ_setenv (envp, "DRI_PRIME", "1", TRUE);
+ envp = g_environ_setenv (envp, "__NV_PRIME_RENDER_OFFLOAD", "1", TRUE);
+ envp = g_environ_setenv (envp, "__GLX_VENDOR_LIBRARY_NAME", "nvidia", TRUE);
}
if (!g_spawn_sync (NULL, (char **) argv, envp, 0, NULL, NULL, &renderer, NULL, &status, &error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]