diff --git a/config/10-nvidia-modules.conf.debian.in b/config/10-nvidia-modules.conf.debian.in new file mode 100644 index 0000000000..9b07698381 --- /dev/null +++ b/config/10-nvidia-modules.conf.debian.in @@ -0,0 +1,16 @@ +# This xorg.conf.d configuration snippet is a Debian version of a supplement to +# /etc/X11/xorg.conf.d/10-nvidia.conf that sets module paths for nvidia GLX libraries +# when it detects a device driven by the nvidia-drm kernel driver. +# Please note that this works on Linux kernels version 6.12 or higher +# with CONFIG_DRM enabled, and only if the nvidia-drm.ko kernel module +# for the versions 390 and later of the nvidia driver or the nvidia.ko +# kernel module for the version 340 is loaded before the X server is started. + +Section "OutputClass" + Identifier "NVidia-modules" + MatchDriver "nvidia-drm" + Module "glx" + Module "glxserver_nvidia" + # Debian specific directories + ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/nvidia/nvidia" +EndSection diff --git a/config/10-nvidia-modules.conf.in b/config/10-nvidia-modules.conf.in new file mode 100644 index 0000000000..3063804c4b --- /dev/null +++ b/config/10-nvidia-modules.conf.in @@ -0,0 +1,15 @@ +# This xorg.conf.d configuration snippet is a supplement to +# 10-nvidia.conf that sets module paths for nvidia GLX libraries +# when it detects a device driven by the nvidia-drm kernel driver. +# Please note that this works on Linux kernels version 6.12 or higher +# with CONFIG_DRM enabled, and only if the nvidia-drm.ko kernel module +# for the versions 390 and later of the nvidia driver or the nvidia.ko +# kernel module for the version 340 is loaded before the X server is started. + +Section "OutputClass" + Identifier "NVidia-modules" + MatchDriver "nvidia-drm" + Module "glx" + Module "glxserver_nvidia" + ModulePath "@libdir@/nvidia/xorg" +EndSection diff --git a/config/10-nvidia.conf.debian.in b/config/10-nvidia.conf.debian.in new file mode 100644 index 0000000000..018dc1b24c --- /dev/null +++ b/config/10-nvidia.conf.debian.in @@ -0,0 +1,16 @@ +# This xorg.conf.d configuration snippet for Debian configures the X server to +# automatically load the nvidia X driver when it detects a device +# driven by the nvidia-drm kernel driver. +# Please note that this works on Linux kernels version 6.12 or higher +# with CONFIG_DRM enabled, and only if the nvidia-drm.ko kernel module +# for the versions 390 and later of the nvidia driver or the nvidia.ko +# kernel module for the version 340 is loaded before the X server is started. + +Section "OutputClass" + Identifier "NVidia" + MatchDriver "nvidia-drm" + Driver "nvidia" + Option "AllowEmptyInitialConfiguration" + # Debian specific directories + ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/nvidia/nvidia" +EndSection diff --git a/config/10-nvidia.conf.in b/config/10-nvidia.conf.in index ff7236289a..315bf98992 100644 --- a/config/10-nvidia.conf.in +++ b/config/10-nvidia.conf.in @@ -1,16 +1,15 @@ # This xorg.conf.d configuration snippet configures the X server to -# automatically load the nvidia X driver and nvidia GLX libraries -# when it detects a device driven by nvidia-drm.ko kernel module. +# automatically load the nvidia X driver when it detects a device +# driven by the nvidia-drm kernel driver. # Please note that this works on Linux kernels version 6.12 or higher # with CONFIG_DRM enabled, and only if the nvidia-drm.ko kernel module -# is loaded before the X server is started. +# for the versions 390 and later of the nvidia driver or the nvidia.ko +# kernel module for the version 340 is loaded before the X server is started. Section "OutputClass" - Identifier "NVidia" - MatchDriver "nvidia-drm" - Driver "nvidia" - Module "glx" - Module "glxserver_nvidia" - Option "AllowEmptyInitialConfiguration" - ModulePath "@libdir@/nvidia/xorg" + Identifier "NVidia" + MatchDriver "nvidia-drm" + Driver "nvidia" + Option "AllowEmptyInitialConfiguration" + ModulePath "@libdir@/nvidia/xorg" EndSection diff --git a/config/meson.build b/config/meson.build index a4f73c7cd1..b6f9e3987f 100644 --- a/config/meson.build +++ b/config/meson.build @@ -34,6 +34,24 @@ if build_xorg configuration: nvidia_conf, install_dir: join_paths(get_option('datadir'), 'X11/xorg.conf.d'), ) + configure_file( + input: '10-nvidia-modules.conf.in', + output: '10-nvidia-modules.conf', + configuration: nvidia_conf, + install_dir: join_paths(get_option('datadir'), 'X11/xorg.conf.d'), + ) + configure_file( + input: '10-nvidia.conf.debian.in', + output: '10-nvidia.conf.debian', + configuration: nvidia_conf, + install_dir: join_paths(get_option('sysconfdir'), 'X11/xorg.conf.d'), + ) + configure_file( + input: '10-nvidia-modules.conf.debian.in', + output: '10-nvidia-modules.conf.debian', + configuration: nvidia_conf, + install_dir: join_paths(get_option('sysconfdir'), 'X11/xorg.conf.d'), + ) endif libxserver_config = static_library('xserver_config',