-
an alternative to bumblebee or optimus-manager for those of us who have optimus enabled laptops.
-
my initial goal was to just write a small bash script that would let me easily jump back and forth from using PRIME that i have set up thanks to @jonathon 's tutorial, and also an intel only setup that completely powers down the nvidia GPU in a way that does not cause lockups, break sleep/suspend cycles, and allows for the very best performance when i want it and the very best battery life when it's needed (not often in my case, but whatever, why not?) .
-
yes, im aware optimus-manager does this already but stability and need for replacing key packages for ones from the aur to get it working properly (maybe) are not ideal.
-
i did not make this because other options were not good enough, i made it because i felt like it at the time and was a great learning experience. this is now how i currently have 3 separate installs set up (xfce/openbox, kde, gnome) and they are all working great.
after setup all thats needed to switch default modes is:
-
sudo set-nvidia.sh
(for intel/nvidia PRIME) -
sudo set-intel.sh
(for intel only mode with nvidia gpu disabled, removed from sysfs) -
When in intel/nvidia (prime) mode it is setup the same way @jonathon 's PRIME tutorial is and allows for the best possible performance using an optimus laptop running linux AFAIK anyway.
-
When in intel only mode it works as it should when using a non optimus laptop saving a decent amount of power and extending battery life for the times your away from AC power. the nvidia gpu is disabled/powered-down and removed from sight after reaching graphical.target .
-
these commands do not need to be run before each reboot, only when you want to change the default boot mode. yes, to change modes requires a reboot, this is by intentional design due to finding that switching by logging out and logging in as optimus-manager does it is not stable setup and often causes a lockup or a black screen situation needing a reboot anyway. i may add this functionality as an alternate script for those who want to do it this way. i'll update this post if that happens.
Thanks for reading, the github repo links are below. please feel free to ask any questions or make suggestions. again, Thanks. @dglt
for GDM:
for LightDM:
for SDDM:
all three optimus-switch variants are ready to go, have updated install scripts and updated instructions on github pages.
and special thanks to @vetzki , @AgentS for their input on a few things i would have struggled to fully understand, @jonathon for a great, easy to follow tutorial, @tbg for his help/input in the past on writing systemd service units, and @linesma for being the first lab rat other than myself . thanks again.
UPDATE: the lightdm version no longer requires manually editing lightdm.conf and the github instructions are updated to reflect this change.