nvidia-prime support at login #393

Closed
jriddell opened this Issue Apr 2, 2015 · 3 comments

Comments

Projects
None yet
4 participants
Contributor

jriddell commented Apr 2, 2015

Nvidia Prime is a funky setup for users who feel the need for both NVidia and Intel GPUs on their computer. This needs a program to be run as root at login and logout. Here's a patch I'm using in Kubuntu to run the program at login.

This would be more elegant with cascading config support as requested in #217 then the nvidia-prime package could just set a config value like lightdm has:
"display-setup-script is run after the X server starts but before the user session / greeter is run. "

Contributor

jriddell commented Apr 2, 2015

Patch:

Index: sddm-0.11.0/data/scripts/Xsetup
===================================================================
--- sddm-0.11.0.orig/data/scripts/Xsetup
+++ sddm-0.11.0/data/scripts/Xsetup
@@ -1,3 +1,7 @@
 #!/bin/sh
 # Xsetup - run as root before the login dialog appears

+if [ -e /sbin/prime-offload ]; then
+    echo running NVIDIA Prime setup /sbin/prime-offload, you will need to manually run /sbin/prime-switch to shut down
+    /sbin/prime-offload
+fi

@plfiorini plfiorini self-assigned this Apr 2, 2015

tseliot commented Apr 2, 2015

We have "display-setup-script" (which seems to be the same as the "DisplayCommand" entry in sddm), and "display-stopped-script" to execute a script immediately after X is stopped. I've just written some code that should add the latter (it's more of a copy and paste).

@jleclanche jleclanche added the feature label Jul 16, 2015

Owner

plfiorini commented Aug 20, 2015

Maybe this is something that we would add by default.

@jriddell Is there any change between distros on how NVIDIA Prime is handled?

@plfiorini plfiorini closed this Sep 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment