Support different Xorg parameters for greeter and user session - better support for Optimus laptops
This is clearly a new feature request. I own an Nvidia Optimus laptop. The internal panel is wired to the Intel GPU, the external HDMI and DP ports are wired to Nvidia GPU. Bumblebee does an awesome job when I need to display the Nvidia render on internal panel for a particular program and to save my battery when I'm ok with performance of the Intel GPU. I can't achieve multi-monitor with intel+bumblebee.
I ended up using PRIME to run my man Xorg server on Nvidia (both greeter and user session). I managed to create 2 layouts in the xorg.conf that strart either an Intel-only server or an Nvidia server with Intel as inactive. running xrandr in the session startup script does a good job and I can see Nvidia-rendered screen on internal panel and also use external ports.
I'm looking for the way to
- always run Xorg for greeter on Intel (I think it can be achieved by putting an intel-only layout 1st in xorg.conf)
- control startup parameters of the Xorg for user session per session type (at least -layout) so that I could create an Intel-only gnome session and nvidia-prime gnome session. Additionally, mangling of LDPATH may be required before starting Xorg as Nvidia and mesa supply incompatible libGL, or switch to libglvnld
By using this mechanism I will be able to switch between a power-hungry PRIME setup and power-efficient Intel-only setup by re-login instead of mangling a lot of files and restarting GDM.
This is how my xorg.conf looks like:
Section "ServerLayout"
Identifier "nvidia-prime"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "ServerLayout"
Identifier "intel"
Screen 0 "intel"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
#Option "UseDisplayDevice" "none"
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
Option "DRI" "3"
EndSection