From 77121c304ffba19d61f5b909c209aabd900ca7fe Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 07:47:01 +0100 Subject: [PATCH] install nvidia-tls.so in libdir; install xorg configuration fragment and blacklist nouveau [release 340.108-13mamba;Thu Feb 09 2023] --- 20-nvidia.conf | 14 ++++++++++++++ nvidia_340.spec | 23 ++++++++++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 20-nvidia.conf diff --git a/20-nvidia.conf b/20-nvidia.conf new file mode 100644 index 0000000..4087286 --- /dev/null +++ b/20-nvidia.conf @@ -0,0 +1,14 @@ +Section "Files" + ModulePath "/usr/lib64/nvidia/xorg" + ModulePath "/usr/lib64/xorg/modules" +EndSection + +Section "Device" + Identifier "Nvidia Card" + Driver "nvidia" + VendorName "NVIDIA Corporation" +EndSection + +Section "ServerFlags" + Option "IgnoreABI" "1" +EndSection diff --git a/nvidia_340.spec b/nvidia_340.spec index ca2e089..73ca37c 100644 --- a/nvidia_340.spec +++ b/nvidia_340.spec @@ -2,7 +2,7 @@ Name: nvidia_340 Version: 340.108 Epoch: 1 -Release: 12mamba +Release: 13mamba Summary: NVIDIA proprietary accelerated drivers for the Linux Kernel Group: System/Kernel and Hardware Vendor: openmamba @@ -12,6 +12,7 @@ URL: https://www.nvidia.com/en-us/drivers/unix/ Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}.run Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run Source2: nvidia_340.sysusers +Source3: 20-nvidia.conf Patch0: nvidia-331.20-x86-conftest.patch Patch1: nvidia-340.102-kernel-4.9.patch Patch2: nvidia_340-340.102-kernel-4.9-2.patch @@ -176,7 +177,7 @@ install -D -m755 libnvidia-ml.so.%{version} %{buildroot}%{_libdir}/libnvidia-ml. install -D -m755 libvdpau_nvidia.so.%{version} %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.%{version} # nvidia-tls library -install -D -m755 tls/libnvidia-tls.so.%{version} %{buildroot}%{_libdir}/tls/libnvidia-tls.so.%{version} +install -D -m755 tls/libnvidia-tls.so.%{version} %{buildroot}%{_libdir}/libnvidia-tls.so.%{version} # CUDA install -D -m755 libcuda.so.%{version} %{buildroot}%{_libdir}/libcuda.so.%{version} @@ -231,9 +232,12 @@ cp -a kernel/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ cat kernel/uvm/dkms.conf.fragment >> %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf ## blacklist nouveau -#install -d -m0755 %{buildroot}%{_modprobedir} -#echo "blacklist nouveau -#" > %{buildroot}%{_modprobedir}/%{name}.conf +install -d -m0755 %{buildroot}%{_modprobedir} +echo "blacklist nouveau +" > %{buildroot}%{_modprobedir}/%{name}.conf + +# Install X.org configuration fragment +install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/20-nvidia.conf ## Clutter workaround (http://blog.sukimashita.com/2015/04/13/gnome-3-16-and-nvidia-binary-driver-crash-with-totem-gnome-maps-cheese-and-others/) #mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ @@ -298,11 +302,13 @@ fi %defattr(-,root,root) #%{_sysconfdir}/profile.d/nvidia-clutter.sh %{_sysconfdir}/OpenCL/vendors/nvidia.icd +%{_sysconfdir}/X11/xorg.conf.d/20-nvidia.conf %dir %{_prefix}/src/%{name}-%{version} %{_prefix}/src/%{name}-%{version}/* %{_bindir}/nvidia-* -%{_prefix}/lib/systemd/system/nvidia-persistenced.service +%{_unitdir}/nvidia-persistenced.service %{_prefix}/lib/sysusers.d/nvidia.conf +%{_modprobedir}/%{name}.conf %{_libdir}/nvidia/libEGL.so.* %{_libdir}/nvidia/libGL.so.* %{_libdir}/nvidia/libGLESv1_CM.so.* @@ -310,9 +316,9 @@ fi %{_libdir}/libcuda.so.* %{_libdir}/libnvcuvid.so.* %{_libdir}/libnvidia-*.so.* +%{_libdir}/libnvidia-tls.so.* %{_libdir}/nvidia/xorg/libglx.so %{_libdir}/nvidia/xorg/libglx.so.* -%{_libdir}/tls/libnvidia-tls.so.* %{_libdir}/vdpau/libvdpau_nvidia.so.* %{_libdir}/xorg/modules/drivers/nvidia_drv.so %{_datadir}/applications/nvidia-settings.desktop @@ -332,6 +338,9 @@ fi %doc current/{NVIDIA_Changelog,README.txt} current/html %changelog +* Thu Feb 09 2023 Silvan Calarco 340.108-13mamba +- install nvidia-tls.so in libdir; install xorg configuration fragment and blacklist nouveau + * Tue Feb 07 2023 Silvan Calarco 340.108-12mamba - patch dkms.conf to fix build error caused by src dir called nvidia_340