From 15d97fe857a00a52fd4efb0a31ed0560f9de3a24 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 31 Mar 2023 04:04:12 +0100 Subject: gentoo auto-resync : 31:03:2023 - 04:04:12 --- x11-drivers/nvidia-drivers/Manifest | 44 +- .../nvidia-drivers/nvidia-drivers-390.157.ebuild | 16 +- .../nvidia-drivers-470.182.03.ebuild | 576 +++++++++++++++++++ .../nvidia-drivers-510.108.03.ebuild | 586 ------------------- .../nvidia-drivers-515.105.01.ebuild | 633 +++++++++++++++++++++ .../nvidia-drivers-525.105.17.ebuild | 631 ++++++++++++++++++++ .../nvidia-drivers/nvidia-drivers-525.85.05.ebuild | 631 -------------------- 7 files changed, 1878 insertions(+), 1239 deletions(-) create mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-470.182.03.ebuild delete mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-510.108.03.ebuild create mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-515.105.01.ebuild create mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17.ebuild delete mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-525.85.05.ebuild (limited to 'x11-drivers/nvidia-drivers') diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index 3f4960d154ff..0e597d5629ee 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -14,66 +14,74 @@ AUX nvidia-settings-390.144-desktop.patch 433 BLAKE2B 5f2eacf1cb1d8ad1ba2cd7163f AUX nvidia-settings-390.144-no-gtk2.patch 367 BLAKE2B 59a60b103df6b187009417dca22caaf45292b94005d92df9e513804e5137959ffeda1d9abd5506cbb5c7be604023d2c59f0841190b03502542ad0c2d3f084a10 SHA512 421558442a2228f6ffdb82b2bd6862cbc286b8ba259c4970f54dcc445a988575864404f2c3933d2436d8d40de1bf0e34ee7ed855742c5d677094c260e32a1e66 AUX nvidia-settings-390.144-raw-ldflags.patch 468 BLAKE2B bf4c00a76351e6c3d1587b4f71be61fac8cc516fa22da0a47538fede92b619eb77b1cc09222cd403175a2015eb2ca745e8cdca90c9dca1b938ca13a2e59810ba SHA512 1fc568bfd1faba1f7af4f4b07715912b7f1d8103626ec0c9fcbb465ded606059ca264f386fe415105ab9f95c4ab173bf4b784ea7380bf17ab6979f56fbd01757 AUX nvidia-settings-530.30.02-desktop.patch 406 BLAKE2B 63f645d5c9f76349b405c61327bc4f6d44e0716b4ec4c2f1aa012505638be0a329bc9589812d1f164641e4725dd15ac652eed0992161e767325b1310d9cd0718 SHA512 ff0fed69d7d36b2f67f9382055490a031ef8e834119bb18b0f71d1265afe92fad44cb11d6fabc5e3750a434c51e4660cfaa3347d062036d975fd341967187494 -DIST NVIDIA-Linux-aarch64-510.108.03.run 211471630 BLAKE2B 4177e12907bb577d96734c33d0210eb753a763390aa1dde6e578d81dd47685bc3518af6c1dc2490e3ed488e9cede7e5705f8cf5e264f756de75d3a995c7d3f04 SHA512 fbd395d004d8a25d175958f8a9f9d4f19bc4e0662256e45cf9ed353613e2741f75e4fb2b87d5eb1625914c5ae3ab49e1b7025c8894d9e1cd0028a6d322836a67 +DIST NVIDIA-Linux-aarch64-515.105.01.run 221114790 BLAKE2B d01add008c0dc6b45f951341ad78b5c2da4e080cd3be38eec83c6408af19dec353c3eb40a5bdce2a23ec26b81bc31d7983be0a557760e408b16a0aa516dde43e SHA512 07d8b680e3bc4727727dc00225b42577eff3f00fb45281fb3b75400f66572d8ad67fed1adba36689cf7d28afa6241fe3ccc11789dccfcb5e6705496c5930af2b DIST NVIDIA-Linux-aarch64-515.86.01.run 221097882 BLAKE2B f8562f9ef1d29451792e00f5489ae7bf63d1a9c5a13354f119667e5572f473abe14a82383c7f61251213ef16463c064059316c7da09a5d61207823b17a7183bf SHA512 43161f86143b1558d1f558acf4a060f53f538ea20e6235f76be24916fe4a9c374869645c7abf39eba66f1c2ca35f5d2b04f199bd1341b7ee6c1fdc879cb3ef96 -DIST NVIDIA-Linux-aarch64-525.85.05.run 262667903 BLAKE2B e6e4d2d8a90f5abbfc4d67ee1a74c062fcd91b4d46d247702e937d8e82c2ddeac19418a74908b90d31265819dfa93791c53cb111b41fe51732851c9d2e74c21e SHA512 85312583dbd55791273308aa3c3bf43241e0b28cbe850e56bd6997dcedd2db51af337d062587886ca4000cf39428a748c87d6e270648e09d4f0870856757a7d0 +DIST NVIDIA-Linux-aarch64-525.105.17.run 263030663 BLAKE2B 6a76649f1f4dd5cc9347b91474af899a202218bbea56dd8574e0c1ef286b1e3c5a61ba6723a49295ca4baf90ee2b70adedbe809c16b2d9a6b6328dd57d6c3e6c SHA512 75192acf8448a206a956b94b01b5e1e05cd21c7f172557bd6a2d1f1d92877583734c7e0998cedc3b54a8bdc5c7e869531ddea4161639daf40cbd0bf035252759 DIST NVIDIA-Linux-aarch64-525.89.02.run 263020466 BLAKE2B 7f912746c186450b09b7e4b0e26731a8480a02e02a6d0009c1c96e33f91dd47604b262e8d42568b8c9127598cf17a19e7bf5cf29472a9e2b1cc8d765b2b39370 SHA512 a74d11453522dde936c022b6c8ef8df0349a10f825caaab3e7a58002f4afcd12160865ad9e5745b055430d978ebdcc0583dfe8b339ba60eead99517d49ee7191 DIST NVIDIA-Linux-aarch64-530.41.03.run 218674884 BLAKE2B 5f1e61c43810ae3428c07d27b7a6a80ed2d04e1fe6f2ff8f8da20c615d9d35c494f30c1baf6fd0c6046b7780e621095ff0a61e40ec40295e599acf4727cc45cf SHA512 abb9d33b2cfa57be25d5395d5e9805d401b67375761cd07da0e78cc372d8f424c9a7129966967ed36b2123eafbb0fa99f478deb2c4b6a9d85764bdfb60c1139e DIST NVIDIA-Linux-x86-390.157.run 49417041 BLAKE2B 435b5e0e60468cc74b41cc5d9b5bb0105d29c11a2d408457835212a96519c9334ecf19278b36749d3ff7f498f5b0ae45a2efae2d428703dac21245c62f1efebe SHA512 dae9ac2c12f9ad90f7441e00e01a984147c577892421911d7f67f6a31e616ac1cb7d434bc9c7f58fbd9b8ae909521b5bece607a63c79588c0bb9d99c6bad5fb0 DIST NVIDIA-Linux-x86_64-390.157.run 85835541 BLAKE2B 44b855cd11f3b2f231f9fb90492ae2e67a67ea3ea83c413e7c90956d38c9730a8bd0321281ae03c6afce633d102f5b499aed25622b9bfd31bdd2c98f0717e95b SHA512 4780503a4cff0180b1b1f37d20a6ba3438dd78b51fa7f69b98d35521835e5d61099129746929d51d63afa2d47b672b3e145e1e1897584dc3799e7f822c5b3a0a DIST NVIDIA-Linux-x86_64-470.161.03.run 272397700 BLAKE2B eaa94b7398b3aaadf30c33c95c95b167094ca56114e2e3032978b0959264ac8b8663181485eb1af0282a59b43f912c0ecd48e5eadcb06b6fda601b357ac49bc7 SHA512 26b1640f9427847b68233ffacf5c4a07e75ed9923429dfc9e5de3d7e5c1f109dfaf0fe0a0639cbd47f056784ed3e00e2e741d5c84532df79590a0c9ffa5ba625 -DIST NVIDIA-Linux-x86_64-510.108.03.run 329603898 BLAKE2B ec7327628cc0d5929f91fa7dcf09d741341b15a509169d8de187f66a99a9196077362bd9a370ba5e294fd644a3aee1bd3abfc45f20c9cb5b05660d299c9e0479 SHA512 70fbd91b0dc5db119acf20654854c417bb14889e84145e2675dc893e7247a9c34f90820cddb8202cf5c3219abc286c7014b247a2ce94bdb5681a1bca96f41a29 +DIST NVIDIA-Linux-x86_64-470.182.03.run 271685302 BLAKE2B 47acdc53dea1698558fea8e18f481341dd542b725153a83563f9da420844b59db41f69a8eb7ad7e16a22050a7a6cffc2265a9cb8832cb5a6439c6a5b0910bfce SHA512 73619d65bd3267427acaf2deee07a2c98c490df937aa13e2c95d54cfd19ce2a82a91d3a5aa886dbe88f6230251f9cf54c38f5841cfacd77e53301e8d61fa3d7d +DIST NVIDIA-Linux-x86_64-515.105.01.run 363738348 BLAKE2B b78b7e9dbc1450a7d01d9b3b75e0612ce0b71f8647dc5ee084660c9cb12a8ac4b2f278d49b195e0f4600d02f3297af796158cbca9cdaff0d27f78f56153bdefd SHA512 9b9e820754254c70aeab2bcc1cfdae396d3b30fb948198e378f764a6f0d89ad6f6687afffa2d6f48072ab726c6d180dc3c83891eef61f273c0b11f7bc2c9bd67 DIST NVIDIA-Linux-x86_64-515.86.01.run 363743089 BLAKE2B aa03a0f059da99fa549cd9d672cef0194f2b22b349470d80ce626b3f4afb89b1f130b451735f92f5a66dfec02735bd6395053be609668371991837e3be4026cb SHA512 9a31e14afc017e847f1208577f597c490adb63c256d6dff1a9eae56b65cf85374a604516b0be9da7a43e9af93b3c5aec47b2ffefd6b4050a4b7e55f348cf4e7b +DIST NVIDIA-Linux-x86_64-525.105.17.run 414594622 BLAKE2B c1db447a2e121fb13a90a26a4086f8759e8ef5e6eb3b355e3f4497cd67169b8b38506e00bdb8cfd0f5f7f25e0cacbe6e5ed05732815dbf4e63f2e800830ae3dd SHA512 1a44a8d92d8434d356dcd6087c8a3277136e0819ffa5e4b6895854811cf63e44ad3dc08e0d248f149f8dc2280ab0993be6ee7fdf3c676fb9a85ff3dce83fd69a DIST NVIDIA-Linux-x86_64-525.47.15.run 414194155 BLAKE2B df2cf08bd81d19b0215b378be2e7c2dd14a4e415988baf284008acd2648ce43c4ae73627e761921a26e205547025fe9166b6192c02c4d6b00646ef51c6af9acc SHA512 09684294561c0796cfe1bb027388af342a009af33b00901869b4b1c4399583611e2843c45fb436a901095c53844a45b5a4a5642bd3abd019e4f00d6e3395b692 -DIST NVIDIA-Linux-x86_64-525.85.05.run 415131239 BLAKE2B 38bdcce884011cfc0a1b5d08807c0a163ac7807621f3ec69feabbdf27af9e0409491db893912776b05a45f8f56c06f281a84074ab8ff21a71774b890bdff2cf8 SHA512 db30b9186cdcf22b2dde267c08a10cadfc3d37190c57a26a71e282b0f661b187b5b28764418eacf8b2344ebfa8feb7480ae1de31b3bc3026feaf9482a3b51741 DIST NVIDIA-Linux-x86_64-525.89.02.run 414116295 BLAKE2B 22a6da77876557c256cb5571b6ae78133bc150ceb16aaf331a332bdd891df40beac07ac70efedb11ec2458fcdf2a23247b54274d509a2b54e50f4da1251425e7 SHA512 a991c5a843957aa81cf619c39d699100ff69fc723fb195c68fd50cd69ee9d5651a223d3b5d254c8c1b7c8cad09e24846ba4e64869a8b3777e85cd3e5ba515bb5 DIST NVIDIA-Linux-x86_64-530.41.03.run 344312858 BLAKE2B bb5507afd23e6e063314532f37e5c7cc2530f96f359664d79ebac998c6a32ee238790b4aa66339a913e31114d22795e8e80aebced2260ff04b5d3589af472fc9 SHA512 90068122824322884ec8f3e4be2fe7f76bf07ee1163baf6da15d09ba3ff886e5c5ef72016509eef9f4af9d85f154ebbe051d5fb3af5e867f1f67f03af8068100 +DIST NVIDIA-kernel-module-source-515.105.01.tar.xz 7531676 BLAKE2B 05a2e00141ce699956366dfc513c12b766b17b95bbabeb0e6da496a3babd4d8ce02ef82a7c125b3dd9d884b132079398225c5588a5ec853dfd3db7359cafea74 SHA512 5eb4ebb3641343eedaa3f6df9cfcc539011e4141f109c6ea585f6e7f2efc41ae1156fb5b056b070a17d8781f62028b396da9ec47972660548f8a651a032a6877 DIST NVIDIA-kernel-module-source-515.86.01.tar.xz 7504412 BLAKE2B 20b1b9eb6e2fbc7adfa0b78c6acc88c9da8346888c3d1f1ec01a6c1252feccfc104e338605bfaf7617f0b78c7d0de05b32577394714be3575aa67b37c0e843ca SHA512 075fb8b9c3f43f21f51035460a9bc306b11214eb029e950a5bfbc283dc1d3403210ae303148442d31b2c5bf618923bd1762ab5a91234d005f50177fc02fa8ba4 -DIST NVIDIA-kernel-module-source-525.85.05.tar.xz 10081192 BLAKE2B b80f1893fe18dcb62ad2d1daaa7c1642e8699c7acda0bf55a104e10824ece908e45e8202949262fce5459b3bebe3582fa52aa506333989388eea94d65e26da11 SHA512 1ed3e69d959d68a351541483cbf552730ec1748faee3bacf1b9f0099650bc3244ed11a4aee84e51187321f59fbedaa92d24a66439265c9f2e436db82a6876ee0 +DIST NVIDIA-kernel-module-source-525.105.17.tar.xz 10120440 BLAKE2B 00fdaaa690a8ae14db333237e2ee3ef14d83ac7be84d53c0300e0ed70e5b2681e293730d737f82e2e74487ddf895c831ee620b6a8162dea9f0f0b979357992fc SHA512 bdb475cc9e5332e383a5375baeae444c9148c6f145e7870392e4eecc1f91708d4e52fb5eb844accda19bcd749ae0c2850c29310cb234b015e9307c3c62088bd8 DIST NVIDIA-kernel-module-source-525.89.02.tar.xz 10094060 BLAKE2B 950058e9441302ffef78440be6fa3c25c0d768ea09433bcd943989cdc42e265ce78f3eb4447d77e834c7ffdee61a9bc09abc8bf10fa7f1dc0f75bc43c2c4ea55 SHA512 5044130d0a9a1237ae4ebaf6016e4959230fdeb2d5100cb8068906d2759246c4aeb965686cca67a498d0699e9d3b16f6e005b1eb342a32169a8f05dfd03d3730 DIST NVIDIA-kernel-module-source-530.41.03.tar.xz 10485752 BLAKE2B 2241be04820de7bea99a3833de04a67e6eed03e3addbeb9d8ebb2b6f802f528f87e27deae7e404aac3cbbd17071b6183762a72cdda3adfe7ee6d2ea88c916b01 SHA512 c6dea65d8b5f089a2a04788e7f0d7abb667ae1b3846db07b3f35b3535f6bbe8decb4577a10da1172955bce2431becd2670f9f14678141d09f5b0718d1e2da3b7 DIST nvidia-installer-390.157.tar.bz2 150323 BLAKE2B 8058ca87a6dea956d564af9f7eab9b1fc82b1f2382bd5cb2f6d97cbe2e19292533522d5f8f2eacbeb16520372715fcb72f8f9b0998962af5d4e75522c8d74524 SHA512 93a7ece648602157496c8e27a88864ede341a100f5328a4c1a25faf8f0b94d252060e5e2f71d0c302fd0566c10773c30b76b3b5f431d8039b71c90a7969f7d7e DIST nvidia-installer-470.161.03.tar.bz2 146227 BLAKE2B 4c733877adbe5f44e2d112fe2401657c2e2809ff76d0eac29409be7c624e073d4a2fbcfb39eb706625d93d1f3c753d47271a6c2c660270824cfea350e07c751a SHA512 eab1308b85dd66ae4332aff766a237e77c763af45a0e62eba0958abcaa493950aa19edd95039d03e783d78d0ad1fe8348a13d5b64fa103410acfa6ad5f95a884 -DIST nvidia-installer-510.108.03.tar.bz2 144494 BLAKE2B de7c3f5c50350318a3e95bfbdd8fa7f51f187298497e88519f9d4719e26f310f2420ef8e500866cee0e6c22e888c4282a65e1edcc9c7e3d4d4799ff8e6856789 SHA512 b90efcc082b6de0ca42fe203ae0b60aafc8623377f31fd5262401e933bf630b11c843d5e02951374a9276e5d08eaa0c28bf2aa4987b8f9ae8719ada6e62ea7c1 +DIST nvidia-installer-470.182.03.tar.bz2 146269 BLAKE2B bfd1c1bac525e9bd6502a7a356064a96030b61a0e037e893506c397ac95d48bb513a8bc6e1a6060d39f6441191538b0be50c12a3199fd0e720c0f5c2872e5d5e SHA512 d3ff67619e260e1bf4519b087637a9126406600519bcc42d938e12bbd2bbca45e8ec39bec4d23c95ac1c3c8eff0430f90e8e360769d8516ef30e57e99bd4aeb2 +DIST nvidia-installer-515.105.01.tar.bz2 144859 BLAKE2B c115987d5b95e0b4baba29512169f8222ce02c3968733e6b59bae0486a6f54af364ceaa0e20cbfdff71e73e678352f7b9470b8c1a9eebe5c50e429f3bee08d78 SHA512 181520f463d3e0c27e83e68ee33cf451c6ed4794bcb1be479056455afb57ea00a3babbd8e2e262f0978feb2ce37e261c0a8efb4973b0c90601d17023a438c2ba DIST nvidia-installer-515.86.01.tar.bz2 144637 BLAKE2B 840e2258224e0d19dfe092bc8e8d5986ff771a9fbacfc6c682c513e2757072b68252ebbe4ec8a491997db80f3e1c6879b9dc8f93134caf6f0e6ea3360253fbd9 SHA512 3f55ab79283f1730b5cf5898d9df97a78b8d86f0ac124af9e31c7a960f4a82e46bc262fc0cd8ae9c29c3bab65e2be1ca3565d0a470017a153fa58f61241b34b2 -DIST nvidia-installer-525.85.05.tar.bz2 147738 BLAKE2B 08d1f0e8d50a51b2057d190c0fe17d0b5ba1e313541cfff3ccd782348d2049ff85ef7b4e0c2a6dbdbb074a51b536db04cc11b856d02e22c2775788155163db39 SHA512 9b59a0ae0f64974d67f95a55bf21b1cda887ce60a5f8de07d83684ed36271e0fab15d50105e56df7bb6343e2749e014d174c7c7cdd37981983f178c246348f9d +DIST nvidia-installer-525.105.17.tar.bz2 147761 BLAKE2B 1875f143ebcb62a15b91498af0a8b4ffcc67d5518b3c4951c6400a5a4dd96b58af8f0a05c4d40d3e863a5db2c3ef65eba9846d853958ab457db06809d03781b8 SHA512 b58f0dd24010b511d77e13e19d95aa39e55d08ab25389f44976cde4c900120d3a101998a3d265862e7d57cadaa2948b7f7fbd717fa6d6858e7a42f86c51f943f DIST nvidia-installer-525.89.02.tar.bz2 147686 BLAKE2B 0ffc3750f497ea9b8023d1a48e6b8c537971a6a616cdb465a4af5072d6c3c577ca439a1b573e1eacb7cf302d405b8e1b582efaaefadcaf39e33742ed22998dd9 SHA512 9d6b71c8a332caf052b642d8205830136b51151a04818dfda36e0b5adb5f3e2111c128f410a50239c38483225b38712b781fc0bce6dbc5fb8c7a6787f73f5104 DIST nvidia-installer-530.41.03.tar.bz2 147834 BLAKE2B 87fa794ef5d301acdc51baec0e30a1d2d3faf1c138422cb32324edf648a022d61b9359fd851aee596effc1fb0648f8bb165423f54271ceb7fdabea43db9c3444 SHA512 c74fd0219f785788476a16982d7472401892b8cfbb34ca5acbc7367ed597b3262cdb81772452e70a3e26af308170a2763701c9fe93da405dc273d65d3a23b274 DIST nvidia-modprobe-390.157.tar.bz2 35306 BLAKE2B 80d202b39c2f95ec0f909712c2e101483af50124092c32efb33bd98ff58ddfb97b737ff07f1ddc941f688c1b4c26a15f392566d522e18506771f10422fcd571c SHA512 109bbe24a3758b568ea65fe1e9d78f69fae6108ec0497b796c885a3912825fe04ffd7389a3e22987f1a10a2926bf6eaa384faabc59478aa3ee244dd3ac91c6d3 DIST nvidia-modprobe-470.161.03.tar.bz2 38348 BLAKE2B a137e38463f806d25e91d81faefaabc5cd5e51e6537b0a9e641ff96b6029c522eca3766b46a240bd5d25cf04fc11c8eca6b1ae2cbdcc17bc7f0d059fcba67fc7 SHA512 f3b95c22b600b1e09797ff346b7bddb7d84abab01b5383b08626e3172cae8c84fcb3d0ce6425769eafad9602656704c51b934131b3e0b7512de82e5acafcfd15 -DIST nvidia-modprobe-510.108.03.tar.bz2 39055 BLAKE2B c195f55a60eb058b2da704d2aea245aab82a5129ac974cf0d5eeb6b39256c749b7b7de144e067887eac3fb03061d4f87a9c694429078d0eb0242227df1a65a3f SHA512 9ba4fd40b06ffc2f880944dc4b58155a746422cbb02cd17f6af59e3975d46861f182d9257fe654c35d991f7799d95a0a0ed0fe4bfac4426d997a22e3b270fd37 +DIST nvidia-modprobe-470.182.03.tar.bz2 38816 BLAKE2B 67718e61b3a3a753f8c979c516db537ebd5d6a8117524417022969d3cff2779027cd823233e28ff269c4bf311f86c3fd488ac89c8fe93ba93d9c2d177a4d081f SHA512 df313af02c0130ad18d7758800d6acc55c55dbff12117691a1f57dd110d5477309958cb406e6d59154e7c85978c9cb79a7d6445bb5f2fffdabb37dc32db2692d +DIST nvidia-modprobe-515.105.01.tar.bz2 39528 BLAKE2B 049087765245597eea26218a912b9fdc4eba94d11e0c40e5c0890d830638f881e8e297116bb0bfcab8792e5649152f60bf27bd53c0f8452f1eba8c37ce5e3067 SHA512 a99b01382ff74fb9ad8a6ef02471159b9daa1190d3e96d74ee6daa8e2c90df7de2e9a872dd10efdb4251395b841dfc2b1fb546dc592192a09d966cac13da1b6c DIST nvidia-modprobe-515.86.01.tar.bz2 39100 BLAKE2B 00157bc2cc78c58389772dd92c0e389420b93068c673153be32ae385efd50071ed9986c3bfe0d9242a539536c1cd3fd9c502ed7d00523aa653c7a9085a6333bb SHA512 14c82274bc87da0b4f2f8d3a53d02ea55fb003a32ed10a2259598db86655cccbf39fa6bded836cf2bb667c2eb842ae0ccfcf39fe32ee78ff291827673d02634c -DIST nvidia-modprobe-525.85.05.tar.bz2 40018 BLAKE2B c065dcf143af716c02bae44c86f4325a6c4714aa937c3ea8a54ee3b4cfdd96a86bbad8f481daf8493dbd0e1400e301d58492d9996d16098d649a9e73d8ee824d SHA512 bddef88dece5e06711a4b47b9762ede13431470f2d1082a217737f6bd726ee3278acb1ea526c24198033ee6bbc0add5398d5ce90ea00c9e189a49b13842d72fe +DIST nvidia-modprobe-525.105.17.tar.bz2 40445 BLAKE2B de849fb838c7a10009773a0469d281687ae6cf3e4e4bbfe56063d4d1bfa8b6c596ab23ae3d9e82a39c6bf7602c3d1a7e001c822422d0275fd257eaa20ad1e4c2 SHA512 861ef670aec6bd106d86284fd8075da9ea977274d1f258df55408f530725aa20ee4cd3bf0600f84981e602ebddf7cba095654a4ada43bb061747bf2ecb7c71b7 DIST nvidia-modprobe-525.89.02.tar.bz2 40010 BLAKE2B 5c7ee71c5f88a2680c5236abb9bb7ebdb3d09d42282663f33330ef75ffbbbe0f6cbb00e2b500426bd18d31f29a872e7a4ca532185baa8f7660eaaa47105a93ca SHA512 e29204f855291524a25c5db0e930d78aba539a374523293baf0c3c86c0c4c1c336f0d6473d0862b2e942efb2fefb1c2732cdfa20dde8f981b047ba34e48f2138 DIST nvidia-modprobe-530.41.03.tar.bz2 40002 BLAKE2B 46caaa7b4f6d7b6561433ff27c4d3c89d29a393eca560b99a2c7d94ca657cfd80e44703dafef0596b5b076a1e206ab47ea8c830e5c5b2408b8e3c432a92c963f SHA512 1b208a10fdc44b550655753f37086ceadad7b7e30a852c2d4f781c645b50cdbae65f844c7f15962d716a0dc5e28b785b8055ed430476c23c73fd9b2ae9ef7654 DIST nvidia-persistenced-390.157.tar.bz2 48654 BLAKE2B 2cf6c92da90acff55e8c180a06b0c6a29d48be9fd8ca3c541202fd14f0697220fba6b66452942aa7ae7cc8821f5c5eb9fa8f7a31d2248624e5f9141d83a176b8 SHA512 70f0707ed6f2b877e69ef90cf782f66cbc9d2071db53ca09ceb7b89427b0fe176708517340621fa251539b7d481b238adeeb60261674eed74de1f62db6dbb72e DIST nvidia-persistenced-470.161.03.tar.bz2 46540 BLAKE2B 7a9af37c570fd50341a620cb8324294e4e29ebcd165f7254ca8c7a0d3010b40ee3f6721e2e6cddb5378629bc20014a4d916141e4109f6167c688c506c7e0852c SHA512 45c49cbb2a61fdcead639bf2032950f97a403fb70870c46c71003d30477bce2936bd2e2dc6ba234987cd2397dca958e83e78850289e70d07e4cb9818a8ddf8b9 -DIST nvidia-persistenced-510.108.03.tar.bz2 47222 BLAKE2B bed22370ff15df7097e927e07c444a405702f53b9e5591b816a5c0bf1d9f78a045571ece830db86d4724a9b0466a8d67f2e45ec010c69f603a9bce5cd2b8da48 SHA512 39df00ead66f7a6b0e001484333c0dda09fc30daf0df0c8fec4f5913fb88e7a2d214830e7f20632aaf89acdd9af1f11d78b50eacc10cc9bd2b534f390aad52f7 +DIST nvidia-persistenced-470.182.03.tar.bz2 46527 BLAKE2B 614cc5bf88e8b0d1ff7b74d68049e1c7d78718c9a3801d3c88a7b34bbf13d0ede6438118402139a997985bb5c757aedf609e8fa6dcd1bac37441cfd61950605b SHA512 a80c3c78430f354ad1a03eb2576948d0bbbe066f64b97429b7c8aa02070a10d7f3a7f60db898d5589696cf0a77f04edba26069d4a89be6d0a492642caab5ab96 +DIST nvidia-persistenced-515.105.01.tar.bz2 47144 BLAKE2B 7d60577e41eca01096eb605d79c9b39e38d7f80b6b848501139d206b5853515fa3cd49a1d28e75667c902c4a6d0a90e31b16652f8d6942185d1502a60683dfb9 SHA512 bee44ad4337bd295590a08408eca3441c2be386bf2776903aa95436e6efdafe437df3c69de711f4abe14722f27705f1cc3d96ad8febdaf617e97868c22e9013f DIST nvidia-persistenced-515.86.01.tar.bz2 47153 BLAKE2B a7d213790895876453d34580f563ee0aee98ee145fdd8e7bdb726f91298da0f16a4101922a908d367af3ffd6ce1418128f7c5dc0a1e2789143832dc1b96ffc35 SHA512 ffe735178b3b5a0430bae8678b5f7fca407a0389de7f57a1789f67d3b4087cf7c638e6ded8a1cf7ef3ca642d0f889d9f2795fa0e18291101ef1b2a9e3bc4a174 -DIST nvidia-persistenced-525.85.05.tar.bz2 48165 BLAKE2B b0d396e22b2ec2d09d156b0024d308edf65ff5de1afb5d20e1fa33329f84776b7892f69feb2707a4d199bcce491ff647f24368f312f65df575bbadbe8fa31584 SHA512 8154c49072079b55ac9b6ea784004c47a4906b0ba1f2ef1cfc7f90bc7cb2259b14dd5655d0b36496f2546719f9b928f68689e4f449186913286fa838fc1fec13 +DIST nvidia-persistenced-525.105.17.tar.bz2 48059 BLAKE2B 51bca934bae5554a5668623745005c53a48e2ee8b9af5b034205e8a06070911d88ac85c5a7632f69fc508a41399d212aca2787e4b293836ea84bfdee0410ddff SHA512 9bbb69b917d714045832269db51b9b1cb747027f3db96c245bcdc293d7fcbf5a105903766ad90841b4facca93370ee48263c9aea8cf9c39fa88965d64655163f DIST nvidia-persistenced-525.89.02.tar.bz2 48135 BLAKE2B b7f0d085d18a45468bbb9d85a84ef9b7917d29f5158a836bacdbba7f3a3c05a2b6470b1a2b2a0f817396f234e620318a0d139ee8380783bb12511d764a09b235 SHA512 927a89de9392fa545e7ecd11f952c00657df92e6b1cfde6cff69851b09c04796a439768a8c6fb3b1b0e322239554ab029bf8235164f5e28ecf997b31733bef28 DIST nvidia-persistenced-530.41.03.tar.bz2 48191 BLAKE2B 8f2127eb66a4752ae504ab5b01fb897d81314a913ac231533f87ead5c3cf82656cb8db361bde0a81b87fa6f53ba24d2a6c34ba08c79feea8f66895b0514b2bd4 SHA512 0b901344df116d0131f1c6cabff771f78d1bfa43d0dc21caf0fe79d8e17d5015f371da6f302f98b33f1f05894ebfd6928427b15ed4e2f6ab2de275b91d5b97da DIST nvidia-settings-390.157.tar.bz2 1108938 BLAKE2B d9ec1ab5d7f157d74627272adf752a671dd17e2ede02069437b6180b927fe315b15cc6416d584ab2f038b76fe01e5b64514a834f24d88ac16676e55205fdecdd SHA512 b16699009bf56a1ff3b623a528c58061c4f5a2c5c4a373756a07bcd667743a1df7c733a572d2d0baa835a904ac2fda8a5c85890dcc00c3a0f223e0467aea902d DIST nvidia-settings-470.161.03.tar.bz2 1062425 BLAKE2B 20523f1e5ab39dfe8ac657afdfafe3d99df2cfb521a475f54804dd50233d4e2ac5dc5fb0e3394997963daa5d06bc2b55088ebdcbf894c16cc9d25aba316834c5 SHA512 61725a6f77930d9c12de6fef57d9f5bb93a5e62e60d0db1707b7f469bce00464192930c4f46e9074e7bcbc4922fc86e9b22ddfdf092f8f46b0c6820505e3b87e -DIST nvidia-settings-510.108.03.tar.bz2 1075907 BLAKE2B 537d38bd6a5fdca0182af9a7604764c14fb832a1dd2f0d6f2eb1532f06f3822ed9e2190293c1300b7f8971990883ea491269e7ab4838cd724196742e21352ce0 SHA512 3eed794ad7988143719c6d905e375d514daa441d9ed71eca7eff6cae4cdf4fbf08331f9b0451bcd961920f1ffc1797a257943900eef45e225b312b61232275ef +DIST nvidia-settings-470.182.03.tar.bz2 1061536 BLAKE2B 488a5f44259f6d26d37b65ab2b88b7ed008f3cb583d41bb5492bdaeb768d7d58ba239cd16349e6b08d8305ddb5663002c5101fb47a24e7759c42f55d2babe467 SHA512 38fd820d7a1227376f612e89afc7139563c7f87bfb9256037e71a7f33556286570b09f9c7f057596a8d6cf89f18fee73f4be8fd590e2da879cabf12903ec858c +DIST nvidia-settings-515.105.01.tar.bz2 1079973 BLAKE2B 3dc40667d389fd6b3508e5c2eb22e05d358e6fea32f005655e14ca4f89d00662ba7fd085171811c6c1465fa98a10a3addaa1ac24b4eda1d30e99763b55404b4a SHA512 5be33a0f4537be12e9644cbd85ef577decb7de819f8d35b3de032052aad6820a1cec5f7e9d99806ccbd92a77d9ebec6e49a0a35fbc6b47aa81f06e6fda7e483b DIST nvidia-settings-515.86.01.tar.bz2 1080128 BLAKE2B eed02cf9b73fc12c1d862df71d7fe9a4e4e8486831d1940c6e5187b751abe02deb0ebc495d251ffcd401f8ce78b16077d5cd9272c0f472d8c6465a958bf66c85 SHA512 d2c50bf587f53336a1d80ae88b382ef04e8c9ef24893f8ec901934eebb1358038ed67ac7501d98257c486a0fe2e818edd91832b3f989311c061d7a8b85818229 -DIST nvidia-settings-525.85.05.tar.bz2 1087280 BLAKE2B 2513d4b6e07c890249b2ab29ce1241666af8c939e5925854298ba858aca3e46f100a9327476cb75be0b056aee40153907780f021ff617d6fb8fe4d87604258b0 SHA512 f61f17f752392b7c39b7d5457b868eaa724020301288ce72621839135ed58b1c0979c491c111818d91f96e1253be74182aae6f538ade59e28071b420bd1a1a97 +DIST nvidia-settings-525.105.17.tar.bz2 1087544 BLAKE2B 9e6e67cc2b4dfb5417562a1f64f5a86f98fa19eb1c2a90d72a7925a7dc7db1b0f88a157807ba2dbeacbe426849ad0a2027e363ec31c2c1d9f534b49128269381 SHA512 36a2f1f6415f9c810bf3861566120e88ed14bc09be1034ba3c2ca174d8b47ef9d817f27a51358b569e5966281b5e341d424036b6ac3b87c74ab7962f3c533820 DIST nvidia-settings-525.89.02.tar.bz2 1087020 BLAKE2B 5c1716a112046c09a390b0fd8212d32fb000e0214da6f5245722d2f84a9797509ef9b730a0774a4b719b9cd06afaa809262f1772a62a9c2eb386d7ab874a3ec3 SHA512 bd0527173a23e5c2142dca1a4a00f4844c8f83707627555812034ad2d23b0fa861cef047f3b83e3db3d0aaeb30411f745bf9ae892b576bb502169259a4e48893 DIST nvidia-settings-530.41.03.tar.bz2 1087946 BLAKE2B 1c5cde28d6662707ddbbef7bcd5ca8a35c343e76874b5f4a7d9a1f69364145d5205f8ec8f887b2fb7d0684ead507ed515b23421d074d2cc9e491f4bacbf5afc7 SHA512 84840296e9a18ac95778f5b2efade9aef23da7e22c6cd36f2a30ee04aed661ae20b80e0cdd1be4ab7a0ca57a62c7096be807dd69f805d03b5cafe50a035bbb4b DIST nvidia-xconfig-390.157.tar.bz2 107399 BLAKE2B 0cbb3b1ba508ddc3ba4a161c290b31bf7a67f67880bdbd01171a962c5fa97ca945b1ef17932403f8589309380743f1da632c728d8accb6d4e56dbd895e7486bb SHA512 50b390811c9bf091b14add41f886925b17496b41006b7d3981d2398caa65cf5db8a579c8cebed78278384bf3acc629befb07b54339c61abcc75852c0dcb8b8ca DIST nvidia-xconfig-470.161.03.tar.bz2 108669 BLAKE2B 6c12e38759ce64c5637d6301e2d5c89b8d53ad4df84beea276b76cf6927eb6ff9596534b7097088d41447886ebb79e00b037c747a47531b13a56373df7ef8969 SHA512 0cccb61c3b875b47fc78cda627aace3a730e7c267389e0fcd4ab780aefaae3c48d95d137becdba7fc12adb284ede9307c85a3ae347d31a57a6283fece6046a9a -DIST nvidia-xconfig-510.108.03.tar.bz2 109729 BLAKE2B 48378155d57f9b4a2b58b044daa1f2f2ed9b897b77f0453f67c7b03200cc09689b628f88a87c0f4c8ae149f11cbe6364eda34c2636cc1e1fce33b799d8225138 SHA512 17462e7826225804685eaea4dba05252dce138f95c72285abe607ee1b2a6269d2f4e5c0833802037d29350d1218ed9982053871b0b08c4f5f329d497da299fab +DIST nvidia-xconfig-470.182.03.tar.bz2 108697 BLAKE2B 3c2d5e3288fd8dcb253c5980b2528678ce1b1322920fee44a1ec29cfa15d799aa51a613ba3a2f25ce0a169eb4768c886e0f4703c27dd8d99fb5102ea7382b076 SHA512 942450fb3eb07297ea4b5fe6d9653c96257a41bd4ef819b339e080489c5a6d2b78d826859886701e954b7e3dcce8af6d8a78ab0dca2de44ca930370baff27954 +DIST nvidia-xconfig-515.105.01.tar.bz2 109756 BLAKE2B 7eef6613197909f9c2188e904fdf8bfe73e471244859b617f6fed4ad33d6e5d5e789a14bc7b9c483e70f895624ac7de1394659d173a09954e1ef86cc67dff244 SHA512 bfc08f9c334424f29d1b1d474f49f8366e25b3c358b6b646e952c860f3e40cb241343e9cdf0a05df47c419f5bb820245fe80e4d51fc80a3b3912a2d372c94502 DIST nvidia-xconfig-515.86.01.tar.bz2 109747 BLAKE2B d6253f9d052be5aaa1a2be82bf4a36c971aae8b6e9f61e4ff5f27ec415d945bab8289678d6a2495ff7521c66478421090a452ceb19d87803de4290aeb7f69bba SHA512 f4e66f23d9227671158ee0b99b1ccc44f25dc6a910d3b00332d135fb94f21b67f581804b53a40945a652777c898e20069962721931c7b58d2c33d38925da5e35 -DIST nvidia-xconfig-525.85.05.tar.bz2 110595 BLAKE2B 249263ad84c72c5682836bc3717774b95238197319a88b35adb9174e6023c385c49bf95ed1bf89a6d4fef0ba445a9802e437324358bddbe999f61849ea68afc0 SHA512 b2cad5f509e817e1e9f43bfce279a512d5899dbbb3dae212161b1ce7237ac3598e335779fbb7abb8b77327827838d7d310522f0b0a014498cff26f4ed5824841 +DIST nvidia-xconfig-525.105.17.tar.bz2 110608 BLAKE2B 3db4f55f34fb16e00224d2dff7596e15960d0f6555bb90c141566e48cbcee65080d1f3addfbc40f9cdd81b8b75d11659f007499c5cd6d31eb0c082a3c26f61e6 SHA512 d794459dd292e18310a549d4f09aec405b5f7f065cc3dd61e6bc98d19f08bc56cceb4e667e6442831c1c49e6709e403012b302892d93ebe6368d152ef921b762 DIST nvidia-xconfig-525.89.02.tar.bz2 111065 BLAKE2B 762354ad413253389ca8f57fbfcc483a0b26026420f24f0b72af03716b4226e7a97d95a0e0a88e161200dac5d2257792ab0ae8b581436c3b92c733cf75a80a21 SHA512 a90df9a051472962aa7423fab3bcf6dbaab4669a223181da41922ec65c5c78927c68fef43c8031685439f037bae9d4553d7b388878109d45c8bdd5004cbf954f DIST nvidia-xconfig-530.41.03.tar.bz2 110920 BLAKE2B c7b90382b0e42f9f0d839c40c53c613243314399c715c303d9221c1d9558bed4d159bc1b76c2ab8ff4831d32fc93b661650b9833ef7397559847c3a14763cdfa SHA512 72cb1b44ff2fd162fc76fa4993b24a2994545b2b5e8f23252729a55e2deb2d10cc9263dfbe6449a81e3e18beca0bd6506b295a7299696bb9fea628fd99dca555 DIST open-gpu-kernel-modules-525.47.15.tar.gz 10311650 BLAKE2B 8a3a41a5a0b378d0db480842757e361a7ef50393b66ad2ea69e51838b33de73fbeea9a70d86418368ecfbf087f1ecf758f89ac99c2431a41abc4f0de5d89d6c4 SHA512 e91d60a080178e302c2a81ecabeba6afabba3a0c42d8c8f6a64e1fb7036781b0fc28301e7ba11a5b96866617e1b79cbe74d2956e2dfa7e6b81a65720ebf79ec4 -EBUILD nvidia-drivers-390.157.ebuild 18374 BLAKE2B d7a3882a37e4441998201365a0203c164b96379ff0ee92b537f64fa923a4b039b009d96aa4857990b9df7975b5821d3860c348dd8707590616ca3eb3dbab6ace SHA512 91a65841f565122fcedcfafd831a55c2ebda3d87e3198828e098af0f6c1a88baf36dc4f24595c4b0ce4b1b1971ca489145b222c7e710c3ef9f15a0c07d387910 +EBUILD nvidia-drivers-390.157.ebuild 18829 BLAKE2B e8ea620be73e325613179bbfa02daf269699d2fa12f3338b3e1bab90f620d3ade276977e6037d603f6f7ea36bc5e803c10b415512335c89c0e2f82274265a241 SHA512 fe0e5b627eba87cf0b880636b11d15aea9968f941b162e3c785daabba6f556532328a8a4f4375b7b17a9d1329e58b86172e9d7d4815a304347a0f60e0f1d5d73 EBUILD nvidia-drivers-470.161.03.ebuild 19347 BLAKE2B 9d8e05f763a50e569874f5c9fa48e9bab89018b8565a2fafb6eecd07452e3fad201743e74cedebaf7c00e581b4c1fc29e8f75b77bb6aafda9139965cbec74400 SHA512 299238e415659ab76cbd0c1fe47ad1569bb2ac8950817b32a0d5deabcd63b8b9804237d124378a488a8d19e6250b97088c09d9f6bf829c88b5e61bf59df56d94 -EBUILD nvidia-drivers-510.108.03.ebuild 19677 BLAKE2B 43893ef60edfe12072a9d21ec0ece3b05d8abcd6b89f0e1f48e043595aa65b52ce6bcfe59f86ba3297373f6db55f76435dbed8131ad71f6d2c0cd0215f301e33 SHA512 daf79d2f756c1e93dc659384a7f61a92a124937fb3da0286f7af0290cfa7f39f793c8a2a16f19f572f0f80e43c612bb9f7d322c6b4a27ec7f40b705f54eaad3a +EBUILD nvidia-drivers-470.182.03.ebuild 19348 BLAKE2B 885880b163d211185c737ec85a175f599fb5bc979aab72a2a7468b2ab63a7a256da5db7e8e75ab5567722e464fad2ff879eb9bc39db21b2a02a2d41e4bd450a4 SHA512 8d794f65897dedbc97d60e3880f3e993c698d712d6a0a6ae91ef5af38fd5c0f44dc9dbabdb2e20315d28a36e7c48554cc1ed0dc8990da3b6a22f307eccf06379 +EBUILD nvidia-drivers-515.105.01.ebuild 21933 BLAKE2B 99812c363db1e8528d77e2dd2ac56366946dca45ce395f7ff5eab239f1d2e4a7039406265db9f06f84c262ec611181eccfda8be7f4669300f1554d66d18f3810 SHA512 0dd96d6c1155f5a2368e92160a07f939f286bc523a146579e967803476108aa96feff53ab3066b0128c2fa4f0a67dc2ca1248c6f64bd847e2c693e86c734a0e4 EBUILD nvidia-drivers-515.86.01.ebuild 21932 BLAKE2B 3f60b9d62853caaf74221863cef7ec05ee782ad0fe2e35bb75e135da945c2ad864399b438f4608cde71881967345d889b0af5275b7fb225356c9e1f13945640e SHA512 9f9be1e4f552715eb9356009da263caa6aa0cc6c8e40865d7d441c6280e8051b9cd75652283f6231f0396210fc343b334b698ec0b8820c6b7353e571248bdb8e +EBUILD nvidia-drivers-525.105.17.ebuild 21811 BLAKE2B 1e473279bd250e50d276effbf39ca95ff656a407f27cb1cf5829810a5fef7fad9f5446b7bcd24c038d42529c167ddddefd554fa515ba61f93038702d2279fe44 SHA512 c53cff3602a78986ddd0276cc06f91ccd0fa2b09c7c46cc2e4d62327f8b02f57891412a3921d923b58e1a390717e4bda929905e421e972eea661f0348fbd51e6 EBUILD nvidia-drivers-525.47.15.ebuild 21822 BLAKE2B 07a891d42ecd0808852e84e54b392c6cfe5a6299fc38f3655af4fec9eb21cfaba7aad2aec8aa855531473ff58731a3c6cd76f31964445a88ef98980689ca7526 SHA512 defe15ade17d6b0e70b4100b3d4b143d8cd75d9cd1b4a5ebbf3041877cbb28d3d5e739a921d717b346987b905a7a19c8d51730e657908f7994d4b7b73f7e98b9 -EBUILD nvidia-drivers-525.85.05.ebuild 21810 BLAKE2B db04373abf4d0787a7c37b644ca09d827839353abb5188e58077ca2fdbb58ac78a6fce4e2e81bbd80af7031346fdfd85db7b0f81a622589b2314cc14dfbe4da4 SHA512 e3fc1c00418e211f808825ba49c5cb5ae1ae07ba05fc259884440b341211bb33750dd2c7be9ef6f379c96de20184d988cc333b58b3a385c3d62088289aa00c42 EBUILD nvidia-drivers-525.89.02.ebuild 21810 BLAKE2B db04373abf4d0787a7c37b644ca09d827839353abb5188e58077ca2fdbb58ac78a6fce4e2e81bbd80af7031346fdfd85db7b0f81a622589b2314cc14dfbe4da4 SHA512 e3fc1c00418e211f808825ba49c5cb5ae1ae07ba05fc259884440b341211bb33750dd2c7be9ef6f379c96de20184d988cc333b58b3a385c3d62088289aa00c42 EBUILD nvidia-drivers-530.41.03.ebuild 21813 BLAKE2B 3a28170f7e5aa169f8cb0317cde27881f2787fdf1250f9071d5f001c7193911fa7916b546415bfbd2441bcd753ed3476fbf4331ea56e7797d50b7d110e97f4ab SHA512 ad9d675298aaddfedadcd94f6244ff3b7fd6ea263a6a4875efa348c2b180c37b637f9ebd1333b6600baa2dd258ec9573efb71f6c70c3e85d4485b1d7082b8cd7 MISC metadata.xml 1320 BLAKE2B f8aa8f9a39d6da284b60afb50087acf75744057628e79b77a95e6bebb1e386e9d1a819f41e73d3e94b8ab74322ec8e8b077ad6d2af0804a5c6f20b4dd5f2897d SHA512 9fb939f8c8892ce43afc4f577181474c88a0aae3cc58af57987000b82f6c52f3f7b40fc538fa8eae0d5dbaf1fe3734d84f72fda2106853edd945149b3f2d2747 diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild index 09a8849c0843..94e0026feef8 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild @@ -233,13 +233,14 @@ pkg_setup() { fi if kernel_is -gt ${NV_KERNEL_MAX/./ }; then - ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}" - ewarn "or was not tested with it. It is recommended to use one of:" + ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is known to break this version ${PN}" + ewarn "It is recommended to use one of:" ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x" ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x" ewarn "You are free to try or use /etc/portage/patches, but support will" - ewarn "not be given and issues wait until NVIDIA releases a fixed version" - ewarn "(Gentoo will not accept patches for this)." + ewarn "not be given (Gentoo will not accept patches for this). When no" + ewarn "supported kernel are usable anymore, end-of-life 390.xx will be" + ewarn "removed -- 6.1.x LTS will be supported until at least December 2026." ewarn ewarn "Do _not_ file a bug report if run into issues." ewarn @@ -540,4 +541,11 @@ pkg_postinst() { ewarn "libraries and may prevent launching GPU-accelerated applications." use driver && ewarn "The easiest way to fix this is usually to reboot." fi + + ewarn + ewarn "Be warned/reminded that the 390.xx branch reached end-of-life and" + ewarn "NVIDIA is no longer fixing issues (including security). Free to keep" + ewarn "using (for now) but it is recommended to either switch to nouveau or" + ewarn "replace hardware. Will be kept in-tree while possible, but expect it" + ewarn "to be removed likely in early 2027 or earlier if major issues arise." } diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.182.03.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.182.03.ebuild new file mode 100644 index 000000000000..c5285f083bfe --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.182.03.ebuild @@ -0,0 +1,576 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MODULES_OPTIONAL_USE="driver" +inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ + systemd toolchain-funcs unpacker user-info + +NV_KERNEL_MAX="6.2" +NV_URI="https://download.nvidia.com/XFree86/" + +DESCRIPTION="NVIDIA Accelerated Graphics Driver" +HOMEPAGE="https://www.nvidia.com/download/index.aspx" +SRC_URI=" + ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run + $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \ + nvidia-{installer,modprobe,persistenced,settings,xconfig}{,})" +# nvidia-installer is unused but here for GPL-2's "distribute sources" +S="${WORKDIR}" + +LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" +SLOT="0/${PV%%.*}" +KEYWORDS="-* ~amd64" +IUSE="+X abi_x86_32 abi_x86_64 +driver persistenced +static-libs +tools wayland" + +COMMON_DEPEND=" + acct-group/video + sys-libs/glibc + persistenced? ( + acct-user/nvpd + net-libs/libtirpc:= + ) + tools? ( + >=app-accessibility/at-spi2-core-2.46:2 + dev-libs/glib:2 + dev-libs/jansson:= + media-libs/harfbuzz:= + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3[X] + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXxf86vm + x11-libs/pango + )" +RDEPEND=" + ${COMMON_DEPEND} + X? ( + media-libs/libglvnd[X,abi_x86_32(-)?] + x11-libs/libX11[abi_x86_32(-)?] + x11-libs/libXext[abi_x86_32(-)?] + ) + wayland? ( + ~gui-libs/egl-wayland-1.1.7 + media-libs/libglvnd + )" +DEPEND=" + ${COMMON_DEPEND} + static-libs? ( + x11-libs/libX11 + x11-libs/libXext + ) + tools? ( + media-libs/libglvnd + sys-apps/dbus + x11-base/xorg-proto + x11-libs/libXrandr + x11-libs/libXv + x11-libs/libvdpau + )" +BDEPEND=" + sys-devel/m4 + virtual/pkgconfig" + +QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*" + +PATCHES=( + "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch + "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch + "${FILESDIR}"/nvidia-settings-390.144-desktop.patch + "${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch + "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch +) + +pkg_setup() { + use driver || return + + local CONFIG_CHECK=" + PROC_FS + ~DRM_KMS_HELPER + ~SYSVIPC + ~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT + ~!LOCKDEP + ~!SLUB_DEBUG_ON + ~!X86_KERNEL_IBT + !DEBUG_MUTEXES" + local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection + of drivers (no custom config), and for wayland / nvidia-drm.modeset=1. + Cannot be directly selected in the kernel's menuconfig, and may need + selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or + DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in." + local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set, be warned the modules may not load. + If run into problems, either unset or try to pass ibt=off to the kernel." + + use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 + + MODULE_NAMES=" + nvidia(video:kernel) + nvidia-drm(video:kernel) + nvidia-modeset(video:kernel) + nvidia-peermem(video:kernel) + nvidia-uvm(video:kernel)" + + linux-mod_pkg_setup + + [[ ${MERGE_TYPE} == binary ]] && return + + # do some extra checks manually as it gets messy to handle builtin-only + # and some other conditional checks through CONFIG_CHECK + # TODO?: maybe move other custom checks here for uniformity + local warn=() + + if linux_chkconfig_builtin DRM_NOUVEAU; then + # suggest =m given keeps KMS_HELPER enabled and can serve as fallback + warn+=( + " CONFIG_DRM_NOUVEAU: is builtin (=y), and will prevent loading NVIDIA" + " modules (can be safely kept as a module (=m) instead)." + ) + fi + + if linux_chkconfig_builtin DRM_SIMPLEDRM; then + # wrt prebuilts, Fedora is pushing =y and gentoo-kernel-bin uses its + # configs (bug #840439), but without Fedora's kernel patch to + # workaround this issue (which is unlikely to work for us anyway) + # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/228 + warn+=( + " CONFIG_DRM_SIMPLEDRM: is builtin (=y), and may conflict with NVIDIA" + " (i.e. blanks when X/wayland starts, and tty loses display)." + " For prebuilt kernels, unfortunately no known good workarounds." + ) + fi + + if ! linux_chkconfig_present FB_EFI && + ! linux_chkconfig_present FB_SIMPLE && + ! linux_chkconfig_present FB_VESA + then + # nvidia-drivers does not handle the tty (beside mode restoration) but, + # given few options are viable, try to warn if all missing + warn+=( + " CONFIG_FB_(EFI|SIMPLE|VESA): none set, but note at least one is normally" + " needed to get a display for the tty console. In most cases, it is" + " recommended to enable FB_EFI=y and disable FB_SIMPLE (can be quirky)." + " Non-EFI systems are likely to want FB_VESA=y. Users with multiple GPUs" + " or not using the tty may be able to safely ignore this warning." + ) + fi + + if kernel_is -ge 5 18 13; then + if linux_chkconfig_present FB_SIMPLE; then + warn+=( + " CONFIG_FB_SIMPLE: is set, recommended to disable and switch to FB_EFI or" + " FB_VESA as it currently may be broken with >=kernel-5.18.13 + NVIDIA:" + " https://github.com/NVIDIA/open-gpu-kernel-modules/issues/341" + " (feel free to ignore this if it works for you)" + ) + fi + + if linux_chkconfig_present SYSFB_SIMPLEFB && + { linux_chkconfig_present FB_EFI || linux_chkconfig_present FB_VESA; } + then + warn+=( + " CONFIG_SYSFB_SIMPLEFB: is set, this may prevent FB_EFI or FB_VESA" + " from providing a working tty console display (ignore if unused)." + ) + fi + fi + + (( ${#warn[@]} )) && + ewarn "Detected potential configuration issues with used kernel:${warn[*]/#/$'\n'}" + + BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' + BUILD_TARGETS="modules" + + # Try to match toolchain with kernel only for modules + # (experimental, ideally this should be handled in linux-mod.eclass) + nvidia-tc-set() { + local -n var=KERNEL_${1} + if [[ ! -v var ]]; then + read -r var < <(type -P "${@:2}") || + die "failed to find in PATH at least one of: ${*:2}" + einfo "Forcing '${var}' for modules (set ${!var} to override)" + fi + } + + local tool switch + if linux_chkconfig_present CC_IS_GCC; then + if ! tc-is-gcc; then + switch= + nvidia-tc-set CC {${CHOST}-,}gcc + fi + elif linux_chkconfig_present CC_IS_CLANG; then + ewarn "Warning: using ${PN} with a clang-built kernel is largely untested" + if ! tc-is-clang; then + switch=llvm- + nvidia-tc-set CC {${CHOST}-,}clang + fi + fi + + if linux_chkconfig_present LD_IS_BFD; then + # tc-ld-is-bfd needs https://github.com/gentoo/gentoo/pull/28355 + [[ $(LC_ALL=C $(tc-getLD) --version 2>/dev/null) == "GNU ld"* ]] || + nvidia-tc-set LD {${CHOST}-,}{ld.bfd,ld} + elif linux_chkconfig_present LD_IS_LLD; then + tc-ld-is-lld || nvidia-tc-set LD {${CHOST}-,}{ld.lld,lld} + fi + + if [[ -v switch ]]; then + # only need llvm-nm for lto, but use complete set to be safe + for tool in AR NM OBJCOPY OBJDUMP READELF STRIP; do + case $(LC_ALL=C $(tc-get${tool}) --version 2>/dev/null) in + LLVM*|llvm*) [[ ! ${switch} ]];; + *) [[ ${switch} ]];; + esac && nvidia-tc-set ${tool} {${CHOST}-,}${switch}${tool,,} + done + fi + + # pass unconditionally given exports are semi-ignored except CC/LD + for tool in CC LD AR NM OBJCOPY OBJDUMP READELF STRIP; do + BUILD_PARAMS+=" ${tool}=\"\${KERNEL_${tool}:-\$(tc-get${tool})}\"" + done + + if linux_chkconfig_present LTO_CLANG_THIN; then + # kernel enables cache by default leading to sandbox violations + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' + fi + + if kernel_is -gt ${NV_KERNEL_MAX/./ }; then + ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}" + ewarn "or was not tested with it. It is recommended to use one of:" + ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x" + ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x" + ewarn "You are free to try or use /etc/portage/patches, but support will" + ewarn "not be given and issues wait until NVIDIA releases a fixed version" + ewarn "(Gentoo will not accept patches for this)." + ewarn + ewarn "Do _not_ file a bug report if run into issues." + ewarn + fi +} + +src_prepare() { + # make patches usable across versions + rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die + rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die + rm nvidia-settings && mv nvidia-settings{-${PV},} || die + rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die + + default + + # prevent detection of incomplete kernel DRM support (bug #603818) + sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \ + -i kernel/conftest.sh || die + + sed 's/__USER__/nvpd/' \ + nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ + > "${T}"/nvidia-persistenced.service || die + + # enable nvidia-drm.modeset=1 by default with USE=wayland + cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die + use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die +} + +src_compile() { + tc-export AR CC CXX LD OBJCOPY OBJDUMP + local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch + + local xnvflags=-fPIC #840389 + # lto static libraries tend to cause problems without fat objects + is-flagq '-flto@(|=*)' && xnvflags+=" $(test-flags-CC -ffat-lto-objects)" + + NV_ARGS=( + PREFIX="${EPREFIX}"/usr + HOST_CC="$(tc-getBUILD_CC)" + HOST_LD="$(tc-getBUILD_LD)" + NV_USE_BUNDLED_LIBJANSSON=0 + NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out + XNVCTRL_CFLAGS="${xnvflags}" + ) + + if use driver; then + if linux_chkconfig_present GCC_PLUGINS; then + mkdir "${T}"/plugin-test || die + echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die + :> "${T}"/plugin-test/test.c || die + if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \ + HOSTCC="$(tc-getBUILD_CC)" CC="${CC}" M="${T}"/plugin-test 2>&1) \ + =~ "error: incompatible gcc/plugin version" ]] + then + eerror "Detected kernel was built with a different gcc/plugin version," + eerror "Please 'make clean' and rebuild your kernel with the current" + eerror "gcc (or re-emerge for distribution kernels, including kernel-bin)." + die "kernel ${KV_FULL} needs to be rebuilt" + fi + fi + + linux-mod_src_compile + fi + + emake "${NV_ARGS[@]}" -C nvidia-modprobe + use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced + use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig + + if use tools; then + # cflags: avoid noisy logs, only use here and set first to let override + CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \ + emake "${NV_ARGS[@]}" -C nvidia-settings + elif use static-libs; then + emake "${NV_ARGS[@]}" -C nvidia-settings/src out/libXNVCtrl.a + fi +} + +src_install() { + local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir) + + NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} ) + + local -A paths=( + [APPLICATION_PROFILE]=/usr/share/nvidia + [CUDA_ICD]=/etc/OpenCL/vendors + [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d + [FIRMWARE]=/lib/firmware/nvidia/${PV} + [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d + [VULKAN_ICD_JSON]=/usr/share/vulkan + [WINE_LIB]=/usr/${libdir}/nvidia/wine + [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d + + [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions + [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules + [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules + ) + + local skip_files=( + # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia + $(usev !X " + libGLX_nvidia libglxserver_nvidia + libnvidia-ifr + nvidia_icd.json nvidia_layers.json") + $(usev !wayland libnvidia-vulkan-producer) + libGLX_indirect # non-glvnd unused fallback + libnvidia-gtk nvidia-{settings,xconfig} # built from source + libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland + ) + local skip_modules=( + $(usev !X "nvfbc vdpau xdriver") + $(usev !driver gsp) + installer nvpd # handled separately / built from source + ) + local skip_types=( + GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd + OPENCL_WRAPPER.\* # virtual/opencl + DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF # handled separately / unused + ) + + local DOCS=( + README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json + nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt + ) + local HTML_DOCS=( html/. ) + einstalldocs + + local DISABLE_AUTOFORMATTING=yes + local DOC_CONTENTS="\ +Trusted users should be in the 'video' group to use NVIDIA devices. +You can add yourself by using: gpasswd -a my-user video\ +$(usev driver " + +Like all out-of-tree kernel modules, it is necessary to rebuild +${PN} after upgrading or rebuilding the Linux kernel +by for example running \`emerge @module-rebuild\`. Alternatively, +if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}), +this can be automated by setting USE=dist-kernel globally. + +Loaded kernel modules also must not mismatch with the installed +${PN} version (excluding -r revision), meaning should +ensure \`eselect kernel list\` points to the kernel that will be +booted before building and preferably reboot after upgrading +${PN} (the ebuild will emit a warning if mismatching). + +See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\ +$(use amd64 && usev !abi_x86_32 " + +Note that without USE=abi_x86_32 on ${PN}, 32bit applications +(typically using wine / steam) will not be able to use GPU acceleration.") + +For general information on using ${PN}, please see: +https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" + readme.gentoo_create_doc + + if use driver; then + linux-mod_src_install + + insinto /etc/modprobe.d + doins "${T}"/nvidia.conf + + # used for gpu verification with binpkgs (not kept, see pkg_preinst) + insinto /usr/share/nvidia + doins supported-gpus/supported-gpus.json + fi + + emake "${NV_ARGS[@]}" -C nvidia-modprobe install + fowners :video /usr/bin/nvidia-modprobe #505092 + fperms 4710 /usr/bin/nvidia-modprobe + + if use persistenced; then + emake "${NV_ARGS[@]}" -C nvidia-persistenced install + newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced + newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced + systemd_dounit "${T}"/nvidia-persistenced.service + fi + + if use tools; then + emake "${NV_ARGS[@]}" -C nvidia-settings install + + doicon nvidia-settings/doc/nvidia-settings.png + domenu nvidia-settings/doc/nvidia-settings.desktop + + exeinto /etc/X11/xinit/xinitrc.d + newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings + fi + + if use static-libs; then + dolib.a nvidia-settings/src/out/libXNVCtrl.a + + insinto /usr/include/NVCtrl + doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h + fi + + use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install + + # mimic nvidia-installer by reading .manifest to install files + # 0:file 1:perms 2:type 3+:subtype/arguments -:module + local m into + while IFS=' ' read -ra m; do + ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] || + [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] || + [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] || + has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue + + case ${m[2]} in + MANPAGE) + gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert + continue + ;; + VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/ + esac + + if [[ -v paths[${m[2]}] ]]; then + into=${paths[${m[2]}]} + elif [[ ${m[2]} =~ _BINARY$ ]]; then + into=/opt/bin + elif [[ ${m[3]} == COMPAT32 ]]; then + use abi_x86_32 || continue + into=/usr/${libdir32} + elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then + into=/usr/${libdir} + else + die "No known installation path for ${m[0]}" + fi + [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/} + [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/} + + if [[ ${m[2]} =~ _SYMLINK$ ]]; then + [[ ${m[4]: -1} == / ]] && m[4]=${m[5]} + dosym ${m[4]} ${into}/${m[0]} + continue + fi + [[ ${m[0]} =~ ^libnvidia-ngx.so ]] && + dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest + + printf -v m[1] %o $((m[1] | 0200)) # 444->644 + insopts -m${m[1]} + insinto ${into} + doins ${m[0]} + done < .manifest || die + + # MODULE:installer non-skipped extras + : "$(systemd_get_sleepdir)" + exeinto "${_#"${EPREFIX}"}" + doexe systemd/system-sleep/nvidia + dobin systemd/nvidia-sleep.sh + systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service + + dobin nvidia-bug-report.sh + + # symlink non-versioned so nvidia-settings can use it even if misdetected + dosym nvidia-application-profiles-${PV}-key-documentation \ + ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation + + # don't attempt to strip firmware files (silences errors) + dostrip -x ${paths[FIRMWARE]} +} + +pkg_preinst() { + has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND= + + use driver || return + linux-mod_pkg_preinst + + # set video group id based on live system (bug #491414) + local g=$(egetent group video | cut -d: -f3) + [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" + sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die + + # try to find driver mismatches using temporary supported-gpus.json + for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do + g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \ + "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null) + if [[ ${g} ]]; then + g=$((${g##*\"}+1)) + if ver_test -ge ${g}; then + NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}" + break + fi + fi + done + rm "${ED}"/usr/share/nvidia/supported-gpus.json || die +} + +pkg_postinst() { + linux-mod_pkg_postinst + + readme.gentoo_print_elog + + if [[ -r /proc/driver/nvidia/version && + $( ${EROOT}/etc/portage/package.mask/${PN}" + else + ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask" + fi + ewarn "...then downgrade to a legacy branch if possible. For details, see:" + ewarn "https://www.nvidia.com/object/IO_32667.html" + fi + + if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then + elog + elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1" + elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered" + elog "experimental but is required for wayland." + elog + elog "If you experience issues, either disable wayland or edit nvidia.conf." + elog "Of note, may possibly cause issues with SLI and Reverse PRIME." + elog + elog "This version of ${PN} only supports EGLStream which is only" + elog "supported by a few wayland compositors (e.g. kwin / mutter, not sway)," + elog "and is barely tested (X11 is recommended for this legacy branch)." + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-510.108.03.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-510.108.03.ebuild deleted file mode 100644 index 680167225748..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-510.108.03.ebuild +++ /dev/null @@ -1,586 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -MODULES_OPTIONAL_USE="driver" -inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ - systemd toolchain-funcs unpacker user-info - -NV_KERNEL_MAX="6.1" -NV_URI="https://download.nvidia.com/XFree86/" - -DESCRIPTION="NVIDIA Accelerated Graphics Driver" -HOMEPAGE="https://www.nvidia.com/download/index.aspx" -SRC_URI=" - amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) - arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run ) - $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \ - nvidia-{installer,modprobe,persistenced,settings,xconfig}{,})" -# nvidia-installer is unused but here for GPL-2's "distribute sources" -S="${WORKDIR}" - -LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" -SLOT="0/${PV%%.*}" -KEYWORDS="-* amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 +driver persistenced +static-libs +tools wayland" - -COMMON_DEPEND=" - acct-group/video - sys-libs/glibc - X? ( x11-libs/libpciaccess ) - persistenced? ( - acct-user/nvpd - net-libs/libtirpc:= - ) - tools? ( - >=app-accessibility/at-spi2-core-2.46:2 - dev-libs/glib:2 - dev-libs/jansson:= - media-libs/harfbuzz:= - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXxf86vm - x11-libs/pango - )" -RDEPEND=" - ${COMMON_DEPEND} - X? ( - media-libs/libglvnd[X,abi_x86_32(-)?] - x11-libs/libX11[abi_x86_32(-)?] - x11-libs/libXext[abi_x86_32(-)?] - ) - wayland? ( - gui-libs/egl-gbm - =gui-libs/egl-wayland-1.1.9* - media-libs/libglvnd - )" -DEPEND=" - ${COMMON_DEPEND} - static-libs? ( - x11-libs/libX11 - x11-libs/libXext - ) - tools? ( - media-libs/libglvnd - sys-apps/dbus - x11-base/xorg-proto - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libvdpau - )" -BDEPEND=" - sys-devel/m4 - virtual/pkgconfig" - -QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*" - -PATCHES=( - "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch - "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch - "${FILESDIR}"/nvidia-settings-390.144-desktop.patch - "${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch - "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch -) - -pkg_setup() { - use driver || return - - local CONFIG_CHECK=" - PROC_FS - ~DRM_KMS_HELPER - ~SYSVIPC - ~!LOCKDEP - ~!SLUB_DEBUG_ON - ~!X86_KERNEL_IBT - !DEBUG_MUTEXES" - local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection - of drivers (no custom config), and for wayland / nvidia-drm.modeset=1. - Cannot be directly selected in the kernel's menuconfig, and may need - selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or - DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in." - local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set, be warned the modules may not load. - If run into problems, either unset or try to pass ibt=off to the kernel." - - use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 - - MODULE_NAMES=" - nvidia(video:kernel) - nvidia-drm(video:kernel) - nvidia-modeset(video:kernel) - nvidia-peermem(video:kernel) - nvidia-uvm(video:kernel)" - - linux-mod_pkg_setup - - [[ ${MERGE_TYPE} == binary ]] && return - - # do some extra checks manually as it gets messy to handle builtin-only - # and some other conditional checks through CONFIG_CHECK - # TODO?: maybe move other custom checks here for uniformity - local warn=() - - if linux_chkconfig_builtin DRM_NOUVEAU; then - # suggest =m given keeps KMS_HELPER enabled and can serve as fallback - warn+=( - " CONFIG_DRM_NOUVEAU: is builtin (=y), and will prevent loading NVIDIA" - " modules (can be safely kept as a module (=m) instead)." - ) - fi - - if linux_chkconfig_builtin DRM_SIMPLEDRM; then - # wrt prebuilts, Fedora is pushing =y and gentoo-kernel-bin uses its - # configs (bug #840439), but without Fedora's kernel patch to - # workaround this issue (which is unlikely to work for us anyway) - # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/228 - warn+=( - " CONFIG_DRM_SIMPLEDRM: is builtin (=y), and may conflict with NVIDIA" - " (i.e. blanks when X/wayland starts, and tty loses display)." - " For prebuilt kernels, unfortunately no known good workarounds." - ) - fi - - if ! linux_chkconfig_present FB_EFI && - ! linux_chkconfig_present FB_SIMPLE && - ! linux_chkconfig_present FB_VESA - then - # nvidia-drivers does not handle the tty (beside mode restoration) but, - # given few options are viable, try to warn if all missing - warn+=( - " CONFIG_FB_(EFI|SIMPLE|VESA): none set, but note at least one is normally" - " needed to get a display for the tty console. In most cases, it is" - " recommended to enable FB_EFI=y and disable FB_SIMPLE (can be quirky)." - " Non-EFI systems are likely to want FB_VESA=y. Users with multiple GPUs" - " or not using the tty may be able to safely ignore this warning." - ) - fi - - if kernel_is -ge 5 18 13; then - if linux_chkconfig_present FB_SIMPLE; then - warn+=( - " CONFIG_FB_SIMPLE: is set, recommended to disable and switch to FB_EFI or" - " FB_VESA as it currently may be broken with >=kernel-5.18.13 + NVIDIA:" - " https://github.com/NVIDIA/open-gpu-kernel-modules/issues/341" - " (feel free to ignore this if it works for you)" - ) - fi - - if linux_chkconfig_present SYSFB_SIMPLEFB && - { linux_chkconfig_present FB_EFI || linux_chkconfig_present FB_VESA; } - then - warn+=( - " CONFIG_SYSFB_SIMPLEFB: is set, this may prevent FB_EFI or FB_VESA" - " from providing a working tty console display (ignore if unused)." - ) - fi - fi - - (( ${#warn[@]} )) && - ewarn "Detected potential configuration issues with used kernel:${warn[*]/#/$'\n'}" - - BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' - BUILD_TARGETS="modules" - - # Try to match toolchain with kernel only for modules - # (experimental, ideally this should be handled in linux-mod.eclass) - nvidia-tc-set() { - local -n var=KERNEL_${1} - if [[ ! -v var ]]; then - read -r var < <(type -P "${@:2}") || - die "failed to find in PATH at least one of: ${*:2}" - einfo "Forcing '${var}' for modules (set ${!var} to override)" - fi - } - - local tool switch - if linux_chkconfig_present CC_IS_GCC; then - if ! tc-is-gcc; then - switch= - nvidia-tc-set CC {${CHOST}-,}gcc - fi - elif linux_chkconfig_present CC_IS_CLANG; then - ewarn "Warning: using ${PN} with a clang-built kernel is largely untested" - if ! tc-is-clang; then - switch=llvm- - nvidia-tc-set CC {${CHOST}-,}clang - fi - fi - - if linux_chkconfig_present LD_IS_BFD; then - # tc-ld-is-bfd needs https://github.com/gentoo/gentoo/pull/28355 - [[ $(LC_ALL=C $(tc-getLD) --version 2>/dev/null) == "GNU ld"* ]] || - nvidia-tc-set LD {${CHOST}-,}{ld.bfd,ld} - elif linux_chkconfig_present LD_IS_LLD; then - tc-ld-is-lld || nvidia-tc-set LD {${CHOST}-,}{ld.lld,lld} - fi - - if [[ -v switch ]]; then - # only need llvm-nm for lto, but use complete set to be safe - for tool in AR NM OBJCOPY OBJDUMP READELF STRIP; do - case $(LC_ALL=C $(tc-get${tool}) --version 2>/dev/null) in - LLVM*|llvm*) [[ ! ${switch} ]];; - *) [[ ${switch} ]];; - esac && nvidia-tc-set ${tool} {${CHOST}-,}${switch}${tool,,} - done - fi - - # pass unconditionally given exports are semi-ignored except CC/LD - for tool in CC LD AR NM OBJCOPY OBJDUMP READELF STRIP; do - BUILD_PARAMS+=" ${tool}=\"\${KERNEL_${tool}:-\$(tc-get${tool})}\"" - done - - if linux_chkconfig_present LTO_CLANG_THIN; then - # kernel enables cache by default leading to sandbox violations - BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' - fi - - if kernel_is -gt ${NV_KERNEL_MAX/./ }; then - ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}" - ewarn "or was not tested with it. It is recommended to use one of:" - ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x" - ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x" - ewarn "You are free to try or use /etc/portage/patches, but support will" - ewarn "not be given and issues wait until NVIDIA releases a fixed version" - ewarn "(Gentoo will not accept patches for this)." - ewarn - ewarn "Do _not_ file a bug report if run into issues." - ewarn - fi -} - -src_prepare() { - # make patches usable across versions - rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die - rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die - rm nvidia-settings && mv nvidia-settings{-${PV},} || die - rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die - - default - - # prevent detection of incomplete kernel DRM support (bug #603818) - sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \ - -i kernel/conftest.sh || die - - # adjust service files - sed 's/__USER__/nvpd/' \ - nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ - > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die - - # enable nvidia-drm.modeset=1 by default with USE=wayland - cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die - use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die -} - -src_compile() { - tc-export AR CC CXX LD OBJCOPY OBJDUMP - local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch - - local xnvflags=-fPIC #840389 - # lto static libraries tend to cause problems without fat objects - is-flagq '-flto@(|=*)' && xnvflags+=" $(test-flags-CC -ffat-lto-objects)" - - NV_ARGS=( - PREFIX="${EPREFIX}"/usr - HOST_CC="$(tc-getBUILD_CC)" - HOST_LD="$(tc-getBUILD_LD)" - NV_USE_BUNDLED_LIBJANSSON=0 - NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out - XNVCTRL_CFLAGS="${xnvflags}" - ) - - if use driver; then - if linux_chkconfig_present GCC_PLUGINS; then - mkdir "${T}"/plugin-test || die - echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die - :> "${T}"/plugin-test/test.c || die - if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \ - HOSTCC="$(tc-getBUILD_CC)" CC="${CC}" M="${T}"/plugin-test 2>&1) \ - =~ "error: incompatible gcc/plugin version" ]] - then - eerror "Detected kernel was built with a different gcc/plugin version," - eerror "Please 'make clean' and rebuild your kernel with the current" - eerror "gcc (or re-emerge for distribution kernels, including kernel-bin)." - die "kernel ${KV_FULL} needs to be rebuilt" - fi - fi - - linux-mod_src_compile - fi - - emake "${NV_ARGS[@]}" -C nvidia-modprobe - use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced - use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig - - if use tools; then - # cflags: avoid noisy logs, only use here and set first to let override - CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \ - emake "${NV_ARGS[@]}" -C nvidia-settings - elif use static-libs; then - emake "${NV_ARGS[@]}" -C nvidia-settings/src out/libXNVCtrl.a - fi -} - -src_install() { - local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir) - - NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} ) - - local -A paths=( - [APPLICATION_PROFILE]=/usr/share/nvidia - [CUDA_ICD]=/etc/OpenCL/vendors - [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d - [FIRMWARE]=/lib/firmware/nvidia/${PV} - [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm - [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d - [VULKAN_ICD_JSON]=/usr/share/vulkan - [WINE_LIB]=/usr/${libdir}/nvidia/wine - [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d - - [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions - [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules - [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules - ) - - local skip_files=( - # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia - $(usev !X " - libGLX_nvidia libglxserver_nvidia - nvidia_icd.json nvidia_layers.json") - $(usev !wayland libnvidia-vulkan-producer) - libGLX_indirect # non-glvnd unused fallback - libnvidia-gtk nvidia-{settings,xconfig} # built from source - libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm - libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland - ) - local skip_modules=( - $(usev !X "nvfbc vdpau xdriver") - $(usev !driver gsp) - installer nvpd # handled separately / built from source - ) - local skip_types=( - GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd - OPENCL_WRAPPER.\* # virtual/opencl - DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused - ) - - local DOCS=( - README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json - nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt - ) - local HTML_DOCS=( html/. ) - einstalldocs - - local DISABLE_AUTOFORMATTING=yes - local DOC_CONTENTS="\ -Trusted users should be in the 'video' group to use NVIDIA devices. -You can add yourself by using: gpasswd -a my-user video\ -$(usev driver " - -Like all out-of-tree kernel modules, it is necessary to rebuild -${PN} after upgrading or rebuilding the Linux kernel -by for example running \`emerge @module-rebuild\`. Alternatively, -if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}), -this can be automated by setting USE=dist-kernel globally. - -Loaded kernel modules also must not mismatch with the installed -${PN} version (excluding -r revision), meaning should -ensure \`eselect kernel list\` points to the kernel that will be -booted before building and preferably reboot after upgrading -${PN} (the ebuild will emit a warning if mismatching). - -See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\ -$(use amd64 && usev !abi_x86_32 " - -Note that without USE=abi_x86_32 on ${PN}, 32bit applications -(typically using wine / steam) will not be able to use GPU acceleration.") - -For general information on using ${PN}, please see: -https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" - readme.gentoo_create_doc - - if use driver; then - linux-mod_src_install - - insinto /etc/modprobe.d - doins "${T}"/nvidia.conf - - # used for gpu verification with binpkgs (not kept, see pkg_preinst) - insinto /usr/share/nvidia - doins supported-gpus/supported-gpus.json - fi - - emake "${NV_ARGS[@]}" -C nvidia-modprobe install - fowners :video /usr/bin/nvidia-modprobe #505092 - fperms 4710 /usr/bin/nvidia-modprobe - - if use persistenced; then - emake "${NV_ARGS[@]}" -C nvidia-persistenced install - newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced - newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced - systemd_dounit "${T}"/nvidia-persistenced.service - fi - - if use tools; then - emake "${NV_ARGS[@]}" -C nvidia-settings install - - doicon nvidia-settings/doc/nvidia-settings.png - domenu nvidia-settings/doc/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - if use static-libs; then - dolib.a nvidia-settings/src/out/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h - fi - - use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install - - # mimic nvidia-installer by reading .manifest to install files - # 0:file 1:perms 2:type 3+:subtype/arguments -:module - local m into - while IFS=' ' read -ra m; do - ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] || - [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] || - [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] || - has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue - - case ${m[2]} in - MANPAGE) - gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert - continue - ;; - GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../ - VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/ - esac - - if [[ -v paths[${m[2]}] ]]; then - into=${paths[${m[2]}]} - elif [[ ${m[2]} =~ _BINARY$ ]]; then - into=/opt/bin - elif [[ ${m[3]} == COMPAT32 ]]; then - use abi_x86_32 || continue - into=/usr/${libdir32} - elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then - into=/usr/${libdir} - else - die "No known installation path for ${m[0]}" - fi - [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/} - [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/} - - if [[ ${m[2]} =~ _SYMLINK$ ]]; then - [[ ${m[4]: -1} == / ]] && m[4]=${m[5]} - dosym ${m[4]} ${into}/${m[0]} - continue - fi - [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] && - dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest - - printf -v m[1] %o $((m[1] | 0200)) # 444->644 - insopts -m${m[1]} - insinto ${into} - doins ${m[0]} - done < .manifest || die - - # MODULE:installer non-skipped extras - : "$(systemd_get_sleepdir)" - exeinto "${_#"${EPREFIX}"}" - doexe systemd/system-sleep/nvidia - dobin systemd/nvidia-sleep.sh - systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service - - dobin nvidia-bug-report.sh - - # MODULE:powerd extras - if use amd64; then - systemd_dounit systemd/system/nvidia-powerd.service - - insinto /usr/share/dbus-1/system.d - doins nvidia-dbus.conf - fi - - # symlink non-versioned so nvidia-settings can use it even if misdetected - dosym nvidia-application-profiles-${PV}-key-documentation \ - ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation - - # don't attempt to strip firmware files (silences errors) - dostrip -x ${paths[FIRMWARE]} -} - -pkg_preinst() { - has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND= - - use driver || return - linux-mod_pkg_preinst - - # set video group id based on live system (bug #491414) - local g=$(egetent group video | cut -d: -f3) - [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" - sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die - - # try to find driver mismatches using temporary supported-gpus.json - for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do - g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \ - "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null) - if [[ ${g} ]]; then - g=$((${g##*\"}+1)) - if ver_test -ge ${g}; then - NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}" - break - fi - fi - done - rm "${ED}"/usr/share/nvidia/supported-gpus.json || die -} - -pkg_postinst() { - linux-mod_pkg_postinst - - readme.gentoo_print_elog - - if [[ -r /proc/driver/nvidia/version && - $( ${EROOT}/etc/portage/package.mask/${PN}" - else - ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask" - fi - ewarn "...then downgrade to a legacy branch if possible. For details, see:" - ewarn "https://www.nvidia.com/object/IO_32667.html" - fi - - if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then - elog - elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1" - elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered" - elog "experimental but is required for wayland." - elog - elog "If you experience issues, either disable wayland or edit nvidia.conf." - elog "Of note, may possibly cause issues with SLI and Reverse PRIME." - fi -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.105.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.105.01.ebuild new file mode 100644 index 000000000000..20366c56673d --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.105.01.ebuild @@ -0,0 +1,633 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MODULES_OPTIONAL_USE="driver" +inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ + systemd toolchain-funcs unpacker user-info + +NV_KERNEL_MAX="6.2" +NV_URI="https://download.nvidia.com/XFree86/" + +DESCRIPTION="NVIDIA Accelerated Graphics Driver" +HOMEPAGE="https://www.nvidia.com/download/index.aspx" +SRC_URI=" + amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) + arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run ) + $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \ + nvidia-{installer,modprobe,persistenced,settings,xconfig}{,}) + ${NV_URI}NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-${PV}.tar.xz" +# nvidia-installer is unused but here for GPL-2's "distribute sources" +S="${WORKDIR}" + +LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" +SLOT="0/${PV%%.*}" +KEYWORDS="-* ~amd64 ~arm64" +IUSE="+X abi_x86_32 abi_x86_64 +driver kernel-open persistenced +static-libs +tools wayland" +REQUIRED_USE="kernel-open? ( driver )" + +COMMON_DEPEND=" + acct-group/video + sys-libs/glibc + X? ( x11-libs/libpciaccess ) + persistenced? ( + acct-user/nvpd + net-libs/libtirpc:= + ) + tools? ( + >=app-accessibility/at-spi2-core-2.46:2 + dev-libs/glib:2 + dev-libs/jansson:= + media-libs/harfbuzz:= + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3[X] + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXxf86vm + x11-libs/pango + )" +RDEPEND=" + ${COMMON_DEPEND} + X? ( + media-libs/libglvnd[X,abi_x86_32(-)?] + x11-libs/libX11[abi_x86_32(-)?] + x11-libs/libXext[abi_x86_32(-)?] + ) + wayland? ( + gui-libs/egl-gbm + >=gui-libs/egl-wayland-1.1.10 + media-libs/libglvnd + )" +DEPEND=" + ${COMMON_DEPEND} + static-libs? ( + x11-libs/libX11 + x11-libs/libXext + ) + tools? ( + media-libs/libglvnd + sys-apps/dbus + x11-base/xorg-proto + x11-libs/libXrandr + x11-libs/libXv + x11-libs/libvdpau + )" +BDEPEND=" + sys-devel/m4 + virtual/pkgconfig" + +QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*" + +PATCHES=( + "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch + "${FILESDIR}"/nvidia-kernel-module-source-515.86.01-raw-ldflags.patch + "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch + "${FILESDIR}"/nvidia-settings-390.144-desktop.patch + "${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch + "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch +) + +pkg_setup() { + use driver || return + + local CONFIG_CHECK=" + PROC_FS + ~DRM_KMS_HELPER + ~SYSVIPC + ~!LOCKDEP + ~!SLUB_DEBUG_ON + ~!X86_KERNEL_IBT + !DEBUG_MUTEXES" + local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection + of drivers (no custom config), and for wayland / nvidia-drm.modeset=1. + Cannot be directly selected in the kernel's menuconfig, and may need + selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or + DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in." + local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set, be warned the modules may not load. + If run into problems, either unset or try to pass ibt=off to the kernel." + + use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 + + use kernel-open && CONFIG_CHECK+=" MMU_NOTIFIER" #843827 + local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but needed to build with USE=kernel-open. + Cannot be directly selected in the kernel's menuconfig, and may need + selection of another option that requires it such as CONFIG_KVM." + + MODULE_NAMES=" + nvidia(video:kernel) + nvidia-drm(video:kernel) + nvidia-modeset(video:kernel) + nvidia-peermem(video:kernel) + nvidia-uvm(video:kernel)" + use kernel-open && + MODULE_NAMES=${MODULE_NAMES//:kernel/:kernel-module-source:kernel-module-source/kernel-open} + + linux-mod_pkg_setup + + [[ ${MERGE_TYPE} == binary ]] && return + + # do some extra checks manually as it gets messy to handle builtin-only + # and some other conditional checks through CONFIG_CHECK + # TODO?: maybe move other custom checks here for uniformity + local warn=() + + if linux_chkconfig_builtin DRM_NOUVEAU; then + # suggest =m given keeps KMS_HELPER enabled and can serve as fallback + warn+=( + " CONFIG_DRM_NOUVEAU: is builtin (=y), and will prevent loading NVIDIA" + " modules (can be safely kept as a module (=m) instead)." + ) + fi + + if linux_chkconfig_builtin DRM_SIMPLEDRM; then + # wrt prebuilts, Fedora is pushing =y and gentoo-kernel-bin uses its + # configs (bug #840439), but without Fedora's kernel patch to + # workaround this issue (which is unlikely to work for us anyway) + # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/228 + warn+=( + " CONFIG_DRM_SIMPLEDRM: is builtin (=y), and may conflict with NVIDIA" + " (i.e. blanks when X/wayland starts, and tty loses display)." + " For prebuilt kernels, unfortunately no known good workarounds." + ) + fi + + if ! linux_chkconfig_present FB_EFI && + ! linux_chkconfig_present FB_SIMPLE && + ! linux_chkconfig_present FB_VESA + then + # nvidia-drivers does not handle the tty (beside mode restoration) but, + # given few options are viable, try to warn if all missing + warn+=( + " CONFIG_FB_(EFI|SIMPLE|VESA): none set, but note at least one is normally" + " needed to get a display for the tty console. In most cases, it is" + " recommended to enable FB_EFI=y and disable FB_SIMPLE (can be quirky)." + " Non-EFI systems are likely to want FB_VESA=y. Users with multiple GPUs" + " or not using the tty may be able to safely ignore this warning." + ) + fi + + if kernel_is -ge 5 18 13; then + if linux_chkconfig_present FB_SIMPLE; then + warn+=( + " CONFIG_FB_SIMPLE: is set, recommended to disable and switch to FB_EFI or" + " FB_VESA as it currently may be broken with >=kernel-5.18.13 + NVIDIA:" + " https://github.com/NVIDIA/open-gpu-kernel-modules/issues/341" + " (feel free to ignore this if it works for you)" + ) + fi + + if linux_chkconfig_present SYSFB_SIMPLEFB && + { linux_chkconfig_present FB_EFI || linux_chkconfig_present FB_VESA; } + then + warn+=( + " CONFIG_SYSFB_SIMPLEFB: is set, this may prevent FB_EFI or FB_VESA" + " from providing a working tty console display (ignore if unused)." + ) + fi + fi + + (( ${#warn[@]} )) && + ewarn "Detected potential configuration issues with used kernel:${warn[*]/#/$'\n'}" + + BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' + BUILD_TARGETS="modules" + + # Try to match toolchain with kernel only for modules + # (experimental, ideally this should be handled in linux-mod.eclass) + nvidia-tc-set() { + local -n var=KERNEL_${1} + if [[ ! -v var ]]; then + read -r var < <(type -P "${@:2}") || + die "failed to find in PATH at least one of: ${*:2}" + einfo "Forcing '${var}' for modules (set ${!var} to override)" + fi + } + + local tool switch + if linux_chkconfig_present CC_IS_GCC; then + if ! tc-is-gcc; then + switch= + nvidia-tc-set CC {${CHOST}-,}gcc + nvidia-tc-set CXX {${CHOST}-,}g++ # needed by kernel-open + fi + elif linux_chkconfig_present CC_IS_CLANG; then + ewarn "Warning: using ${PN} with a clang-built kernel is largely untested" + if ! tc-is-clang; then + switch=llvm- + nvidia-tc-set CC {${CHOST}-,}clang + nvidia-tc-set CXX {${CHOST}-,}clang++ + fi + fi + + if linux_chkconfig_present LD_IS_BFD; then + # tc-ld-is-bfd needs https://github.com/gentoo/gentoo/pull/28355 + [[ $(LC_ALL=C $(tc-getLD) --version 2>/dev/null) == "GNU ld"* ]] || + nvidia-tc-set LD {${CHOST}-,}{ld.bfd,ld} + elif linux_chkconfig_present LD_IS_LLD; then + tc-ld-is-lld || nvidia-tc-set LD {${CHOST}-,}{ld.lld,lld} + fi + + if [[ -v switch ]]; then + # only need llvm-nm for lto, but use complete set to be safe + for tool in AR NM OBJCOPY OBJDUMP READELF STRIP; do + case $(LC_ALL=C $(tc-get${tool}) --version 2>/dev/null) in + LLVM*|llvm*) [[ ! ${switch} ]];; + *) [[ ${switch} ]];; + esac && nvidia-tc-set ${tool} {${CHOST}-,}${switch}${tool,,} + done + fi + + # pass unconditionally given exports are semi-ignored except CC/LD + for tool in CC CXX LD AR NM OBJCOPY OBJDUMP READELF STRIP; do + BUILD_PARAMS+=" ${tool}=\"\${KERNEL_${tool}:-\$(tc-get${tool})}\"" + done + + if linux_chkconfig_present LTO_CLANG_THIN; then + # kernel enables cache by default leading to sandbox violations + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' + fi + + if kernel_is -gt ${NV_KERNEL_MAX/./ }; then + ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}" + ewarn "or was not tested with it. It is recommended to use one of:" + ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x" + ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x" + ewarn "You are free to try or use /etc/portage/patches, but support will" + ewarn "not be given and issues wait until NVIDIA releases a fixed version" + ewarn "(Gentoo will not accept patches for this)." + ewarn + ewarn "Do _not_ file a bug report if run into issues." + ewarn + fi +} + +src_prepare() { + # make patches usable across versions + rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die + rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die + rm nvidia-settings && mv nvidia-settings{-${PV},} || die + rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die + mv NVIDIA-kernel-module-source-${PV} kernel-module-source || die + + eapply --directory=kernel-module-source/kernel-open \ + -p2 "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch + + default + + # prevent detection of incomplete kernel DRM support (bug #603818) + sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \ + -i kernel{,-module-source/kernel-open}/conftest.sh || die + + # adjust service files + sed 's/__USER__/nvpd/' \ + nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ + > "${T}"/nvidia-persistenced.service || die + use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + + # enable nvidia-drm.modeset=1 by default with USE=wayland + cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die + use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die + + # makefile attempts to install wayland library even if not built + use wayland || sed -i 's/ WAYLAND_LIB_install$//' \ + nvidia-settings/src/Makefile || die + + # temporary option, nvidia will remove in the future + use !kernel-open || + sed -i '/blacklist/a\ +\ +# Enable using kernel-open with workstation GPUs (experimental)\ +options nvidia NVreg_OpenRmEnableUnsupportedGpus=1' "${T}"/nvidia.conf || die +} + +src_compile() { + tc-export AR CC CXX LD OBJCOPY OBJDUMP + local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch + + local xnvflags=-fPIC #840389 + # lto static libraries tend to cause problems without fat objects + is-flagq '-flto@(|=*)' && xnvflags+=" $(test-flags-CC -ffat-lto-objects)" + + NV_ARGS=( + PREFIX="${EPREFIX}"/usr + HOST_CC="$(tc-getBUILD_CC)" + HOST_LD="$(tc-getBUILD_LD)" + NV_USE_BUNDLED_LIBJANSSON=0 + NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out + WAYLAND_AVAILABLE=$(usex wayland 1 0) + XNVCTRL_CFLAGS="${xnvflags}" + ) + + if use driver; then + if linux_chkconfig_present GCC_PLUGINS; then + mkdir "${T}"/plugin-test || die + echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die + :> "${T}"/plugin-test/test.c || die + if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \ + HOSTCC="$(tc-getBUILD_CC)" CC="${CC}" M="${T}"/plugin-test 2>&1) \ + =~ "error: incompatible gcc/plugin version" ]] + then + eerror "Detected kernel was built with a different gcc/plugin version," + eerror "Please 'make clean' and rebuild your kernel with the current" + eerror "gcc (or re-emerge for distribution kernels, including kernel-bin)." + die "kernel ${KV_FULL} needs to be rebuilt" + fi + fi + + local o_cflags=${CFLAGS} o_cxxflags=${CXXFLAGS} o_ldflags=${LDFLAGS} + if use kernel-open; then + # building the nvidia "blob" fails with lto, and also need + # to strip in case of a different toolchain for the kernel + filter-lto + strip-unsupported-flags + fi + linux-mod_src_compile + CFLAGS=${o_cflags} CXXFLAGS=${o_cxxflags} LDFLAGS=${o_ldflags} + fi + + emake "${NV_ARGS[@]}" -C nvidia-modprobe + use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced + use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig + + if use tools; then + # cflags: avoid noisy logs, only use here and set first to let override + CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \ + emake "${NV_ARGS[@]}" -C nvidia-settings + elif use static-libs; then + emake "${NV_ARGS[@]}" -C nvidia-settings/src out/libXNVCtrl.a + fi +} + +src_install() { + local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir) + + NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} ) + + local -A paths=( + [APPLICATION_PROFILE]=/usr/share/nvidia + [CUDA_ICD]=/etc/OpenCL/vendors + [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d + [FIRMWARE]=/lib/firmware/nvidia/${PV} + [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm + [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d + [VULKAN_ICD_JSON]=/usr/share/vulkan + [WINE_LIB]=/usr/${libdir}/nvidia/wine + [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d + + [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions + [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules + [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules + ) + + local skip_files=( + # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia + $(usev !X " + libGLX_nvidia libglxserver_nvidia + nvidia_icd.json nvidia_layers.json") + $(usev !wayland libnvidia-vulkan-producer) + libGLX_indirect # non-glvnd unused fallback + libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from source + libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm + libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland + ) + local skip_modules=( + $(usev !X "nvfbc vdpau xdriver") + $(usev !driver gsp) + installer nvpd # handled separately / built from source + ) + local skip_types=( + GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd + OPENCL_WRAPPER.\* # virtual/opencl + DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused + ) + + local DOCS=( + README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json + nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt + ) + local HTML_DOCS=( html/. ) + einstalldocs + + local DISABLE_AUTOFORMATTING=yes + local DOC_CONTENTS="\ +Trusted users should be in the 'video' group to use NVIDIA devices. +You can add yourself by using: gpasswd -a my-user video\ +$(usev driver " + +Like all out-of-tree kernel modules, it is necessary to rebuild +${PN} after upgrading or rebuilding the Linux kernel +by for example running \`emerge @module-rebuild\`. Alternatively, +if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}), +this can be automated by setting USE=dist-kernel globally. + +Loaded kernel modules also must not mismatch with the installed +${PN} version (excluding -r revision), meaning should +ensure \`eselect kernel list\` points to the kernel that will be +booted before building and preferably reboot after upgrading +${PN} (the ebuild will emit a warning if mismatching). + +See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\ +$(use amd64 && usev !abi_x86_32 " + +Note that without USE=abi_x86_32 on ${PN}, 32bit applications +(typically using wine / steam) will not be able to use GPU acceleration.") + +For general information on using ${PN}, please see: +https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" + readme.gentoo_create_doc + + if use driver; then + linux-mod_src_install + + insinto /etc/modprobe.d + doins "${T}"/nvidia.conf + + # used for gpu verification with binpkgs (not kept, see pkg_preinst) + insinto /usr/share/nvidia + doins supported-gpus/supported-gpus.json + fi + + emake "${NV_ARGS[@]}" -C nvidia-modprobe install + fowners :video /usr/bin/nvidia-modprobe #505092 + fperms 4710 /usr/bin/nvidia-modprobe + + if use persistenced; then + emake "${NV_ARGS[@]}" -C nvidia-persistenced install + newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced + newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced + systemd_dounit "${T}"/nvidia-persistenced.service + fi + + if use tools; then + emake "${NV_ARGS[@]}" -C nvidia-settings install + + doicon nvidia-settings/doc/nvidia-settings.png + domenu nvidia-settings/doc/nvidia-settings.desktop + + exeinto /etc/X11/xinit/xinitrc.d + newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings + fi + + if use static-libs; then + dolib.a nvidia-settings/src/out/libXNVCtrl.a + + insinto /usr/include/NVCtrl + doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h + fi + + use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install + + # mimic nvidia-installer by reading .manifest to install files + # 0:file 1:perms 2:type 3+:subtype/arguments -:module + local m into + while IFS=' ' read -ra m; do + ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] || + [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] || + [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] || + has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue + + case ${m[2]} in + MANPAGE) + gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert + continue + ;; + GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../ + VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/ + esac + + if [[ -v paths[${m[2]}] ]]; then + into=${paths[${m[2]}]} + elif [[ ${m[2]} =~ _BINARY$ ]]; then + into=/opt/bin + elif [[ ${m[3]} == COMPAT32 ]]; then + use abi_x86_32 || continue + into=/usr/${libdir32} + elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then + into=/usr/${libdir} + else + die "No known installation path for ${m[0]}" + fi + [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/} + [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/} + + if [[ ${m[2]} =~ _SYMLINK$ ]]; then + [[ ${m[4]: -1} == / ]] && m[4]=${m[5]} + dosym ${m[4]} ${into}/${m[0]} + continue + fi + [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] && + dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest + + printf -v m[1] %o $((m[1] | 0200)) # 444->644 + insopts -m${m[1]} + insinto ${into} + doins ${m[0]} + done < .manifest || die + + # MODULE:installer non-skipped extras + : "$(systemd_get_sleepdir)" + exeinto "${_#"${EPREFIX}"}" + doexe systemd/system-sleep/nvidia + dobin systemd/nvidia-sleep.sh + systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service + + dobin nvidia-bug-report.sh + + # MODULE:powerd extras + if use amd64; then + systemd_dounit systemd/system/nvidia-powerd.service + + insinto /usr/share/dbus-1/system.d + doins nvidia-dbus.conf + fi + + # symlink non-versioned so nvidia-settings can use it even if misdetected + dosym nvidia-application-profiles-${PV}-key-documentation \ + ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation + + # don't attempt to strip firmware files (silences errors) + dostrip -x ${paths[FIRMWARE]} +} + +pkg_preinst() { + has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND= + + use driver || return + linux-mod_pkg_preinst + + # set video group id based on live system (bug #491414) + local g=$(egetent group video | cut -d: -f3) + [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" + sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die + + # try to find driver mismatches using temporary supported-gpus.json + for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do + g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \ + "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null) + if [[ ${g} ]]; then + g=$((${g##*\"}+1)) + if ver_test -ge ${g}; then + NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}" + break + fi + fi + done + rm "${ED}"/usr/share/nvidia/supported-gpus.json || die +} + +pkg_postinst() { + linux-mod_pkg_postinst + + readme.gentoo_print_elog + + if [[ -r /proc/driver/nvidia/version && + $( ${EROOT}/etc/portage/package.mask/${PN}" + else + ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask" + fi + ewarn "...then downgrade to a legacy branch if possible. For details, see:" + ewarn "https://www.nvidia.com/object/IO_32667.html" + fi + + if use kernel-open; then + ewarn + ewarn "Open source variant of ${PN} was selected, be warned it is experimental" + ewarn "and only usable with Turing / Ampere and later GPUs, aka GTX 1650+." + ewarn "Please also see: ${EROOT}/usr/share/doc/${PF}/html/kernel_open.html" + ewarn + ewarn "Many features are not yet implemented in the drivers and limitations are" + ewarn "to be expected. Please do not report non-build/packaging bugs to Gentoo." + ewarn "Switch back to USE=-kernel-open to restore functionality if needed for now." + fi + + if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then + elog + elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1" + elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered" + elog "experimental but is required for wayland." + elog + elog "If you experience issues, either disable wayland or edit nvidia.conf." + elog "Of note, may possibly cause issues with SLI and Reverse PRIME." + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17.ebuild new file mode 100644 index 000000000000..3e4ece75b0fa --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17.ebuild @@ -0,0 +1,631 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MODULES_OPTIONAL_USE="driver" +inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ + systemd toolchain-funcs unpacker user-info + +NV_KERNEL_MAX="6.2" +NV_URI="https://download.nvidia.com/XFree86/" + +DESCRIPTION="NVIDIA Accelerated Graphics Driver" +HOMEPAGE="https://www.nvidia.com/download/index.aspx" +SRC_URI=" + amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) + arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run ) + $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \ + nvidia-{installer,modprobe,persistenced,settings,xconfig}{,}) + ${NV_URI}NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-${PV}.tar.xz" +# nvidia-installer is unused but here for GPL-2's "distribute sources" +S="${WORKDIR}" + +LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" +SLOT="0/${PV%%.*}" +KEYWORDS="-* ~amd64 ~arm64" +IUSE="+X abi_x86_32 abi_x86_64 +driver kernel-open persistenced +static-libs +tools wayland" +REQUIRED_USE="kernel-open? ( driver )" + +COMMON_DEPEND=" + acct-group/video + sys-libs/glibc + X? ( x11-libs/libpciaccess ) + persistenced? ( + acct-user/nvpd + net-libs/libtirpc:= + ) + tools? ( + >=app-accessibility/at-spi2-core-2.46:2 + dev-libs/glib:2 + dev-libs/jansson:= + media-libs/harfbuzz:= + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3[X] + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXxf86vm + x11-libs/pango + )" +RDEPEND=" + ${COMMON_DEPEND} + X? ( + media-libs/libglvnd[X,abi_x86_32(-)?] + x11-libs/libX11[abi_x86_32(-)?] + x11-libs/libXext[abi_x86_32(-)?] + ) + wayland? ( + gui-libs/egl-gbm + >=gui-libs/egl-wayland-1.1.10 + media-libs/libglvnd + )" +DEPEND=" + ${COMMON_DEPEND} + static-libs? ( + x11-libs/libX11 + x11-libs/libXext + ) + tools? ( + media-libs/libglvnd + sys-apps/dbus + x11-base/xorg-proto + x11-libs/libXrandr + x11-libs/libXv + x11-libs/libvdpau + )" +BDEPEND=" + sys-devel/m4 + virtual/pkgconfig" + +QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*" + +PATCHES=( + "${FILESDIR}"/nvidia-kernel-module-source-515.86.01-raw-ldflags.patch + "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch + "${FILESDIR}"/nvidia-settings-390.144-desktop.patch + "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch +) + +pkg_setup() { + use driver || return + + local CONFIG_CHECK=" + PROC_FS + ~DRM_KMS_HELPER + ~SYSVIPC + ~!LOCKDEP + ~!SLUB_DEBUG_ON + ~!X86_KERNEL_IBT + !DEBUG_MUTEXES" + local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection + of drivers (no custom config), and for wayland / nvidia-drm.modeset=1. + Cannot be directly selected in the kernel's menuconfig, and may need + selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or + DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in." + local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set, be warned the modules may not load. + If run into problems, either unset or try to pass ibt=off to the kernel." + + use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 + + use kernel-open && CONFIG_CHECK+=" MMU_NOTIFIER" #843827 + local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but needed to build with USE=kernel-open. + Cannot be directly selected in the kernel's menuconfig, and may need + selection of another option that requires it such as CONFIG_KVM." + + MODULE_NAMES=" + nvidia(video:kernel) + nvidia-drm(video:kernel) + nvidia-modeset(video:kernel) + nvidia-peermem(video:kernel) + nvidia-uvm(video:kernel)" + use kernel-open && + MODULE_NAMES=${MODULE_NAMES//:kernel/:kernel-module-source:kernel-module-source/kernel-open} + + linux-mod_pkg_setup + + [[ ${MERGE_TYPE} == binary ]] && return + + # do some extra checks manually as it gets messy to handle builtin-only + # and some other conditional checks through CONFIG_CHECK + # TODO?: maybe move other custom checks here for uniformity + local warn=() + + if linux_chkconfig_builtin DRM_NOUVEAU; then + # suggest =m given keeps KMS_HELPER enabled and can serve as fallback + warn+=( + " CONFIG_DRM_NOUVEAU: is builtin (=y), and will prevent loading NVIDIA" + " modules (can be safely kept as a module (=m) instead)." + ) + fi + + if linux_chkconfig_builtin DRM_SIMPLEDRM; then + # wrt prebuilts, Fedora is pushing =y and gentoo-kernel-bin uses its + # configs (bug #840439), but without Fedora's kernel patch to + # workaround this issue (which is unlikely to work for us anyway) + # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/228 + warn+=( + " CONFIG_DRM_SIMPLEDRM: is builtin (=y), and may conflict with NVIDIA" + " (i.e. blanks when X/wayland starts, and tty loses display)." + " For prebuilt kernels, unfortunately no known good workarounds." + ) + fi + + if ! linux_chkconfig_present FB_EFI && + ! linux_chkconfig_present FB_SIMPLE && + ! linux_chkconfig_present FB_VESA + then + # nvidia-drivers does not handle the tty (beside mode restoration) but, + # given few options are viable, try to warn if all missing + warn+=( + " CONFIG_FB_(EFI|SIMPLE|VESA): none set, but note at least one is normally" + " needed to get a display for the tty console. In most cases, it is" + " recommended to enable FB_EFI=y and disable FB_SIMPLE (can be quirky)." + " Non-EFI systems are likely to want FB_VESA=y. Users with multiple GPUs" + " or not using the tty may be able to safely ignore this warning." + ) + fi + + if kernel_is -ge 5 18 13; then + if linux_chkconfig_present FB_SIMPLE; then + warn+=( + " CONFIG_FB_SIMPLE: is set, recommended to disable and switch to FB_EFI or" + " FB_VESA as it currently may be broken with >=kernel-5.18.13 + NVIDIA:" + " https://github.com/NVIDIA/open-gpu-kernel-modules/issues/341" + " (feel free to ignore this if it works for you)" + ) + fi + + if linux_chkconfig_present SYSFB_SIMPLEFB && + { linux_chkconfig_present FB_EFI || linux_chkconfig_present FB_VESA; } + then + warn+=( + " CONFIG_SYSFB_SIMPLEFB: is set, this may prevent FB_EFI or FB_VESA" + " from providing a working tty console display (ignore if unused)." + ) + fi + fi + + (( ${#warn[@]} )) && + ewarn "Detected potential configuration issues with used kernel:${warn[*]/#/$'\n'}" + + BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' + BUILD_TARGETS="modules" + + # Try to match toolchain with kernel only for modules + # (experimental, ideally this should be handled in linux-mod.eclass) + nvidia-tc-set() { + local -n var=KERNEL_${1} + if [[ ! -v var ]]; then + read -r var < <(type -P "${@:2}") || + die "failed to find in PATH at least one of: ${*:2}" + einfo "Forcing '${var}' for modules (set ${!var} to override)" + fi + } + + local tool switch + if linux_chkconfig_present CC_IS_GCC; then + if ! tc-is-gcc; then + switch= + nvidia-tc-set CC {${CHOST}-,}gcc + nvidia-tc-set CXX {${CHOST}-,}g++ # needed by kernel-open + fi + elif linux_chkconfig_present CC_IS_CLANG; then + ewarn "Warning: using ${PN} with a clang-built kernel is largely untested" + if ! tc-is-clang; then + switch=llvm- + nvidia-tc-set CC {${CHOST}-,}clang + nvidia-tc-set CXX {${CHOST}-,}clang++ + fi + fi + + if linux_chkconfig_present LD_IS_BFD; then + # tc-ld-is-bfd needs https://github.com/gentoo/gentoo/pull/28355 + [[ $(LC_ALL=C $(tc-getLD) --version 2>/dev/null) == "GNU ld"* ]] || + nvidia-tc-set LD {${CHOST}-,}{ld.bfd,ld} + elif linux_chkconfig_present LD_IS_LLD; then + tc-ld-is-lld || nvidia-tc-set LD {${CHOST}-,}{ld.lld,lld} + fi + + if [[ -v switch ]]; then + # only need llvm-nm for lto, but use complete set to be safe + for tool in AR NM OBJCOPY OBJDUMP READELF STRIP; do + case $(LC_ALL=C $(tc-get${tool}) --version 2>/dev/null) in + LLVM*|llvm*) [[ ! ${switch} ]];; + *) [[ ${switch} ]];; + esac && nvidia-tc-set ${tool} {${CHOST}-,}${switch}${tool,,} + done + fi + + # pass unconditionally given exports are semi-ignored except CC/LD + for tool in CC CXX LD AR NM OBJCOPY OBJDUMP READELF STRIP; do + BUILD_PARAMS+=" ${tool}=\"\${KERNEL_${tool}:-\$(tc-get${tool})}\"" + done + + if linux_chkconfig_present LTO_CLANG_THIN; then + # kernel enables cache by default leading to sandbox violations + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' + fi + + if kernel_is -gt ${NV_KERNEL_MAX/./ }; then + ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}" + ewarn "or was not tested with it. It is recommended to use one of:" + ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x" + ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x" + ewarn "You are free to try or use /etc/portage/patches, but support will" + ewarn "not be given and issues wait until NVIDIA releases a fixed version" + ewarn "(Gentoo will not accept patches for this)." + ewarn + ewarn "Do _not_ file a bug report if run into issues." + ewarn + fi +} + +src_prepare() { + # make patches usable across versions + rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die + rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die + rm nvidia-settings && mv nvidia-settings{-${PV},} || die + rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die + mv NVIDIA-kernel-module-source-${PV} kernel-module-source || die + + default + + # prevent detection of incomplete kernel DRM support (bug #603818) + sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \ + -i kernel{,-module-source/kernel-open}/conftest.sh || die + + # adjust service files + sed 's/__USER__/nvpd/' \ + nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ + > "${T}"/nvidia-persistenced.service || die + use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + + # enable nvidia-drm.modeset=1 by default with USE=wayland + cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die + use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die + + # makefile attempts to install wayland library even if not built + use wayland || sed -i 's/ WAYLAND_LIB_install$//' \ + nvidia-settings/src/Makefile || die + + # temporary option, nvidia will remove in the future + use !kernel-open || + sed -i '/blacklist/a\ +\ +# Enable using kernel-open with workstation GPUs (experimental)\ +options nvidia NVreg_OpenRmEnableUnsupportedGpus=1' "${T}"/nvidia.conf || die +} + +src_compile() { + tc-export AR CC CXX LD OBJCOPY OBJDUMP + local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch + + local xnvflags=-fPIC #840389 + # lto static libraries tend to cause problems without fat objects + is-flagq '-flto@(|=*)' && xnvflags+=" $(test-flags-CC -ffat-lto-objects)" + + NV_ARGS=( + PREFIX="${EPREFIX}"/usr + HOST_CC="$(tc-getBUILD_CC)" + HOST_LD="$(tc-getBUILD_LD)" + BUILD_GTK2LIB= + NV_USE_BUNDLED_LIBJANSSON=0 + NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out + WAYLAND_AVAILABLE=$(usex wayland 1 0) + XNVCTRL_CFLAGS="${xnvflags}" + ) + + if use driver; then + if linux_chkconfig_present GCC_PLUGINS; then + mkdir "${T}"/plugin-test || die + echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die + :> "${T}"/plugin-test/test.c || die + if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \ + HOSTCC="$(tc-getBUILD_CC)" CC="${CC}" M="${T}"/plugin-test 2>&1) \ + =~ "error: incompatible gcc/plugin version" ]] + then + eerror "Detected kernel was built with a different gcc/plugin version," + eerror "Please 'make clean' and rebuild your kernel with the current" + eerror "gcc (or re-emerge for distribution kernels, including kernel-bin)." + die "kernel ${KV_FULL} needs to be rebuilt" + fi + fi + + local o_cflags=${CFLAGS} o_cxxflags=${CXXFLAGS} o_ldflags=${LDFLAGS} + if use kernel-open; then + # building the nvidia "blob" fails with lto, and also need + # to strip in case of a different toolchain for the kernel + filter-lto + strip-unsupported-flags + fi + linux-mod_src_compile + CFLAGS=${o_cflags} CXXFLAGS=${o_cxxflags} LDFLAGS=${o_ldflags} + fi + + emake "${NV_ARGS[@]}" -C nvidia-modprobe + use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced + use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig + + if use tools; then + # cflags: avoid noisy logs, only use here and set first to let override + CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \ + emake "${NV_ARGS[@]}" -C nvidia-settings + elif use static-libs; then + # pretend GTK+3 is available, not actually used (bug #880879) + emake "${NV_ARGS[@]}" BUILD_GTK3LIB=1 \ + -C nvidia-settings/src out/libXNVCtrl.a + fi +} + +src_install() { + local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir) + + NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} ) + + local -A paths=( + [APPLICATION_PROFILE]=/usr/share/nvidia + [CUDA_ICD]=/etc/OpenCL/vendors + [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d + [FIRMWARE]=/lib/firmware/nvidia/${PV} + [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm + [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d + [VULKAN_ICD_JSON]=/usr/share/vulkan + [WINE_LIB]=/usr/${libdir}/nvidia/wine + [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d + + [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions + [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules + [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules + ) + + local skip_files=( + # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia + $(usev !X " + libGLX_nvidia libglxserver_nvidia + nvidia_icd.json nvidia_layers.json") + $(usev !wayland libnvidia-vulkan-producer) + libGLX_indirect # non-glvnd unused fallback + libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from source + libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm + libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland + ) + local skip_modules=( + $(usev !X "nvfbc vdpau xdriver") + $(usev !driver gsp) + installer nvpd # handled separately / built from source + ) + local skip_types=( + GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd + OPENCL_WRAPPER.\* # virtual/opencl + DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused + ) + + local DOCS=( + README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json + nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt + ) + local HTML_DOCS=( html/. ) + einstalldocs + + local DISABLE_AUTOFORMATTING=yes + local DOC_CONTENTS="\ +Trusted users should be in the 'video' group to use NVIDIA devices. +You can add yourself by using: gpasswd -a my-user video\ +$(usev driver " + +Like all out-of-tree kernel modules, it is necessary to rebuild +${PN} after upgrading or rebuilding the Linux kernel +by for example running \`emerge @module-rebuild\`. Alternatively, +if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}), +this can be automated by setting USE=dist-kernel globally. + +Loaded kernel modules also must not mismatch with the installed +${PN} version (excluding -r revision), meaning should +ensure \`eselect kernel list\` points to the kernel that will be +booted before building and preferably reboot after upgrading +${PN} (the ebuild will emit a warning if mismatching). + +See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\ +$(use amd64 && usev !abi_x86_32 " + +Note that without USE=abi_x86_32 on ${PN}, 32bit applications +(typically using wine / steam) will not be able to use GPU acceleration.") + +For general information on using ${PN}, please see: +https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" + readme.gentoo_create_doc + + if use driver; then + linux-mod_src_install + + insinto /etc/modprobe.d + doins "${T}"/nvidia.conf + + # used for gpu verification with binpkgs (not kept, see pkg_preinst) + insinto /usr/share/nvidia + doins supported-gpus/supported-gpus.json + fi + + emake "${NV_ARGS[@]}" -C nvidia-modprobe install + fowners :video /usr/bin/nvidia-modprobe #505092 + fperms 4710 /usr/bin/nvidia-modprobe + + if use persistenced; then + emake "${NV_ARGS[@]}" -C nvidia-persistenced install + newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced + newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced + systemd_dounit "${T}"/nvidia-persistenced.service + fi + + if use tools; then + emake "${NV_ARGS[@]}" -C nvidia-settings install + + doicon nvidia-settings/doc/nvidia-settings.png + domenu nvidia-settings/doc/nvidia-settings.desktop + + exeinto /etc/X11/xinit/xinitrc.d + newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings + fi + + if use static-libs; then + dolib.a nvidia-settings/src/out/libXNVCtrl.a + + insinto /usr/include/NVCtrl + doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h + fi + + use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install + + # mimic nvidia-installer by reading .manifest to install files + # 0:file 1:perms 2:type 3+:subtype/arguments -:module + local m into + while IFS=' ' read -ra m; do + ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] || + [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] || + [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] || + has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue + + case ${m[2]} in + MANPAGE) + gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert + continue + ;; + GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../ + VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/ + esac + + if [[ -v paths[${m[2]}] ]]; then + into=${paths[${m[2]}]} + elif [[ ${m[2]} =~ _BINARY$ ]]; then + into=/opt/bin + elif [[ ${m[3]} == COMPAT32 ]]; then + use abi_x86_32 || continue + into=/usr/${libdir32} + elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then + into=/usr/${libdir} + else + die "No known installation path for ${m[0]}" + fi + [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/} + [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/} + + if [[ ${m[2]} =~ _SYMLINK$ ]]; then + [[ ${m[4]: -1} == / ]] && m[4]=${m[5]} + dosym ${m[4]} ${into}/${m[0]} + continue + fi + [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] && + dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest + + printf -v m[1] %o $((m[1] | 0200)) # 444->644 + insopts -m${m[1]} + insinto ${into} + doins ${m[0]} + done < .manifest || die + + # MODULE:installer non-skipped extras + : "$(systemd_get_sleepdir)" + exeinto "${_#"${EPREFIX}"}" + doexe systemd/system-sleep/nvidia + dobin systemd/nvidia-sleep.sh + systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service + + dobin nvidia-bug-report.sh + + # MODULE:powerd extras + if use amd64; then + systemd_dounit systemd/system/nvidia-powerd.service + + insinto /usr/share/dbus-1/system.d + doins nvidia-dbus.conf + fi + + # symlink non-versioned so nvidia-settings can use it even if misdetected + dosym nvidia-application-profiles-${PV}-key-documentation \ + ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation + + # don't attempt to strip firmware files (silences errors) + dostrip -x ${paths[FIRMWARE]} +} + +pkg_preinst() { + has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND= + + use driver || return + linux-mod_pkg_preinst + + # set video group id based on live system (bug #491414) + local g=$(egetent group video | cut -d: -f3) + [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" + sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die + + # try to find driver mismatches using temporary supported-gpus.json + for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do + g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \ + "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null) + if [[ ${g} ]]; then + g=$((${g##*\"}+1)) + if ver_test -ge ${g}; then + NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}" + break + fi + fi + done + rm "${ED}"/usr/share/nvidia/supported-gpus.json || die +} + +pkg_postinst() { + linux-mod_pkg_postinst + + readme.gentoo_print_elog + + if [[ -r /proc/driver/nvidia/version && + $( ${EROOT}/etc/portage/package.mask/${PN}" + else + ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask" + fi + ewarn "...then downgrade to a legacy branch if possible. For details, see:" + ewarn "https://www.nvidia.com/object/IO_32667.html" + fi + + if use kernel-open; then + ewarn + ewarn "Open source variant of ${PN} was selected, be warned it is experimental" + ewarn "and only usable with Turing / Ampere and later GPUs, aka GTX 1650+." + ewarn "Please also see: ${EROOT}/usr/share/doc/${PF}/html/kernel_open.html" + ewarn + ewarn "Many features are not yet implemented in the drivers and limitations are" + ewarn "to be expected. Please do not report non-build/packaging bugs to Gentoo." + ewarn "Switch back to USE=-kernel-open to restore functionality if needed for now." + fi + + if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then + elog + elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1" + elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered" + elog "experimental but is required for wayland." + elog + elog "If you experience issues, either disable wayland or edit nvidia.conf." + elog "Of note, may possibly cause issues with SLI and Reverse PRIME." + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-525.85.05.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-525.85.05.ebuild deleted file mode 100644 index 17ab77c86399..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-525.85.05.ebuild +++ /dev/null @@ -1,631 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -MODULES_OPTIONAL_USE="driver" -inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ - systemd toolchain-funcs unpacker user-info - -NV_KERNEL_MAX="6.2" -NV_URI="https://download.nvidia.com/XFree86/" - -DESCRIPTION="NVIDIA Accelerated Graphics Driver" -HOMEPAGE="https://www.nvidia.com/download/index.aspx" -SRC_URI=" - amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) - arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run ) - $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \ - nvidia-{installer,modprobe,persistenced,settings,xconfig}{,}) - ${NV_URI}NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-${PV}.tar.xz" -# nvidia-installer is unused but here for GPL-2's "distribute sources" -S="${WORKDIR}" - -LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" -SLOT="0/${PV%%.*}" -KEYWORDS="-* amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 +driver kernel-open persistenced +static-libs +tools wayland" -REQUIRED_USE="kernel-open? ( driver )" - -COMMON_DEPEND=" - acct-group/video - sys-libs/glibc - X? ( x11-libs/libpciaccess ) - persistenced? ( - acct-user/nvpd - net-libs/libtirpc:= - ) - tools? ( - >=app-accessibility/at-spi2-core-2.46:2 - dev-libs/glib:2 - dev-libs/jansson:= - media-libs/harfbuzz:= - x11-libs/cairo - x11-libs/gdk-pixbuf:2 - x11-libs/gtk+:3[X] - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXxf86vm - x11-libs/pango - )" -RDEPEND=" - ${COMMON_DEPEND} - X? ( - media-libs/libglvnd[X,abi_x86_32(-)?] - x11-libs/libX11[abi_x86_32(-)?] - x11-libs/libXext[abi_x86_32(-)?] - ) - wayland? ( - gui-libs/egl-gbm - >=gui-libs/egl-wayland-1.1.10 - media-libs/libglvnd - )" -DEPEND=" - ${COMMON_DEPEND} - static-libs? ( - x11-libs/libX11 - x11-libs/libXext - ) - tools? ( - media-libs/libglvnd - sys-apps/dbus - x11-base/xorg-proto - x11-libs/libXrandr - x11-libs/libXv - x11-libs/libvdpau - )" -BDEPEND=" - sys-devel/m4 - virtual/pkgconfig" - -QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*" - -PATCHES=( - "${FILESDIR}"/nvidia-kernel-module-source-515.86.01-raw-ldflags.patch - "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch - "${FILESDIR}"/nvidia-settings-390.144-desktop.patch - "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch -) - -pkg_setup() { - use driver || return - - local CONFIG_CHECK=" - PROC_FS - ~DRM_KMS_HELPER - ~SYSVIPC - ~!LOCKDEP - ~!SLUB_DEBUG_ON - ~!X86_KERNEL_IBT - !DEBUG_MUTEXES" - local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection - of drivers (no custom config), and for wayland / nvidia-drm.modeset=1. - Cannot be directly selected in the kernel's menuconfig, and may need - selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or - DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in." - local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set, be warned the modules may not load. - If run into problems, either unset or try to pass ibt=off to the kernel." - - use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 - - use kernel-open && CONFIG_CHECK+=" MMU_NOTIFIER" #843827 - local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but needed to build with USE=kernel-open. - Cannot be directly selected in the kernel's menuconfig, and may need - selection of another option that requires it such as CONFIG_KVM." - - MODULE_NAMES=" - nvidia(video:kernel) - nvidia-drm(video:kernel) - nvidia-modeset(video:kernel) - nvidia-peermem(video:kernel) - nvidia-uvm(video:kernel)" - use kernel-open && - MODULE_NAMES=${MODULE_NAMES//:kernel/:kernel-module-source:kernel-module-source/kernel-open} - - linux-mod_pkg_setup - - [[ ${MERGE_TYPE} == binary ]] && return - - # do some extra checks manually as it gets messy to handle builtin-only - # and some other conditional checks through CONFIG_CHECK - # TODO?: maybe move other custom checks here for uniformity - local warn=() - - if linux_chkconfig_builtin DRM_NOUVEAU; then - # suggest =m given keeps KMS_HELPER enabled and can serve as fallback - warn+=( - " CONFIG_DRM_NOUVEAU: is builtin (=y), and will prevent loading NVIDIA" - " modules (can be safely kept as a module (=m) instead)." - ) - fi - - if linux_chkconfig_builtin DRM_SIMPLEDRM; then - # wrt prebuilts, Fedora is pushing =y and gentoo-kernel-bin uses its - # configs (bug #840439), but without Fedora's kernel patch to - # workaround this issue (which is unlikely to work for us anyway) - # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/228 - warn+=( - " CONFIG_DRM_SIMPLEDRM: is builtin (=y), and may conflict with NVIDIA" - " (i.e. blanks when X/wayland starts, and tty loses display)." - " For prebuilt kernels, unfortunately no known good workarounds." - ) - fi - - if ! linux_chkconfig_present FB_EFI && - ! linux_chkconfig_present FB_SIMPLE && - ! linux_chkconfig_present FB_VESA - then - # nvidia-drivers does not handle the tty (beside mode restoration) but, - # given few options are viable, try to warn if all missing - warn+=( - " CONFIG_FB_(EFI|SIMPLE|VESA): none set, but note at least one is normally" - " needed to get a display for the tty console. In most cases, it is" - " recommended to enable FB_EFI=y and disable FB_SIMPLE (can be quirky)." - " Non-EFI systems are likely to want FB_VESA=y. Users with multiple GPUs" - " or not using the tty may be able to safely ignore this warning." - ) - fi - - if kernel_is -ge 5 18 13; then - if linux_chkconfig_present FB_SIMPLE; then - warn+=( - " CONFIG_FB_SIMPLE: is set, recommended to disable and switch to FB_EFI or" - " FB_VESA as it currently may be broken with >=kernel-5.18.13 + NVIDIA:" - " https://github.com/NVIDIA/open-gpu-kernel-modules/issues/341" - " (feel free to ignore this if it works for you)" - ) - fi - - if linux_chkconfig_present SYSFB_SIMPLEFB && - { linux_chkconfig_present FB_EFI || linux_chkconfig_present FB_VESA; } - then - warn+=( - " CONFIG_SYSFB_SIMPLEFB: is set, this may prevent FB_EFI or FB_VESA" - " from providing a working tty console display (ignore if unused)." - ) - fi - fi - - (( ${#warn[@]} )) && - ewarn "Detected potential configuration issues with used kernel:${warn[*]/#/$'\n'}" - - BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' - BUILD_TARGETS="modules" - - # Try to match toolchain with kernel only for modules - # (experimental, ideally this should be handled in linux-mod.eclass) - nvidia-tc-set() { - local -n var=KERNEL_${1} - if [[ ! -v var ]]; then - read -r var < <(type -P "${@:2}") || - die "failed to find in PATH at least one of: ${*:2}" - einfo "Forcing '${var}' for modules (set ${!var} to override)" - fi - } - - local tool switch - if linux_chkconfig_present CC_IS_GCC; then - if ! tc-is-gcc; then - switch= - nvidia-tc-set CC {${CHOST}-,}gcc - nvidia-tc-set CXX {${CHOST}-,}g++ # needed by kernel-open - fi - elif linux_chkconfig_present CC_IS_CLANG; then - ewarn "Warning: using ${PN} with a clang-built kernel is largely untested" - if ! tc-is-clang; then - switch=llvm- - nvidia-tc-set CC {${CHOST}-,}clang - nvidia-tc-set CXX {${CHOST}-,}clang++ - fi - fi - - if linux_chkconfig_present LD_IS_BFD; then - # tc-ld-is-bfd needs https://github.com/gentoo/gentoo/pull/28355 - [[ $(LC_ALL=C $(tc-getLD) --version 2>/dev/null) == "GNU ld"* ]] || - nvidia-tc-set LD {${CHOST}-,}{ld.bfd,ld} - elif linux_chkconfig_present LD_IS_LLD; then - tc-ld-is-lld || nvidia-tc-set LD {${CHOST}-,}{ld.lld,lld} - fi - - if [[ -v switch ]]; then - # only need llvm-nm for lto, but use complete set to be safe - for tool in AR NM OBJCOPY OBJDUMP READELF STRIP; do - case $(LC_ALL=C $(tc-get${tool}) --version 2>/dev/null) in - LLVM*|llvm*) [[ ! ${switch} ]];; - *) [[ ${switch} ]];; - esac && nvidia-tc-set ${tool} {${CHOST}-,}${switch}${tool,,} - done - fi - - # pass unconditionally given exports are semi-ignored except CC/LD - for tool in CC CXX LD AR NM OBJCOPY OBJDUMP READELF STRIP; do - BUILD_PARAMS+=" ${tool}=\"\${KERNEL_${tool}:-\$(tc-get${tool})}\"" - done - - if linux_chkconfig_present LTO_CLANG_THIN; then - # kernel enables cache by default leading to sandbox violations - BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' - fi - - if kernel_is -gt ${NV_KERNEL_MAX/./ }; then - ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}" - ewarn "or was not tested with it. It is recommended to use one of:" - ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x" - ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x" - ewarn "You are free to try or use /etc/portage/patches, but support will" - ewarn "not be given and issues wait until NVIDIA releases a fixed version" - ewarn "(Gentoo will not accept patches for this)." - ewarn - ewarn "Do _not_ file a bug report if run into issues." - ewarn - fi -} - -src_prepare() { - # make patches usable across versions - rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die - rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die - rm nvidia-settings && mv nvidia-settings{-${PV},} || die - rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die - mv NVIDIA-kernel-module-source-${PV} kernel-module-source || die - - default - - # prevent detection of incomplete kernel DRM support (bug #603818) - sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \ - -i kernel{,-module-source/kernel-open}/conftest.sh || die - - # adjust service files - sed 's/__USER__/nvpd/' \ - nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ - > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die - - # enable nvidia-drm.modeset=1 by default with USE=wayland - cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die - use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die - - # makefile attempts to install wayland library even if not built - use wayland || sed -i 's/ WAYLAND_LIB_install$//' \ - nvidia-settings/src/Makefile || die - - # temporary option, nvidia will remove in the future - use !kernel-open || - sed -i '/blacklist/a\ -\ -# Enable using kernel-open with workstation GPUs (experimental)\ -options nvidia NVreg_OpenRmEnableUnsupportedGpus=1' "${T}"/nvidia.conf || die -} - -src_compile() { - tc-export AR CC CXX LD OBJCOPY OBJDUMP - local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch - - local xnvflags=-fPIC #840389 - # lto static libraries tend to cause problems without fat objects - is-flagq '-flto@(|=*)' && xnvflags+=" $(test-flags-CC -ffat-lto-objects)" - - NV_ARGS=( - PREFIX="${EPREFIX}"/usr - HOST_CC="$(tc-getBUILD_CC)" - HOST_LD="$(tc-getBUILD_LD)" - BUILD_GTK2LIB= - NV_USE_BUNDLED_LIBJANSSON=0 - NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out - WAYLAND_AVAILABLE=$(usex wayland 1 0) - XNVCTRL_CFLAGS="${xnvflags}" - ) - - if use driver; then - if linux_chkconfig_present GCC_PLUGINS; then - mkdir "${T}"/plugin-test || die - echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die - :> "${T}"/plugin-test/test.c || die - if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \ - HOSTCC="$(tc-getBUILD_CC)" CC="${CC}" M="${T}"/plugin-test 2>&1) \ - =~ "error: incompatible gcc/plugin version" ]] - then - eerror "Detected kernel was built with a different gcc/plugin version," - eerror "Please 'make clean' and rebuild your kernel with the current" - eerror "gcc (or re-emerge for distribution kernels, including kernel-bin)." - die "kernel ${KV_FULL} needs to be rebuilt" - fi - fi - - local o_cflags=${CFLAGS} o_cxxflags=${CXXFLAGS} o_ldflags=${LDFLAGS} - if use kernel-open; then - # building the nvidia "blob" fails with lto, and also need - # to strip in case of a different toolchain for the kernel - filter-lto - strip-unsupported-flags - fi - linux-mod_src_compile - CFLAGS=${o_cflags} CXXFLAGS=${o_cxxflags} LDFLAGS=${o_ldflags} - fi - - emake "${NV_ARGS[@]}" -C nvidia-modprobe - use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced - use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig - - if use tools; then - # cflags: avoid noisy logs, only use here and set first to let override - CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \ - emake "${NV_ARGS[@]}" -C nvidia-settings - elif use static-libs; then - # pretend GTK+3 is available, not actually used (bug #880879) - emake "${NV_ARGS[@]}" BUILD_GTK3LIB=1 \ - -C nvidia-settings/src out/libXNVCtrl.a - fi -} - -src_install() { - local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir) - - NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} ) - - local -A paths=( - [APPLICATION_PROFILE]=/usr/share/nvidia - [CUDA_ICD]=/etc/OpenCL/vendors - [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d - [FIRMWARE]=/lib/firmware/nvidia/${PV} - [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm - [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d - [VULKAN_ICD_JSON]=/usr/share/vulkan - [WINE_LIB]=/usr/${libdir}/nvidia/wine - [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d - - [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions - [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules - [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules - ) - - local skip_files=( - # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia - $(usev !X " - libGLX_nvidia libglxserver_nvidia - nvidia_icd.json nvidia_layers.json") - $(usev !wayland libnvidia-vulkan-producer) - libGLX_indirect # non-glvnd unused fallback - libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from source - libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm - libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland - ) - local skip_modules=( - $(usev !X "nvfbc vdpau xdriver") - $(usev !driver gsp) - installer nvpd # handled separately / built from source - ) - local skip_types=( - GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd - OPENCL_WRAPPER.\* # virtual/opencl - DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused - ) - - local DOCS=( - README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json - nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt - ) - local HTML_DOCS=( html/. ) - einstalldocs - - local DISABLE_AUTOFORMATTING=yes - local DOC_CONTENTS="\ -Trusted users should be in the 'video' group to use NVIDIA devices. -You can add yourself by using: gpasswd -a my-user video\ -$(usev driver " - -Like all out-of-tree kernel modules, it is necessary to rebuild -${PN} after upgrading or rebuilding the Linux kernel -by for example running \`emerge @module-rebuild\`. Alternatively, -if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}), -this can be automated by setting USE=dist-kernel globally. - -Loaded kernel modules also must not mismatch with the installed -${PN} version (excluding -r revision), meaning should -ensure \`eselect kernel list\` points to the kernel that will be -booted before building and preferably reboot after upgrading -${PN} (the ebuild will emit a warning if mismatching). - -See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\ -$(use amd64 && usev !abi_x86_32 " - -Note that without USE=abi_x86_32 on ${PN}, 32bit applications -(typically using wine / steam) will not be able to use GPU acceleration.") - -For general information on using ${PN}, please see: -https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" - readme.gentoo_create_doc - - if use driver; then - linux-mod_src_install - - insinto /etc/modprobe.d - doins "${T}"/nvidia.conf - - # used for gpu verification with binpkgs (not kept, see pkg_preinst) - insinto /usr/share/nvidia - doins supported-gpus/supported-gpus.json - fi - - emake "${NV_ARGS[@]}" -C nvidia-modprobe install - fowners :video /usr/bin/nvidia-modprobe #505092 - fperms 4710 /usr/bin/nvidia-modprobe - - if use persistenced; then - emake "${NV_ARGS[@]}" -C nvidia-persistenced install - newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced - newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced - systemd_dounit "${T}"/nvidia-persistenced.service - fi - - if use tools; then - emake "${NV_ARGS[@]}" -C nvidia-settings install - - doicon nvidia-settings/doc/nvidia-settings.png - domenu nvidia-settings/doc/nvidia-settings.desktop - - exeinto /etc/X11/xinit/xinitrc.d - newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings - fi - - if use static-libs; then - dolib.a nvidia-settings/src/out/libXNVCtrl.a - - insinto /usr/include/NVCtrl - doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h - fi - - use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install - - # mimic nvidia-installer by reading .manifest to install files - # 0:file 1:perms 2:type 3+:subtype/arguments -:module - local m into - while IFS=' ' read -ra m; do - ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] || - [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] || - [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] || - has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue - - case ${m[2]} in - MANPAGE) - gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert - continue - ;; - GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../ - VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/ - esac - - if [[ -v paths[${m[2]}] ]]; then - into=${paths[${m[2]}]} - elif [[ ${m[2]} =~ _BINARY$ ]]; then - into=/opt/bin - elif [[ ${m[3]} == COMPAT32 ]]; then - use abi_x86_32 || continue - into=/usr/${libdir32} - elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then - into=/usr/${libdir} - else - die "No known installation path for ${m[0]}" - fi - [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/} - [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/} - - if [[ ${m[2]} =~ _SYMLINK$ ]]; then - [[ ${m[4]: -1} == / ]] && m[4]=${m[5]} - dosym ${m[4]} ${into}/${m[0]} - continue - fi - [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] && - dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest - - printf -v m[1] %o $((m[1] | 0200)) # 444->644 - insopts -m${m[1]} - insinto ${into} - doins ${m[0]} - done < .manifest || die - - # MODULE:installer non-skipped extras - : "$(systemd_get_sleepdir)" - exeinto "${_#"${EPREFIX}"}" - doexe systemd/system-sleep/nvidia - dobin systemd/nvidia-sleep.sh - systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service - - dobin nvidia-bug-report.sh - - # MODULE:powerd extras - if use amd64; then - systemd_dounit systemd/system/nvidia-powerd.service - - insinto /usr/share/dbus-1/system.d - doins nvidia-dbus.conf - fi - - # symlink non-versioned so nvidia-settings can use it even if misdetected - dosym nvidia-application-profiles-${PV}-key-documentation \ - ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation - - # don't attempt to strip firmware files (silences errors) - dostrip -x ${paths[FIRMWARE]} -} - -pkg_preinst() { - has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND= - - use driver || return - linux-mod_pkg_preinst - - # set video group id based on live system (bug #491414) - local g=$(egetent group video | cut -d: -f3) - [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" - sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die - - # try to find driver mismatches using temporary supported-gpus.json - for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do - g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \ - "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null) - if [[ ${g} ]]; then - g=$((${g##*\"}+1)) - if ver_test -ge ${g}; then - NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}" - break - fi - fi - done - rm "${ED}"/usr/share/nvidia/supported-gpus.json || die -} - -pkg_postinst() { - linux-mod_pkg_postinst - - readme.gentoo_print_elog - - if [[ -r /proc/driver/nvidia/version && - $( ${EROOT}/etc/portage/package.mask/${PN}" - else - ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask" - fi - ewarn "...then downgrade to a legacy branch if possible. For details, see:" - ewarn "https://www.nvidia.com/object/IO_32667.html" - fi - - if use kernel-open; then - ewarn - ewarn "Open source variant of ${PN} was selected, be warned it is experimental" - ewarn "and only usable with Turing / Ampere and later GPUs, aka GTX 1650+." - ewarn "Please also see: ${EROOT}/usr/share/doc/${PF}/html/kernel_open.html" - ewarn - ewarn "Many features are not yet implemented in the drivers and limitations are" - ewarn "to be expected. Please do not report non-build/packaging bugs to Gentoo." - ewarn "Switch back to USE=-kernel-open to restore functionality if needed for now." - fi - - if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then - elog - elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1" - elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered" - elog "experimental but is required for wayland." - elog - elog "If you experience issues, either disable wayland or edit nvidia.conf." - elog "Of note, may possibly cause issues with SLI and Reverse PRIME." - fi -} -- cgit v1.2.3