Closed ndavd closed 3 months ago
First enable the prime-switch
script to be executed from your account by appending this to /etc/sudoers
<username> ALL = NOPASSWD: /usr/bin/prime-switch
Then in your .xinitrc
execute /usr/bin/prime-offload
before your display manager. Also execute sudo /usr/bin/prime-switch
after your display manager (executed when you log out).
Mine looks like this
/usr/bin/prime-offload
ssh-agent dwm
sudo /usr/bin/prime-switch
And by doing that are you sure it does what we want? Because it seems that it executes the script after the window manager starts
@ndavidq0 it does exactly what described in the wiki, namely running a command just after xorg starts(but before dwm starts), and another one after it stops
Thanks I'll try that
This didn't work for me (i.e. after I do the switch command it logs off, I execute startx and get a black-screen)
/usr/bin/prime-offload
exec bspwm
sudo /usr/bin/prime-switch
What am I doing wrong here?
Does removing the exec
bit work? So like:
/usr/bin/prime-offload
bspwm
sudo /usr/bin/prime-switch
Reopen if that doesn't work.
Could this be a bit more specific https://github.com/Askannz/optimus-manager/wiki/FAQ,-common-issues,-troubleshooting#i-do-not-use-a-display-manager-i-use-startx-or-xinit ?