Nvidia Optimus: Switch on Boot with Systemd
/etc/grub.d/40_custom:
/etc/local.d/gpu_switch.start:
/usr/share/sddm/scripts/Xsetup:
/etc/X11/xorg.conf_working_nvidia:
Section "Files"
ModulePath "/usr/lib/opengl/nvidia"
ModulePath "/usr/lib32/opengl/nvidia"
ModulePath "/usr/lib32/xorg/modules"
ModulePath "/usr/lib64/opengl/nvidia/xorg"
ModulePath "/usr/lib64/xorg/modules"
EndSection
Section "ServerLayout"
Identifier "layout"
Screen 1 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:2:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
#Option "AllowEmptyInitialConfiguration" "Yes"
#Option "UseDisplayDevice" "none"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
Option "AccelMethod" "none"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection