1 |
commit: 837800de7e642e5875c3fa0059fc6848b170fd50 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 28 16:32:06 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 28 17:25:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=837800de |
7 |
|
8 |
x11-drivers/nvidia-drivers: add 515.57 |
9 |
|
10 |
Now needs >=egl-wayland-1.1.10 or else get a missing symbol if try to |
11 |
use vulkan on wayland. 515.57 still ships with 1.1.9 but it's a |
12 |
modified version of 1.1.9, likewise 1.1.10-r1 is a bit modified given |
13 |
it's currently in a poor state upstream (hopefully this works fine). |
14 |
|
15 |
Also install nvidia-dbus.conf again, file was sanitized upstream |
16 |
and believe it should be fine install. |
17 |
|
18 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
19 |
|
20 |
x11-drivers/nvidia-drivers/Manifest | 8 + |
21 |
.../nvidia-drivers/nvidia-drivers-515.57.ebuild | 506 +++++++++++++++++++++ |
22 |
2 files changed, 514 insertions(+) |
23 |
|
24 |
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest |
25 |
index 5a59a1aaf1f8..44e4b6aeadd8 100644 |
26 |
--- a/x11-drivers/nvidia-drivers/Manifest |
27 |
+++ b/x11-drivers/nvidia-drivers/Manifest |
28 |
@@ -1,30 +1,38 @@ |
29 |
DIST NVIDIA-Linux-aarch64-510.73.05.run 211202539 BLAKE2B 0841e4a6fe09d2f0720b25eee545d15d09edb9689ea886fcf86394d09472cda1119488c58325b7bdc20a13af8bcf577056b44987a5a276d2914935fc223285a1 SHA512 bf46b4b8116819ef58fe3aeafe823627d797dd42e936cdc10f93a4acbfe2d7a53614f3d3ce1e43a1027c7d4c6ed5cceb66bd7ebba98471ecbe660b711e0b62de |
30 |
DIST NVIDIA-Linux-aarch64-515.48.07.run 217966782 BLAKE2B 17c8cc56370a25edc27fe9788d076cc8ad303834a9ae82de6729400f11b3339033834ea0ecba7f114288c62a7efaece62c783819cf86835d526be93c9095787e SHA512 6676ada7c2597ce0c5108aaa2b99a06ca4306b5afde33b4c9d2f7a6a720b6aa7555f9ac219726d06ec6b770b54a36f5590a1dbd5cb247290f9f1103d92378c45 |
31 |
+DIST NVIDIA-Linux-aarch64-515.57.run 220881279 BLAKE2B a0ecf7f18644da11ef813ffe27c900f43d6ef6f7f6cde8626e0884aab9003c5dc026a43e0708409f07518f6d313dfa84f976834d10f872c9e5fda372c8990e69 SHA512 e863fea28fd8b47c21c8832b41eee17ede3c15a0b281c7a8bb143b7d4f07f477e5b30757477f16b3fd4a096b53f25da165f6db641ea3d3dd17893813df3d2a53 |
32 |
DIST NVIDIA-Linux-x86-390.151.run 50757681 BLAKE2B 48821fd918b858167f4f6bda123b132898baea1c41fe7a9273bd67c54d664fce949c9557a7978766661c23e6bc61cb12d1ff6d376c050cdb4cecad117eae7001 SHA512 4e60a5886a8d25b86efed62c01a4ad3aae43c515c8be18ada3f3a20b47c9c6e1d4ca5f268b00932d52ef4330d84c4324e574e6847fef871ddfaa9a0e9dc9751b |
33 |
DIST NVIDIA-Linux-x86_64-390.151.run 86025677 BLAKE2B 8f78ee00d15ffac9f371e8302541eee8b033670953850dd770c6615eb674fcda2adcea52582284c59a9d7e32943a445d65515b1cacd6f8e5fcbe6c9e94080fb0 SHA512 aad962e4132c8ab031b5f72e47fbd4b5c49824bc175f13fd2c6fb3e539d41ff9829835ce4928bbfa56aba2ffa43fbe3d8049e9246e29b19abcea0ac89bdae5d4 |
34 |
DIST NVIDIA-Linux-x86_64-470.129.06.run 272145574 BLAKE2B 9eb75456f3aa6cea13a66b9e161677e06ab3a3e12d960df3973adfa7ded4aefc5336761398f92e91a304786e48c1cc0a34675ad18d416297a177d677668ec4a2 SHA512 6f61f01b3840e30b3cd195ecb81826c37200e27b79d555808c873d5381fd55868bddf16a53f15cb51646af067705a6ce289c4cef514908b1b4b2d2e765907252 |
35 |
DIST NVIDIA-Linux-x86_64-510.73.05.run 329250752 BLAKE2B dd79ad5a7c94cd50a832a224a5dcab7cb24368453417962ac63cb7dca6f7d9bfe0a41460df90f9793b9c8c2e42d1e3666c940cf9f869e18b201df385a66c7dd8 SHA512 c2ce41ee8112ad5450d6aa18f910da0870ac08a1ad0ab0d82a256b191c7826057afb3477e7a842244034c9eb9de37c6af919b0dd055bb90dd2a32d7e97a8c72c |
36 |
DIST NVIDIA-Linux-x86_64-515.48.07.run 360459673 BLAKE2B 5f998024070a73f8dae4b5525c651055b311217c0d1d9e40a11e10ba0932b13b4902c47a5a444a461dd3cc1c99de7b21654c9e3bc4195bade22f94794e41d58a SHA512 a8129334ce02e5decccc6b1c336723b58e0883f58ca1cef56288144278af996594dfa141882613453452cc8a0ed7d76839d6d1ecd30d11c73eacf21450524286 |
37 |
DIST NVIDIA-Linux-x86_64-515.49.05.run 361416064 BLAKE2B 7f2d9c9d418cb16fb154ff7130533c252a736bad92abe3f993212e837beb14db1882c56b539c81d170f0ea1e89a3cea3bd1f4dea6bddf5abd17687d011baf1bc SHA512 a9f184699b40bad8bc3a98a8abdf609fcfeea9f477e4731dfd792dee84a0122eae247479c2b97b3bcf9628fed51802774ff81ba594fe8614c92b339c44bbac21 |
38 |
+DIST NVIDIA-Linux-x86_64-515.57.run 363365091 BLAKE2B 13bd4d4cbfbfe99a9841d82e6ae86600ba93a5db1a87d8a3372fde2fb86b104adf31e345ec7ffd6bc076cda962521f64213bbc5ebe46077c6d457c2676b5f8c4 SHA512 6c6ff830dfdf9fb7d127cddc1d72b54e78dc14aeb07596413e82ffa62e065272781d2c487ffd25d153bdbeedb9b26d6fd80380304f736a47fa628aded0e817d6 |
39 |
DIST NVIDIA-kernel-module-source-515.48.07.tar.xz 7496780 BLAKE2B 681bd8dd416763826e2d227fedf67a54613f8ab0feaa1d5be4c5d864cd52aaaa98b6fe8f301d0cf1d1334fd8fc3acb312949f46acdabcd141fd15df21789b165 SHA512 5535703d8de781149ea9175785fc04ba9b2ea1c39a524dcf7937941d951489edfb94e72b2bde70044ed682a209b8923e14fa5314e12c46a1fb9621ee8a2e3269 |
40 |
DIST nvidia-installer-390.151.tar.bz2 150160 BLAKE2B 373c0f26ca258d6e274891ec49f8ae768b3ba50cc1079b697e310c52fac7710b221591074497803b3e65a8fc9c2f49a493126de0907a117d6af1101d190b2b38 SHA512 027676209d1ba5fa3bf63d716562beb308c28b083f9411461112493f006afa69bcad7c95c479724a841f2790548924a3cf4b11ae95b70e33854ce0b2eff4b8f8 |
41 |
DIST nvidia-installer-470.129.06.tar.bz2 146297 BLAKE2B d09351edc3b90bb401ced3cf883c18dfbd83b9a1f2d4b5595adc8a593357e848ad7d588ef2283ab11ee520860ba8786684e177d84156d75f78c8f312848255c4 SHA512 b49963d7c4fde2354f64e77373d0e1c9fdd71927b43101b5663be31d3b36bd3c652ae983286dc406b080fce6f2f2ff0151254ee833a39c81b44524d0b79090b6 |
42 |
DIST nvidia-installer-510.73.05.tar.bz2 144478 BLAKE2B 183ae9dd744905b2171226b4552ab88e85fb70b941db246f5e9a6cc01f17dbb30aa91738cce9ef9294326aff9aa2dfd121358c1374e94524ba00e20de338c72d SHA512 83deb6bca2c448f319c1a0065f5dea8d754e5b8e812b0342a4c85ef2c7bb2efeb2b3ebde3234e823c9029ef575a4cfe38e48acde3b2639b21d123e361d56c767 |
43 |
DIST nvidia-installer-515.48.07.tar.bz2 144506 BLAKE2B 6d1cc61e5ea20e94f467eeac873cfd5a2f56b2ac2be680284872c0f078d4e1d3aceabec395c9581273ac333fcc9642bbe346a228c4b691b5a4bc3a00494167b5 SHA512 219ca1cdd4b31779e0b7a0180b20e067d9f52bb5f54cfb38ec3e4559f13cd854caa7378d23ec2f171b54d9a8c0ddaabd7579f4f041c2b973df1d13a17466943b |
44 |
+DIST nvidia-installer-515.57.tar.gz 199931 BLAKE2B 6e3ceb3f3e3e042c7409eba282381a11f2ad593b831e1e07cbf07e218f7025b983ab6f4162e12bbaedb6f210963112d619f75f94ec3b9c24b9b925b71f2e9958 SHA512 6d0fb7503e61ff70a69ba8bcd063cb62b26b73f3941f5a5c4963b877c72358a7854e980f7bfbfb8b38d2e14d796f59bebf81e5e4f8d33f0a6571c965d7683bb4 |
45 |
DIST nvidia-modprobe-390.151.tar.bz2 35327 BLAKE2B 0bfc5057082b68df6e8d1431257ec2b95445dea2401d4d64af475a1b416f647bf04e64c484d27f0a52255216fad7c6d02659dea8d5bdaa7d3eba1eac8b3565da SHA512 257bd82139f7e598b47d3dea620aea2662332c69a19b3e6c2f02bf2705f204c10c8a2c7bdcde24ed044d4738c8d8a5f28fee78d6e87071d4b7a6c62687239bb1 |
46 |
DIST nvidia-modprobe-470.129.06.tar.bz2 38371 BLAKE2B 85bc02ea735cc6bf37e00b0c1d91110c58e67a0456598790758e5007bf097289b3910aaff27e7f7796b5ed3c6aed1f6f076f39808b7c77622f6adc650cd0445b SHA512 e37aa5ce6e471ed62aafd5854990bb145b5ffc64226ab8a91be877b89f4951b0f381d933d0463b30920485d7fc60a2271f4e2042ac9f347bea8785cf402a0465 |
47 |
DIST nvidia-modprobe-510.73.05.tar.bz2 39043 BLAKE2B 8601827f688c321ca98563b3eb35bf88e617997edad71522ac832d5fc1eeb1e7563d0d753b52519007bc3fc2347d09b3c5b9e2eb544d2868fc3a95990886e195 SHA512 cf6fad9d4a3873ec9e7142aa276782cdb5419ff4e55354d1cb6ca9baadaadabb7536e68c76084b34eeb241d005e5018f0d4da7b1044c5ff553d2c59b8215e75f |
48 |
DIST nvidia-modprobe-515.48.07.tar.bz2 39099 BLAKE2B 771902fe989516324210b0b3db9e927c5ce13a8caf790bbcd4da76ecf60ffd4ada66faf7e3e0296569c774f1ad2044f879d2902178966e3de9c56cba730dc63c SHA512 3df1ea30f8a0c520ab02c05b0f805437e7abc0479402ad725b4d98ac0ff56ce10b797227b19157f51fdc18530cc772e6cf0bd66130a2387782658a5e9fd732a1 |
49 |
+DIST nvidia-modprobe-515.57.tar.gz 44361 BLAKE2B 08bc65b03f61c7fadeed22ec040e051a607ef48b4c2db5508393f6d9e31ca7e00fa1785ad532e5a9e1d8a4dee7ec7ea9fdde1bb1382a25f12de52f0b6abad3c5 SHA512 d12d93d46519f0a5d4272da85a9fec26de56c54c2d858f56e3baa0d1165c475b160f9025ef14d70c0874618863a1e4b8942abb55ffefe832ec1c6f48709d2851 |
50 |
DIST nvidia-persistenced-390.151.tar.bz2 48701 BLAKE2B adc54b184777ffdf00111f2635d4ae55778588d4f986db26591c60ca0137f66cf092b1d89e6bd54a88260251f7f71854bf144f1f64818c34d418c88ec9fbefa2 SHA512 24983016f4ad57e6baf5c89b58215501ca01d5685ac42c0067986f82601acd8e4ef72ac156ad153d65f07714a1cae426ef1629983e23b776067f67658462e8a0 |
51 |
DIST nvidia-persistenced-470.129.06.tar.bz2 46549 BLAKE2B 4e120e7a3022f43a57356bddde55140b3702b13faa1bde44da724443c695208246507f8c4d596e54a9ce44e4127d23e4edea07120e587b2278c1797bdd5fcd60 SHA512 f1a55427d48ab540e2b7c4cfd834a063a9281337c4d2af4e8fd975508ee67b226bac78d3247eca7ed5138665178f25fa48459a56ac4a8eb815502e40dd5a9b06 |
52 |
DIST nvidia-persistenced-510.73.05.tar.bz2 47104 BLAKE2B 3013a5b10c85524da63fff23a4c0ebeea98335a698b0dc15977760f71bc9372af333fb1187f262c91b572d3e114a59b2075414f6f1ea8d2167ac45e09c4dcf12 SHA512 e3a6218ac6b68e586abcb0ecc591e101b82753f8e70ac3316c181706a2ba7250125e4a8a09ebac96768d2dfe862ed9bf8c466b760f749a45cca06539213321bb |
53 |
DIST nvidia-persistenced-515.48.07.tar.bz2 47155 BLAKE2B 9465e8f86e22f623d3fd242636ae64da944ea302e82a877e453a406767254c9c210b6f8d1069e08e6010d8f182c09825c2748b68cd6d2403d05f8422a811f8f7 SHA512 4a00d4c0a5f7044b9258bcd1970112256f4ddd2a4a7440714f97dc65e9624f68713eb41ade24bc2dffcfca3e9d30652af528c939c1991370572db8384a43fa88 |
54 |
+DIST nvidia-persistenced-515.57.tar.gz 54737 BLAKE2B 6cb9e11da910df5d4e46bc1bccc4a92faa10f1d6c8b78f73ed9b82ab57f2de9b376b7647d0b94b25ad56459b0b47585cfd576faaea0362ea0bf1eb0c4b716e4b SHA512 03421335c9a929bf25b4ebc0ea8274251ae89dc67e123ea29bbd81fa2b3c0b73a711a5b1f5c89a189c87676a9d8009e01bf23f3d626880f610e235dc2f4fd238 |
55 |
DIST nvidia-settings-390.151.tar.bz2 1109138 BLAKE2B 07e94cf595c00b2b238cc81a99bab2862e4a41b83a3d3f24a9a28ec24ab0a1bd273551f541f685dd548334f4d19c93a3e2a7f2fb05cee653488a1a29988c0bb1 SHA512 00db210471402173c44007760a47905e52a04158ffb0ee09142ad53b2fa4f091e70825191151e2d80ddec2fdbcd722fe922a52efbcfd2c5a2b896e542f0cbbda |
56 |
DIST nvidia-settings-470.129.06.tar.bz2 1062306 BLAKE2B 7a61a069df021f39cb2b0ff54e77e5375848f4357aa7cdeeed200e75b902be8ad5b521c218a7461c17e131775a33bca44de416e76873ee568be5e5abd4c67828 SHA512 e54e873388b915b628e66ccb328feed640c619ca6633129db3d58ffd06818f0b2176590753cfcf1f2456fa4837d924d82cdf8cd06e8c84e37d6782086135b2c3 |
57 |
DIST nvidia-settings-510.73.05.tar.bz2 1075626 BLAKE2B 776713f21faf3eb8101169a11b47d6e9ee0d57884f63277032f50433bc9ddd13e74cedbd31837a73e518df79bd05816c2c58bfd7ae8433705c00c6427902589e SHA512 b8c9bb01d85644f0a64189e54de282f21f5fe6c6ead80e97b8af8bbe5e2e0b64f9d187e75edc1b3ff466293783ec545746a89d8617d327497e637e56a3ab88d0 |
58 |
DIST nvidia-settings-515.48.07.tar.bz2 1079544 BLAKE2B 76da1e83cdcc052a820cb6bd196848291339ae7f8baf794673b3eb349476a39964e1dc1bd2dce40ebf2308033e729753cbef8ea03dd8f6a9d04fa512f2e0a479 SHA512 3eba90714ebb2b56c269db7ad0bd60b9ff58680767edf137742b31f78ee75b54468b61dba4c9f0727f267aeeb3bbd48de5c933226035f415cbf95b368fe69aa5 |
59 |
+DIST nvidia-settings-515.57.tar.gz 1253956 BLAKE2B b7a9d2443471037f91a1e1f88cfc82e1e575a92100543f1e891615334eb9b511b56c33ace2d1544fff388dbc07ba838c3819a9312e32a7db1f64143bc10511c5 SHA512 e40b66db06e563c4ee3749874137ceab9a10e0562da2c511a3d494467b097479ccc4a3427dbd2955b530111d42d8b14bd6a3ade0644fc772d5856d713140ecc7 |
60 |
DIST nvidia-xconfig-390.151.tar.bz2 107177 BLAKE2B 47b7b28f70c148c49149d44d20e3e2396c3c78143c687654f90350620a057edc912e1616f930a4212b921cf76e75cfc3ef4155adfd1819141a0ef3185891daef SHA512 9bbabb35a8ea26b0714a4387d8503434681e35297d6c6ff3ee562f18086369fab75caff78f9122da7e11100367fcd62a05a18b0bef797ba7b5c97cd8887c1dcb |
61 |
DIST nvidia-xconfig-470.129.06.tar.bz2 108704 BLAKE2B 71ead889bca8503e987bc00c71531a4fd1a779ba6e679da5bee7636bfb4c46ff2984fc3b7feadd296ec45b58730fee52c55e1eedc0b24a4ff0976357eed79b3c SHA512 26955fbcd17e5d2caaadd0ff818cbdf93934d6cec5f29bb43fbc98bf300c9bc745f9e3dd977be1209a5f5a7f812d3fb9b2b33140ffc4b86789477661bb8c49c3 |
62 |
DIST nvidia-xconfig-510.73.05.tar.bz2 109809 BLAKE2B 4554555b543073281f7b2e3f2d3463f7b4e8a7c8a734663af0d6a3110d432dd8f9e14e4e0efbd93902ae1e8cd1afefd35838f0bf70a5a619b05119acef25aa1a SHA512 bc992cd75e9e757f2e3edf35b38106362de0900085dec059b3b609bca3bc02fcac4a39a1481a7c9ca0e704fe0355e8f9620a1e8cc867e1c341d2b0df2cf47bf0 |
63 |
DIST nvidia-xconfig-515.48.07.tar.bz2 110220 BLAKE2B 54283c809f4d50337279727c70bed11e98b1422751663a1c77afb250917c28f269cecf6d75c1458051ed09bd826d9fdc7329b332d8e2118e6b3529f6a4e34bc1 SHA512 417bcb829fe578ccecea713780e5d3cbe79798d974ef66741c2b0fe3a87c6a236c719e369af44b297f0c42d82b33af76a61a0e205ad939684b56d258a0d37b0b |
64 |
+DIST nvidia-xconfig-515.57.tar.gz 144062 BLAKE2B 5f927b1fbbcfc5b5c9d8c166eaed6baeef24c432b5a8d5c1e1033bb92371ecb298cce66a8374eee59fbfdeaef4c0330a6f866735b54066fefed69ed839c7b549 SHA512 380cffbb63a926f9fc23c5924faef9cd026adc162fc6c645854da2a5525ef68fad6a7cdef82f504d413c042e9020e970f37aa9c59d9baf3feddfeddcd4e5761b |
65 |
DIST open-gpu-kernel-modules-515.49.05.tar.gz 7408161 BLAKE2B 6fbabbb06f8ebd7605b4d2ab51301236cb3df0a3d301ba3d8b2f8d96a56ca6f88882cc451ea0cd95b9e5d110bc53c409ad7311f788a29861e7cd5b58a33d493f SHA512 daa24d51b9986057c622b15d74185c21b2370a0169cef768a82e9f1a68387b85e547b8695f05c8da9559be0fdd398deadf7fe56c23955b365212091c3db180f9 |
66 |
+DIST open-gpu-kernel-modules-515.57.tar.gz 7408095 BLAKE2B c78130eb8a53ddb7bd7817619a17fe250dc8dd12c084e72c22181b54f1f7ef361d9d2080cd888bcdb05deda818b1bf665adda0d22c2a6bcd85b32682c6b94f49 SHA512 93d59bf0bb1eede40036dd65c8ef956c7b9a79f3a2fe6e87b6f4f16413e52b3c8cdb47aacbcd4c087bd77081a2d35fc1981db93019e352b8a8f85083a9221461 |
67 |
|
68 |
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.57.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.57.ebuild |
69 |
new file mode 100644 |
70 |
index 000000000000..a61e696555bb |
71 |
--- /dev/null |
72 |
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.57.ebuild |
73 |
@@ -0,0 +1,506 @@ |
74 |
+# Copyright 1999-2022 Gentoo Authors |
75 |
+# Distributed under the terms of the GNU General Public License v2 |
76 |
+ |
77 |
+EAPI=8 |
78 |
+ |
79 |
+MODULES_OPTIONAL_USE="driver" |
80 |
+inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ |
81 |
+ systemd toolchain-funcs unpacker user-info |
82 |
+ |
83 |
+NV_KERNEL_MAX="5.18" |
84 |
+ |
85 |
+DESCRIPTION="NVIDIA Accelerated Graphics Driver" |
86 |
+HOMEPAGE="https://www.nvidia.com/download/index.aspx" |
87 |
+SRC_URI=" |
88 |
+ amd64? ( https://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) |
89 |
+ arm64? ( https://us.download.nvidia.com/XFree86/aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run ) |
90 |
+ $(printf "https://github.com/NVIDIA/%s/archive/refs/tags/${PV}.tar.gz -> %s-${PV}.tar.gz " \ |
91 |
+ nvidia-{installer,modprobe,persistenced,settings,xconfig}{,}) |
92 |
+ https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/${PV}.tar.gz |
93 |
+ -> open-gpu-kernel-modules-${PV}.tar.gz" |
94 |
+# nvidia-installer is unused but here for GPL-2's "distribute sources" |
95 |
+S="${WORKDIR}" |
96 |
+ |
97 |
+LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" |
98 |
+SLOT="0/${PV%%.*}" |
99 |
+KEYWORDS="-* ~amd64 ~arm64" |
100 |
+IUSE="+X abi_x86_32 abi_x86_64 +driver kernel-open persistenced +static-libs +tools wayland" |
101 |
+REQUIRED_USE="kernel-open? ( driver )" |
102 |
+ |
103 |
+COMMON_DEPEND=" |
104 |
+ acct-group/video |
105 |
+ sys-libs/glibc |
106 |
+ X? ( x11-libs/libpciaccess ) |
107 |
+ persistenced? ( |
108 |
+ acct-user/nvpd |
109 |
+ net-libs/libtirpc:= |
110 |
+ ) |
111 |
+ tools? ( |
112 |
+ dev-libs/atk |
113 |
+ dev-libs/glib:2 |
114 |
+ dev-libs/jansson:= |
115 |
+ media-libs/harfbuzz:= |
116 |
+ x11-libs/cairo |
117 |
+ x11-libs/gdk-pixbuf:2 |
118 |
+ x11-libs/gtk+:3 |
119 |
+ x11-libs/libX11 |
120 |
+ x11-libs/libXext |
121 |
+ x11-libs/libXxf86vm |
122 |
+ x11-libs/pango |
123 |
+ )" |
124 |
+RDEPEND=" |
125 |
+ ${COMMON_DEPEND} |
126 |
+ X? ( |
127 |
+ media-libs/libglvnd[X,abi_x86_32(-)?] |
128 |
+ x11-libs/libX11[abi_x86_32(-)?] |
129 |
+ x11-libs/libXext[abi_x86_32(-)?] |
130 |
+ ) |
131 |
+ wayland? ( |
132 |
+ gui-libs/egl-gbm |
133 |
+ >=gui-libs/egl-wayland-1.1.10 |
134 |
+ media-libs/libglvnd |
135 |
+ )" |
136 |
+DEPEND=" |
137 |
+ ${COMMON_DEPEND} |
138 |
+ static-libs? ( |
139 |
+ x11-libs/libX11 |
140 |
+ x11-libs/libXext |
141 |
+ ) |
142 |
+ tools? ( |
143 |
+ media-libs/libglvnd |
144 |
+ sys-apps/dbus |
145 |
+ x11-base/xorg-proto |
146 |
+ x11-libs/libXrandr |
147 |
+ x11-libs/libXv |
148 |
+ x11-libs/libvdpau |
149 |
+ )" |
150 |
+BDEPEND=" |
151 |
+ sys-devel/m4 |
152 |
+ virtual/pkgconfig" |
153 |
+ |
154 |
+QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*" |
155 |
+ |
156 |
+PATCHES=( |
157 |
+ "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch |
158 |
+ "${FILESDIR}"/nvidia-settings-390.144-desktop.patch |
159 |
+ "${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch |
160 |
+ "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch |
161 |
+) |
162 |
+ |
163 |
+pkg_setup() { |
164 |
+ use driver || return |
165 |
+ |
166 |
+ local CONFIG_CHECK=" |
167 |
+ PROC_FS |
168 |
+ ~DRM_KMS_HELPER |
169 |
+ ~SYSVIPC |
170 |
+ ~!LOCKDEP |
171 |
+ ~!SLUB_DEBUG_ON |
172 |
+ ~!X86_KERNEL_IBT |
173 |
+ !DEBUG_MUTEXES" |
174 |
+ local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection |
175 |
+ of drivers (no custom config), and for wayland / nvidia-drm.modeset=1. |
176 |
+ Cannot be directly selected in the kernel's menuconfig, and may need |
177 |
+ selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or |
178 |
+ DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in." |
179 |
+ local ERROR_X86_KERNEL_IBT="X86_KERNEL_IBT: is set, be warned the modules may not load with it. |
180 |
+ If run into problems, either unset or pass ibt=off to the kernel." |
181 |
+ |
182 |
+ use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 |
183 |
+ |
184 |
+ use kernel-open && CONFIG_CHECK+=" MMU_NOTIFIER" #843827 |
185 |
+ local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but needed to build with USE=kernel-open. |
186 |
+ Cannot be directly selected in the kernel's menuconfig, and may need |
187 |
+ selection of another option that requires it such as CONFIG_KVM." |
188 |
+ |
189 |
+ MODULE_NAMES=" |
190 |
+ nvidia(video:kernel) |
191 |
+ nvidia-drm(video:kernel) |
192 |
+ nvidia-modeset(video:kernel) |
193 |
+ nvidia-peermem(video:kernel) |
194 |
+ nvidia-uvm(video:kernel)" |
195 |
+ use kernel-open && |
196 |
+ MODULE_NAMES=${MODULE_NAMES//:kernel/:kernel-module-source:kernel-module-source/kernel-open} |
197 |
+ |
198 |
+ linux-mod_pkg_setup |
199 |
+ |
200 |
+ [[ ${MERGE_TYPE} == binary ]] && return |
201 |
+ |
202 |
+ BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' |
203 |
+ BUILD_TARGETS="modules" |
204 |
+ |
205 |
+ if linux_chkconfig_present CC_IS_CLANG; then |
206 |
+ ewarn "Warning: building ${PN} with a clang-built kernel is experimental" |
207 |
+ |
208 |
+ BUILD_PARAMS+=' CC=${CHOST}-clang' |
209 |
+ if linux_chkconfig_present LD_IS_LLD; then |
210 |
+ BUILD_PARAMS+=' LD=ld.lld' |
211 |
+ if linux_chkconfig_present LTO_CLANG_THIN; then |
212 |
+ # kernel enables cache by default leading to sandbox violations |
213 |
+ BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' |
214 |
+ fi |
215 |
+ fi |
216 |
+ fi |
217 |
+ |
218 |
+ if kernel_is -gt ${NV_KERNEL_MAX/./ }; then |
219 |
+ ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}" |
220 |
+ ewarn "or was not tested with it. It is recommended to use one of:" |
221 |
+ ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x" |
222 |
+ ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x" |
223 |
+ ewarn "You are free to try or use /etc/portage/patches, but support will" |
224 |
+ ewarn "not be given and issues wait until NVIDIA releases a fixed version" |
225 |
+ ewarn "(Gentoo will not accept patches for this)." |
226 |
+ ewarn |
227 |
+ ewarn "Do _not_ file a bug report if run into issues." |
228 |
+ ewarn |
229 |
+ fi |
230 |
+} |
231 |
+ |
232 |
+src_prepare() { |
233 |
+ # make patches usable across versions |
234 |
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die |
235 |
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die |
236 |
+ rm nvidia-settings && mv nvidia-settings{-${PV},} || die |
237 |
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die |
238 |
+ mv open-gpu-kernel-modules-${PV} kernel-module-source || die |
239 |
+ |
240 |
+ default |
241 |
+ |
242 |
+ # prevent detection of incomplete kernel DRM support (bug #603818) |
243 |
+ sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \ |
244 |
+ -i kernel{,-module-source/kernel-open}/conftest.sh || die |
245 |
+ |
246 |
+ # adjust service files |
247 |
+ sed 's/__USER__/nvpd/' \ |
248 |
+ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ |
249 |
+ > "${T}"/nvidia-persistenced.service || die |
250 |
+ use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die |
251 |
+ |
252 |
+ # enable nvidia-drm.modeset=1 by default with USE=wayland |
253 |
+ cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die |
254 |
+ use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die |
255 |
+ |
256 |
+ # makefile attempts to install wayland library even if not built |
257 |
+ use wayland || sed -i 's/ WAYLAND_LIB_install$//' \ |
258 |
+ nvidia-settings/src/Makefile || die |
259 |
+ |
260 |
+ # temporary option, nvidia will remove in the future |
261 |
+ use !kernel-open || |
262 |
+ sed -i '/blacklist/a\ |
263 |
+\ |
264 |
+# Enable using kernel-open with workstation GPUs (experimental)\ |
265 |
+options nvidia NVreg_OpenRmEnableUnsupportedGpus=1' "${T}"/nvidia.conf || die |
266 |
+} |
267 |
+ |
268 |
+src_compile() { |
269 |
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP |
270 |
+ |
271 |
+ NV_ARGS=( |
272 |
+ PREFIX="${EPREFIX}"/usr |
273 |
+ HOST_CC="$(tc-getBUILD_CC)" |
274 |
+ HOST_LD="$(tc-getBUILD_LD)" |
275 |
+ NV_USE_BUNDLED_LIBJANSSON=0 |
276 |
+ NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out |
277 |
+ WAYLAND_AVAILABLE=$(usex wayland 1 0) |
278 |
+ XNVCTRL_CFLAGS=-fPIC #840389 |
279 |
+ ) |
280 |
+ |
281 |
+ if use driver; then |
282 |
+ if linux_chkconfig_present GCC_PLUGINS; then |
283 |
+ mkdir "${T}"/plugin-test || die |
284 |
+ echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die |
285 |
+ > "${T}"/plugin-test/test.c || die |
286 |
+ if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \ |
287 |
+ HOSTCC="$(tc-getBUILD_CC)" M="${T}"/plugin-test 2>&1) \ |
288 |
+ =~ "error: incompatible gcc/plugin version" ]]; then |
289 |
+ ewarn "Warning: detected kernel was built with different gcc/plugin versions," |
290 |
+ ewarn "you may need to 'make clean' and rebuild your kernel with the current" |
291 |
+ ewarn "gcc version (or re-emerge for distribution kernels, including kernel-bin)." |
292 |
+ fi |
293 |
+ fi |
294 |
+ |
295 |
+ linux-mod_src_compile |
296 |
+ fi |
297 |
+ |
298 |
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe |
299 |
+ use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced |
300 |
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig |
301 |
+ |
302 |
+ if use tools; then |
303 |
+ # cflags: avoid noisy logs, only use here and set first to let override |
304 |
+ # ldflags: abi currently needed if LD=ld.lld |
305 |
+ CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \ |
306 |
+ RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" \ |
307 |
+ emake "${NV_ARGS[@]}" -C nvidia-settings |
308 |
+ elif use static-libs; then |
309 |
+ emake "${NV_ARGS[@]}" -C nvidia-settings/src out/libXNVCtrl.a |
310 |
+ fi |
311 |
+} |
312 |
+ |
313 |
+src_install() { |
314 |
+ local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir) |
315 |
+ |
316 |
+ NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} ) |
317 |
+ |
318 |
+ local -A paths=( |
319 |
+ [APPLICATION_PROFILE]=/usr/share/nvidia |
320 |
+ [CUDA_ICD]=/etc/OpenCL/vendors |
321 |
+ [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d |
322 |
+ [FIRMWARE]=/lib/firmware/nvidia/${PV} |
323 |
+ [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm |
324 |
+ [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d |
325 |
+ [VULKAN_ICD_JSON]=/usr/share/vulkan |
326 |
+ [WINE_LIB]=/usr/${libdir}/nvidia/wine |
327 |
+ [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d |
328 |
+ |
329 |
+ [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions |
330 |
+ [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules |
331 |
+ [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules |
332 |
+ ) |
333 |
+ |
334 |
+ local skip_files=( |
335 |
+ # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia |
336 |
+ $(usev !X " |
337 |
+ libGLX_nvidia libglxserver_nvidia |
338 |
+ nvidia_icd.json nvidia_layers.json") |
339 |
+ $(usev !wayland libnvidia-vulkan-producer) |
340 |
+ libGLX_indirect # non-glvnd unused fallback |
341 |
+ libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from source |
342 |
+ libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm |
343 |
+ libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland |
344 |
+ ) |
345 |
+ local skip_modules=( |
346 |
+ $(usev !X "nvfbc vdpau xdriver") |
347 |
+ $(usev !driver gsp) |
348 |
+ installer nvpd # handled separately / built from source |
349 |
+ ) |
350 |
+ local skip_types=( |
351 |
+ GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd |
352 |
+ OPENCL_WRAPPER.\* # virtual/opencl |
353 |
+ DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused |
354 |
+ ) |
355 |
+ |
356 |
+ local DOCS=( |
357 |
+ README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json |
358 |
+ nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt |
359 |
+ ) |
360 |
+ local HTML_DOCS=( html/. ) |
361 |
+ einstalldocs |
362 |
+ |
363 |
+ local DISABLE_AUTOFORMATTING=yes |
364 |
+ local DOC_CONTENTS="\ |
365 |
+Trusted users should be in the 'video' group to use NVIDIA devices. |
366 |
+You can add yourself by using: gpasswd -a my-user video\ |
367 |
+$(usev driver " |
368 |
+ |
369 |
+Like all out-of-tree kernel modules, it is necessary to rebuild |
370 |
+${PN} after upgrading or rebuilding the Linux kernel |
371 |
+by for example running \`emerge @module-rebuild\`. Alternatively, |
372 |
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}), |
373 |
+this can be automated by setting USE=dist-kernel globally. |
374 |
+ |
375 |
+Loaded kernel modules also must not mismatch with the installed |
376 |
+${PN} version (excluding -r revision), meaning should |
377 |
+ensure \`eselect kernel list\` points to the kernel that will be |
378 |
+booted before building and preferably reboot after upgrading |
379 |
+${PN} (the ebuild will emit a warning if mismatching). |
380 |
+ |
381 |
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\ |
382 |
+$(use amd64 && usev !abi_x86_32 " |
383 |
+ |
384 |
+Note that without USE=abi_x86_32 on ${PN}, 32bit applications |
385 |
+(typically using wine / steam) will not be able to use GPU acceleration.") |
386 |
+ |
387 |
+For general information on using ${PN}, please see: |
388 |
+https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" |
389 |
+ readme.gentoo_create_doc |
390 |
+ |
391 |
+ if use driver; then |
392 |
+ linux-mod_src_install |
393 |
+ |
394 |
+ insinto /etc/modprobe.d |
395 |
+ doins "${T}"/nvidia.conf |
396 |
+ |
397 |
+ # used for gpu verification with binpkgs (not kept, see pkg_preinst) |
398 |
+ insinto /usr/share/nvidia |
399 |
+ doins supported-gpus/supported-gpus.json |
400 |
+ fi |
401 |
+ |
402 |
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe install |
403 |
+ fowners :video /usr/bin/nvidia-modprobe #505092 |
404 |
+ fperms 4710 /usr/bin/nvidia-modprobe |
405 |
+ |
406 |
+ if use persistenced; then |
407 |
+ emake "${NV_ARGS[@]}" -C nvidia-persistenced install |
408 |
+ newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced |
409 |
+ newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced |
410 |
+ systemd_dounit "${T}"/nvidia-persistenced.service |
411 |
+ fi |
412 |
+ |
413 |
+ if use tools; then |
414 |
+ emake "${NV_ARGS[@]}" -C nvidia-settings install |
415 |
+ |
416 |
+ doicon nvidia-settings/doc/nvidia-settings.png |
417 |
+ domenu nvidia-settings/doc/nvidia-settings.desktop |
418 |
+ |
419 |
+ exeinto /etc/X11/xinit/xinitrc.d |
420 |
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings |
421 |
+ fi |
422 |
+ |
423 |
+ if use static-libs; then |
424 |
+ dolib.a nvidia-settings/src/out/libXNVCtrl.a |
425 |
+ |
426 |
+ insinto /usr/include/NVCtrl |
427 |
+ doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h |
428 |
+ fi |
429 |
+ |
430 |
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install |
431 |
+ |
432 |
+ # mimic nvidia-installer by reading .manifest to install files |
433 |
+ # 0:file 1:perms 2:type 3+:subtype/arguments -:module |
434 |
+ local m into |
435 |
+ while IFS=' ' read -ra m; do |
436 |
+ ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] || |
437 |
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] || |
438 |
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] || |
439 |
+ has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue |
440 |
+ |
441 |
+ case ${m[2]} in |
442 |
+ MANPAGE) |
443 |
+ gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert |
444 |
+ continue |
445 |
+ ;; |
446 |
+ GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../ |
447 |
+ VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/ |
448 |
+ esac |
449 |
+ |
450 |
+ if [[ -v paths[${m[2]}] ]]; then |
451 |
+ into=${paths[${m[2]}]} |
452 |
+ elif [[ ${m[2]} =~ _BINARY$ ]]; then |
453 |
+ into=/opt/bin |
454 |
+ elif [[ ${m[3]} == COMPAT32 ]]; then |
455 |
+ use abi_x86_32 || continue |
456 |
+ into=/usr/${libdir32} |
457 |
+ elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then |
458 |
+ into=/usr/${libdir} |
459 |
+ else |
460 |
+ die "No known installation path for ${m[0]}" |
461 |
+ fi |
462 |
+ [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/} |
463 |
+ [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/} |
464 |
+ |
465 |
+ if [[ ${m[2]} =~ _SYMLINK$ ]]; then |
466 |
+ [[ ${m[4]: -1} == / ]] && m[4]=${m[5]} |
467 |
+ dosym ${m[4]} ${into}/${m[0]} |
468 |
+ continue |
469 |
+ fi |
470 |
+ [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] && |
471 |
+ dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest |
472 |
+ |
473 |
+ printf -v m[1] %o $((m[1] | 0200)) # 444->644 |
474 |
+ insopts -m${m[1]} |
475 |
+ insinto ${into} |
476 |
+ doins ${m[0]} |
477 |
+ done < .manifest || die |
478 |
+ |
479 |
+ # MODULE:installer non-skipped extras |
480 |
+ exeinto /lib/systemd/system-sleep |
481 |
+ doexe systemd/system-sleep/nvidia |
482 |
+ dobin systemd/nvidia-sleep.sh |
483 |
+ systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service |
484 |
+ |
485 |
+ dobin nvidia-bug-report.sh |
486 |
+ |
487 |
+ # MODULE:powerd extras |
488 |
+ if use amd64; then |
489 |
+ systemd_dounit systemd/system/nvidia-powerd.service |
490 |
+ |
491 |
+ insinto /usr/share/dbus-1/system.d |
492 |
+ doins nvidia-dbus.conf |
493 |
+ fi |
494 |
+ |
495 |
+ # symlink non-versioned so nvidia-settings can use it even if misdetected |
496 |
+ dosym nvidia-application-profiles-${PV}-key-documentation \ |
497 |
+ ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation |
498 |
+} |
499 |
+ |
500 |
+pkg_preinst() { |
501 |
+ has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND= |
502 |
+ |
503 |
+ use driver || return |
504 |
+ linux-mod_pkg_preinst |
505 |
+ |
506 |
+ # set video group id based on live system (bug #491414) |
507 |
+ local g=$(egetent group video | cut -d: -f3) |
508 |
+ [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" |
509 |
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die |
510 |
+ |
511 |
+ # try to find driver mismatches using temporary supported-gpus.json |
512 |
+ for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do |
513 |
+ g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \ |
514 |
+ "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null) |
515 |
+ if [[ ${g} ]]; then |
516 |
+ g=$((${g##*\"}+1)) |
517 |
+ if ver_test -ge ${g}; then |
518 |
+ NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}" |
519 |
+ break |
520 |
+ fi |
521 |
+ fi |
522 |
+ done |
523 |
+ rm "${ED}"/usr/share/nvidia/supported-gpus.json || die |
524 |
+} |
525 |
+ |
526 |
+pkg_postinst() { |
527 |
+ linux-mod_pkg_postinst |
528 |
+ |
529 |
+ readme.gentoo_print_elog |
530 |
+ |
531 |
+ if [[ -r /proc/driver/nvidia/version && |
532 |
+ $(</proc/driver/nvidia/version) != *" ${PV} "* ]]; then |
533 |
+ ewarn "Currently loaded NVIDIA modules do not match the newly installed" |
534 |
+ ewarn "libraries and may prevent launching GPU-accelerated applications." |
535 |
+ use driver && ewarn "The easiest way to fix this is usually to reboot." |
536 |
+ fi |
537 |
+ |
538 |
+ if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then |
539 |
+ ewarn "Detected that the current kernel command line is using 'slub_debug='," |
540 |
+ ewarn "this may lead to system instability/freezes with this version of" |
541 |
+ ewarn "${PN}. Bug: https://bugs.gentoo.org/796329" |
542 |
+ fi |
543 |
+ |
544 |
+ if [[ -v NV_LEGACY_MASK ]]; then |
545 |
+ ewarn |
546 |
+ ewarn "***WARNING***" |
547 |
+ ewarn |
548 |
+ ewarn "You are installing a version of ${PN} known not to work" |
549 |
+ ewarn "with a GPU of the current system. If unwanted, add the mask:" |
550 |
+ if [[ -d ${EROOT}/etc/portage/package.mask ]]; then |
551 |
+ ewarn " echo '${NV_LEGACY_MASK}' > ${EROOT}/etc/portage/package.mask/${PN}" |
552 |
+ else |
553 |
+ ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask" |
554 |
+ fi |
555 |
+ ewarn "...then downgrade to a legacy branch if possible. For details, see:" |
556 |
+ ewarn "https://www.nvidia.com/object/IO_32667.html" |
557 |
+ fi |
558 |
+ |
559 |
+ if use kernel-open; then |
560 |
+ ewarn |
561 |
+ ewarn "Open source variant of ${PN} was selected, be warned it is experimental" |
562 |
+ ewarn "and only usable with Turing / Ampere and later GPUs, aka GTX 1650+." |
563 |
+ ewarn "Please also see: ${EROOT}/usr/share/doc/${PF}/html/kernel_open.html" |
564 |
+ ewarn |
565 |
+ ewarn "Many features are not yet implemented in the drivers and limitations are" |
566 |
+ ewarn "to be expected. Please do not report non-build/packaging bugs to Gentoo." |
567 |
+ ewarn "Switch back to USE=-kernel-open to restore functionality if needed for now." |
568 |
+ fi |
569 |
+ |
570 |
+ if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then |
571 |
+ elog |
572 |
+ elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1" |
573 |
+ elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered" |
574 |
+ elog "experimental but is required for wayland." |
575 |
+ elog |
576 |
+ elog "If you experience issues, either disable wayland or edit nvidia.conf." |
577 |
+ elog "Of note, may possibly cause issues with SLI and Reverse PRIME." |
578 |
+ fi |
579 |
+} |