[PATCH xserver 0/6] xfree86: Extend OutputClass config sections

Hans de Goede hdegoede at redhat.com
Mon Dec 12 16:03:11 UTC 2016


Hi All,

This patch series main goal (*) is to allow the nvidia binary driver
to install a xorg.conf snippet with the following contents:

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib64/nvidia/xorg"
EndSection

This snippet has 2 purposes:

1) Make the xserver autoconfig code automatically set things up the
right way for the nvidia driver on optimus enabled laptops. This way
the nvidia driver will just work on such setups without the user needing
to write / use a laptop model specific xorg.conf, this is the main goal
of this series

2) Make the xserver add "/usr/lib64/nvidia/xorg" to the front of the
module search-path when the nvidia driver is in use. Before this patch-set
the nvidia driver would drop a config snippet which unconditionally
does this, causing the xserver to always load the nvidia glx module
instead of its own glx module.

Making the adding of "/usr/lib64/nvidia/xorg" conditional, fixes the
server using the wrong glx module when the nvidia kernel module did not
get loaded for some reason. This fixes e.g. gdm not working due to
broken glx support, requiring the user to reboot into text-only or
single user mode to fix things. Now we will atleast still give the
user a gui to e.g. go on a forum to ask for help.

Together with glvnd support for mesa this actually means that the
nouveau/modesetting + mesa user-space can be fully parallel installed with
the nvidia driver user-space and the xserver will just do the right thing
(depending on the loaded kernel module) and everything will just work. This
will also allow for easier switching between nouveau and the nvidia driver.

Regards,

Hans


*) I can imagine some other uses for it too, I've tried to keep this as
generic as possible.


More information about the xorg-devel mailing list