nvidia: provide a working X .conf for igpu+nvidia and only nvidia.
A modified xorg.conf.d snippet that works in all setups that I tested: - NVIDIA as primary GPU - Intel as primary GPU and NVIDIA PRIME Render offload It is very important that to make PRIME render offload working the 'xf86-video-intel` pkg must not be installed. As explained in the official NVIDIA documentation only the "modesetting" driver is supported.
This commit is contained in:
parent
2c1077f1d7
commit
efbefc311e
|
@ -0,0 +1,18 @@
|
|||
Section "ServerLayout"
|
||||
Identifier "layout"
|
||||
Option "AllowNVIDIAGPUScreens"
|
||||
EndSection
|
||||
|
||||
Section "OutputClass"
|
||||
Identifier "intel"
|
||||
MatchDriver "i915"
|
||||
Driver "modesetting"
|
||||
EndSection
|
||||
|
||||
Section "OutputClass"
|
||||
Identifier "nvidia"
|
||||
MatchDriver "nvidia-drm"
|
||||
Driver "nvidia"
|
||||
Option "AllowEmptyInitialConfiguration"
|
||||
ModulePath "/usr/lib/nvidia/xorg"
|
||||
EndSection
|
|
@ -48,11 +48,11 @@ do_install() {
|
|||
vinstall nvidia_drv.so 755 usr/lib/xorg/modules/drivers
|
||||
|
||||
# GLX extension module for X
|
||||
vinstall libglxserver_nvidia.so.${version} 755 usr/lib/xorg/modules/extensions
|
||||
vinstall libglxserver_nvidia.so.${version} 755 usr/lib/nvidia/xorg
|
||||
ln -sf libglxserver_nvidia.so.${version} \
|
||||
${DESTDIR}/usr/lib/xorg/modules/extensions/libglxserver_nvidia.so
|
||||
${DESTDIR}/usr/lib/nvidia/xorg/libglxserver_nvidia.so
|
||||
ln -sf libglxserver_nvidia.so.${version} \
|
||||
${DESTDIR}/usr/lib/xorg/modules/extensions/libglxserver_nvidia.so.1
|
||||
${DESTDIR}/usr/lib/nvidia/xorg/libglxserver_nvidia.so.1
|
||||
|
||||
vinstall libnvidia-egl-wayland.so.1.1.4 755 usr/lib
|
||||
ln -sf libnvidia-egl-wayland.so.1.1.4 \
|
||||
|
@ -138,19 +138,14 @@ do_install() {
|
|||
-i ${DESTDIR}/usr/src/nvidia-${version}/dkms.conf
|
||||
|
||||
vmkdir /usr/share/X11/xorg.conf.d/
|
||||
vinstall nvidia-drm-outputclass.conf 644 \
|
||||
/usr/share/X11/xorg.conf.d 30-nvidia-drm-outputclass.conf
|
||||
vinstall ${FILESDIR}/nvidia-drm-outputclass.conf 644 \
|
||||
/usr/share/X11/xorg.conf.d 10-nvidia-drm-outputclass.conf
|
||||
|
||||
# Blacklist nouveau
|
||||
vmkdir usr/lib/modprobe.d
|
||||
echo "blacklist nouveau" > ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
|
||||
chmod 644 ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
|
||||
|
||||
# Omit drm dracut module too
|
||||
vmkdir usr/lib/dracut/dracut.conf.d
|
||||
echo "omit_dracutmodules+=\" drm \"" > \
|
||||
${DESTDIR}/usr/lib/dracut/dracut.conf.d/99-nvidia.conf
|
||||
|
||||
# License and documentation
|
||||
vlicense LICENSE
|
||||
vdoc README.txt README
|
||||
|
@ -261,7 +256,6 @@ nvidia-dkms_package() {
|
|||
pkg_install() {
|
||||
vmove usr/src
|
||||
vmove usr/lib/modprobe.d
|
||||
vmove usr/lib/dracut
|
||||
}
|
||||
}
|
||||
nvidia-opencl_package() {
|
||||
|
|
Loading…
Reference in New Issue