I recently bought a new laptop, a Clevo PA70ES with a i7-8750H processor and a nvidia 1070 graphics card. Since this is a game laptop it's fairly power-hungry and does not last long when running on battery. To be able to use this thing as a somewhat portable Workstation I had to tweak a few settings. The first of which is enabling gpu switching between the integrated GPU and the nvidia GPU. Since the NVIDIA GPU can be quite power hungry ( > 100w ) it makes sense to disable it when on battery.
Luckily for me, packages that do the switching between the NVIDIA and Intel GPU already exist. Unfortunately none of them were easy to set up or use. With some trial and error, and configuring Xorg by hand I figured out you can switch the Xorg configuration over to intel - stop Xorg and unload the nvidia drivers, then disable the GPU Like so:
modprobe -r -f nvidia-drm modprobe -r -f nvidia-modeset modprobe -r -f nvidia echo 1> /sys/devices/pci0000:00/0000:00:01.0/remove
Ubuntu however has until recently had a package that enables quick switching between these GPUs. Even better, It's GPL-licenced and can be found here: https://github.com/andrebrait/prime-indicator . It's a fairly simple python script that allows the user to quickly switch between existing Xorg configurations.
I modified this ubuntu package to directly replace the Xorg.conf with the ones I wrote by hand - also eliminating a few dependencies in the process. This script was then packagaged with the configuration files neccesary to run it. I've included it below - it should install without trouble on any Gentoo SDDM desktop.