Add dracut.conf.d/99-nvidia.conf file enforcing that the nvidia modules never
get added to the initramfs.
This is necessary because the userspace bits and the kernel modules must
be 100% in sync, otherwise things might break. Normally we build the initrd
before building the dkms / akmod so this issue will only happen if the initrd
somehow gets re-generated afterwards, still this is something which we should
avoid.
Patch from Hans de Goede
On systems prior to Fedora 25 the modules directory is specified in the file /etc/X11/xorg.conf.d/99-nvidia.conf, which is always loaded even if a user has a custom xorg.conf. On Fedora 25+, if the driver is installed and is not actually used (fallback scenario) this makes the X server to always load the Nvidia extension.
On Fedora 25+ the OutputClass configuration for the i915 driver is alreay at this default for Intel gen4+ systems, on Intel gen3 systems it prevents the usage of Glamor and there are no gen3 Optimus laptops.
- Bring default RHEL 6 X.org configuration on par with Fedora/RHEL 7+ and make sure it is installed by default.
- Install RHEL 6 X.org configuration template only on RHEL 6, make sure it does not end in .conf to avoid confusion.
- Simplify GRUB installation for Grub 1 (RHEL 6) and Grub 2 (RHEL 7+/Fedora), do not use obsolete kernel parameters.
- Do not regenerate all the Grub configuration the user might have, just add the required parameters.
- Add kernel parameters to default grub file on Fedora/RHEL 7+ just in case the user uses grub-mkconfig.
This also simplifies Grub configuration for other distributions and removes the "upgrade path" from Fedora 16 Grub 1.