diff --git a/.SRCINFO b/.SRCINFO index fc98359..84b6482 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = nvidia-340xx-lts pkgdesc = NVIDIA drivers for linux-lts, 340xx legacy branch pkgver = 340.108 - pkgrel = 3 + pkgrel = 4 url = https://www.nvidia.com/ arch = x86_64 license = custom @@ -11,12 +11,14 @@ pkgbase = nvidia-340xx-lts conflicts = nvidia-lts options = !strip source = https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run + source = 20-nvidia.conf source = 0000-fix-multi-core-build.patch source = 0001-kernel-5.7.patch source = 0002-kernel-5.8.patch source = 0003-kernel-5.9.patch source = 0004-kernel-5.10.patch sha256sums = 995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77 + sha256sums = 5b4cb7620abc1729a13c78a2fb33ccaeb7d92f42936d929885324c81f2b7c985 sha256sums = 82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890 sha256sums = c8bda5fb238fbebc5bf6ae4b7646e48b30a96b9060ced20d93c53c14ac3161f6 sha256sums = 10b91c8dbc269ff1d8e3e8a1866926c309ff3912d191a05cd5724a3139776f32 @@ -25,12 +27,14 @@ pkgbase = nvidia-340xx-lts pkgname = nvidia-340xx-lts pkgdesc = NVIDIA drivers for linux-lts, 340xx legacy branch. + install = nvidia-340xx-lts.install depends = linux-lts>=4.19.72 depends = nvidia-340xx-utils=340.108 depends = libgl pkgname = nvidia-340xx-lts-dkms pkgdesc = NVIDIA driver sources for linux-lts, 340xx legacy branch + install = nvidia-340xx-lts.install depends = dkms depends = nvidia-340xx-utils=340.108 depends = libgl @@ -38,4 +42,3 @@ pkgname = nvidia-340xx-lts-dkms provides = nvidia-340xx=340.108 conflicts = nvidia-lts conflicts = nvidia-340xx - 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/PKGBUILD b/PKGBUILD index 51fb4a6..0ac62f2 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=nvidia-340xx-lts pkgname=(nvidia-340xx-lts nvidia-340xx-lts-dkms) pkgver=340.108 -pkgrel=3 +pkgrel=4 pkgdesc="NVIDIA drivers for linux-lts, 340xx legacy branch" arch=('x86_64') url="https://www.nvidia.com/" @@ -17,6 +17,7 @@ options=(!strip) # seems manjaro is keeping this current # https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run" + 20-nvidia.conf 0000-fix-multi-core-build.patch 0001-kernel-5.7.patch 0002-kernel-5.8.patch @@ -24,6 +25,7 @@ source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Li 0004-kernel-5.10.patch ) sha256sums=('995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77' + '5b4cb7620abc1729a13c78a2fb33ccaeb7d92f42936d929885324c81f2b7c985' '82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890' 'c8bda5fb238fbebc5bf6ae4b7646e48b30a96b9060ced20d93c53c14ac3161f6' '10b91c8dbc269ff1d8e3e8a1866926c309ff3912d191a05cd5724a3139776f32' @@ -59,6 +61,7 @@ build() { package_nvidia-340xx-lts() { pkgdesc="NVIDIA drivers for linux-lts, 340xx legacy branch." depends=('linux-lts>=4.19.72' "nvidia-340xx-utils=$pkgver" 'libgl') + install=nvidia-340xx-lts.install install -Dt "${pkgdir}${_extradir}" -m644 \ "${srcdir}/${_pkg}/kernel"/{nvidia,uvm/nvidia-uvm}.ko @@ -67,6 +70,8 @@ package_nvidia-340xx-lts() { echo "blacklist nouveau" | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia-340xx-lts.conf" + + install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx-lts/20-nvidia.conf" } package_nvidia-340xx-lts-dkms() { @@ -75,6 +80,7 @@ package_nvidia-340xx-lts-dkms() { optdepends=('linux-lts-headers: Build the module for lts kernel') provides=("nvidia-340xx=$pkgver") conflicts+=('nvidia-340xx') + install=nvidia-340xx-lts.install cd "${_pkg}" @@ -84,6 +90,8 @@ package_nvidia-340xx-lts-dkms() { echo "blacklist nouveau" | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf" + + install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx-lts/20-nvidia.conf" } # vim:set ts=2 sw=2 et: diff --git a/nvidia-340xx-lts.install b/nvidia-340xx-lts.install new file mode 100644 index 0000000..e29b7a2 --- /dev/null +++ b/nvidia-340xx-lts.install @@ -0,0 +1,14 @@ +post_install() { + cat <>> You must tell Xorg to use the nvidia driver with kernels >=5.11.0. + You must also set IgnoreABI option with Xorg version >= 21.1.1. + Minimal config example provided in /usr/share/nvidia-340xx-lts/20-nvidia.conf + which you should manually place in /etc/X11/xorg.conf.d/ + +END +} + +post_upgrade() { + post_install +}