commit:     05281372c092d748f353625105cbad9ffad3b172
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  2 15:38:48 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Dec  2 16:10:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05281372

x11-drivers/nvidia-drivers: add 590.44.01 (beta, unkeyworded)

Runtime entirely untested given I do not have hardware that can use use
this version (drops support for Pascal/Maxwell/Volta cards).

Also has a few notable changes:

1. kernel-open is now forced (USE removed)
2. modeset=1 is default even with USE=-wayland
3. fbdev=1 is also default
4. now depends on both egl-waylands (.run ships both 1 and 2),
   most users will only need one of them but no real way to tell
   if it'll use 2 or fallback to 1 depending on setup

If believe there is a packaging issue leading to runtime problems,
help is appreciated to pinpoint the issue given I cannot test it.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 x11-drivers/nvidia-drivers/Manifest                |   8 +
 x11-drivers/nvidia-drivers/files/nvidia-590.conf   |  41 ++
 .../nvidia-drivers/nvidia-drivers-590.44.01.ebuild | 566 +++++++++++++++++++++
 3 files changed, 615 insertions(+)

diff --git a/x11-drivers/nvidia-drivers/Manifest 
b/x11-drivers/nvidia-drivers/Manifest
index ed8f4916ef3d..9cc27effc0ac 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -2,6 +2,7 @@ DIST NVIDIA-Linux-aarch64-535.274.02.run 269962412 BLAKE2B 
e4026c6ebf72ce7220a4d
 DIST NVIDIA-Linux-aarch64-570.195.03.run 293703412 BLAKE2B 
7c843496a403fa3a2eed2b40c9734a6061ad3db3d2de768f70ed1020ad61388fd23a67517efdaa70ba37ad5e97906b8157fea664f46847a096ddd576343ec402
 SHA512 
4ed4c4863dce0ec53a9fa1a7e3cdc7ce3e915db4ec014b2c5030e8a6c961d4e58c99c42b6c6b17020d8c31acf95e14254bca446c2a56ce29b10067730910e2a0
 DIST NVIDIA-Linux-aarch64-570.207.run 290858757 BLAKE2B 
d04bfc5457ba3e2cf7e6bebf333c9085c83f1e437880d3a34ffa53e3ae094119875738893b4cccdb83d7699373c83d7d71182815a77ddd2834db9990eda28864
 SHA512 
90aac68738872349ead074e158193d847256b0a2f4d850e16a03aa165041aeb5d86413a6e3879253c90e4d96b3d624b839924a6f4f666e18903621154bdab305
 DIST NVIDIA-Linux-aarch64-580.95.05.run 313379170 BLAKE2B 
70431f394ce9d112afcf0742539289e399286ecefbdd86ad71c750acee21c3b965b435d77d54b290866a6c60c7601da5c8bbc2d6edce0b8e4dcd43d21ee2ec35
 SHA512 
e07b31824f7e6dd485df5c73e3a58f85962239ea20a92f18d82b9c55564d69309fe5bb279f39ed8ef152ccdbffc6d0fdf7bccfa3c794e4ecd9fac83bcfbb91a9
+DIST NVIDIA-Linux-aarch64-590.44.01.run 319562942 BLAKE2B 
08547c7e4b746ab72f04b2b9f9fdeaade5057deb46d12c9a914e3e6c131a3b13a74a7713dfd6177e5a648f87f00935349f92814c101004bea3090602813a391b
 SHA512 
95849eaba6761ba5e7435d8cb4d9f72b55e6b9e8d90b90be517f64b5d0fc329cffd80489b558c224370b869a11be13eb96ebb481a113b64b8bb24c48348f0657
 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.256.02.run 272850014 BLAKE2B 
0fdc867f92b82b2a60810c3b43751cad7ac2c39928c92c6c343c0c6044f4d7d923d93b8599db3f7c999c0ee7d16940e65d991a61cbb30e1d9e49c5639ac6bdc8
 SHA512 
a837946dd24d7945c1962a695f1f31965f3ceb6927f52cd08fd51b8db138b7a888bbeab69243f5c8468a7bd7ccd47f5dbdb48a1ca81264866c1ebb7d88628f88
@@ -11,11 +12,13 @@ DIST NVIDIA-Linux-x86_64-570.207.run 376235013 BLAKE2B 
76d2092705673d743f2e64136
 DIST NVIDIA-Linux-x86_64-580.105.08.run 396635119 BLAKE2B 
9e5d9353c2cd8bb5bebf7244eef45e50f8c1c56f1da1e44054a281f3293a03d74c409f544e9fa98ccb05936f6c384495ceabd153e5c7a380939ba83b6b901e2b
 SHA512 
4aa4e456801507d161fbefc66338a0289e2fc1e501bb17772adca721f02772b2ad7e2ac1b7da7aafc2496c96a64de9f057df7c5b562056c18805589c411b5837
 DIST NVIDIA-Linux-x86_64-580.94.11.run 398175670 BLAKE2B 
77a4bfb1d1bfb31f7051a21373a5f5a98d31d741af4632256f08914b5c7289ae4f17d5b4569a46e8d0623ca5a22611bd67fb1c608634534b25d7b772fc85e395
 SHA512 
6251ec2f9921b392c7a0428b56f35dcaf787c0efd12d2201ce20fd3b41701674c3fd36efb14f7ddf6653b762f1973857b33eb093305546ab2bd8de29ce7bd92f
 DIST NVIDIA-Linux-x86_64-580.95.05.run 396658958 BLAKE2B 
7e23e5243023de357329f8f57b65a386306fd898a78c68b01d67a9572ac0d64b2d87c0cf3265c23fc4c13192d92060196ee173c34cb485a693035478cb3fc82e
 SHA512 
21e8076f593ce255c8e96dd456524f700e76b230130659ed73a279432dd9f2aa60735411c6fc906e9f60882e905cc1c5b91aaf80d5d5e64d317b1dd27f6e4c13
+DIST NVIDIA-Linux-x86_64-590.44.01.run 416205886 BLAKE2B 
b8a4f02ce1b3697f45d5932606a8d9816e8dd38e4957b0d069f9759cacffb42fb741084009c012017e92a785fe9ff3810d7fd420f832873a2c890c7e29d5acd5
 SHA512 
8fb0cd0b09b3b997029e97314fb8b4f63a5b567c17d99b63321e72b3e002c5e912694c5049babae80e7eafdbcc966d46e50bb942ddefe3e9da28623b5b119005
 DIST NVIDIA-kernel-module-source-535.274.02.tar.xz 12513068 BLAKE2B 
e9f9fbdc70ee634dd26d626b0d5252e01c748fa8fc5b50af02a18f0dc75e2a40ced2fbaf24c4389dd207936849f6d614f18ef06ed35111ed26f3f6fce9017592
 SHA512 
4a660e08c03840de0b8d5bee079ff203a864131ed3eb4805e80da6c071b6953a6acee6d81788c4ea076399db6270e34844d5ac3898914195f530d2e0ef1c96ab
 DIST NVIDIA-kernel-module-source-570.195.03.tar.xz 17937740 BLAKE2B 
b6610c713740b55da783f5954ed537b74c8e42152a24f4063288f04c00d863e06d524b5eded1c13fe561138f46248824fbab3c631829a476061026e70484f55d
 SHA512 
09fe04c6746f2cf942f5d861153dfbf4aa83640e60dfb8911b90ba6d9ccdbe2214be010c67b674b04da731e2e8847c56fa17ba8fa9ad91a0d95d64b9b54d566d
 DIST NVIDIA-kernel-module-source-570.207.tar.xz 17948940 BLAKE2B 
7573f8f3083564038649e0a7fe0feb1cec313a1950b06200198e0802b7f3553212cea2100f563659f425c139eefaf976bea388886180be895e12f7631ac86b0c
 SHA512 
de2306aa80ce057965a2d2d7570035feaef4016a6d9e37f7ffb9f19ddf6e892ab8eda14bfc893122c6f2321e406272b7cffc84a053321650c29d3a25d359c6f9
 DIST NVIDIA-kernel-module-source-580.105.08.tar.xz 22220800 BLAKE2B 
08b14615b1bec277295a21ee917ea7cea0a86621ccb0783f96074462e4bbadac6ee62ef1f27f53c4975ebc61b9b683edcef415610528baf3ea1faa74ba6a746d
 SHA512 
a36ebe0ffd4f3fc6320f60be2b94b04bb8c2ce7c14faca791aca0d1b7973b282f64a02197b6f01f263d6a836aafc83261018bfdef32ba7e7c313f850fef4fc67
 DIST NVIDIA-kernel-module-source-580.95.05.tar.xz 22215620 BLAKE2B 
179e2e1f820840273e54b55cd45233c6b5e26c1eb80e8e4fc7099a1704820cfe761c17839befcb9ddca2fe7e85b7ddf62e9a51b912e1f300b02ee8941d6467db
 SHA512 
183e35afc583748f5d5fc60970be7e1e0b99de40bf0e9428d3acfd56f913724cc8aa242a276c327ad11e09290818883c8045ab3319dc0e919201687359f7cdc6
+DIST NVIDIA-kernel-module-source-590.44.01.tar.xz 22515256 BLAKE2B 
a71a59a6c5abbc5011164444f95730b8d96b1025b3d685ea69720a3afa658baeb0f4a6d9d8180d79b76cfb9e972f47c9525dd61e86322a820d17ba6a2eececc1
 SHA512 
a63f48f1f3a52d973597f6f261e8d9849165a33d561b5e70b6b84bbec3b3a66029a49a1e710f68c70b853104349ab1f583009c8885b4d259be115da6e9ba36ad
 DIST nvidia-installer-390.157.tar.bz2 150323 BLAKE2B 
8058ca87a6dea956d564af9f7eab9b1fc82b1f2382bd5cb2f6d97cbe2e19292533522d5f8f2eacbeb16520372715fcb72f8f9b0998962af5d4e75522c8d74524
 SHA512 
93a7ece648602157496c8e27a88864ede341a100f5328a4c1a25faf8f0b94d252060e5e2f71d0c302fd0566c10773c30b76b3b5f431d8039b71c90a7969f7d7e
 DIST nvidia-installer-470.256.02.tar.bz2 146269 BLAKE2B 
4402e725c8fd0157eb84d4ec140a33f97e873014577487ef1e32fb8921cabe79c60ff46532e5bfaabb2b6ac894f7c80086dbab19e61906e2e27346fb85f98829
 SHA512 
c962dc17d9696256d1ebedcaeb3010994f2ce3895aedc47987599ebfec132a9b9a249d2ece6502b15bd4a93f9b0106aa13487a7da5f64199c274ce11eba27cfd
 DIST nvidia-installer-535.274.02.tar.bz2 148772 BLAKE2B 
7a70926628e137a0687acdc613a3afcd9fafab300e6c3ab467f9fef65c66911795a326cd08d49190870939576f358760b44949ba20df6060936f98e1385a2435
 SHA512 
c2a61bb9637d7fe9de89d7e3945fe84c6f672c8f16c4c12d513ba0b0679146321f4565be1266fcd5145ed7a0610cb59ae9f6fd7f7cf565f24e028272688899ee
@@ -23,6 +26,7 @@ DIST nvidia-installer-570.195.03.tar.bz2 169609 BLAKE2B 
5b40805276f6da3653e16cc7
 DIST nvidia-installer-570.207.tar.bz2 169253 BLAKE2B 
1364655663682923df7504e76ddf157f4c5368442e6e21541ed12c54c1c35ce97370307a751a72a3d2fb2dd878852106392ef5e8dcdaf5f2a42d29e26ad60077
 SHA512 
253f15603e4ad27be655fb945cd60180fe9272e394cf587227c95f1648f8c0ec91973e6a603135d82976c8a650adef7003a7e4fe8372f6df88c4b512a29832dc
 DIST nvidia-installer-580.105.08.tar.bz2 169226 BLAKE2B 
f1959092677255b6ebba50597afff2b8878288e548681a51c280336535996eeaa0470b107cba30a10b4db27989c97475d2abffcd4681bdfa9c74121b9ddfbb09
 SHA512 
f1f045df8f527ced9f448fa807b7c54ce771e7e15431a8b0d72832863fe02205133816d8d7cbf08be085152dc5de2e7ed2864d670e37ac870ef8994a90959823
 DIST nvidia-installer-580.95.05.tar.bz2 169558 BLAKE2B 
5e52aca8950b83b2a0366fc39dba5b89d22248ced974807f33dababfc06b41b5c40ff238552e61fec54625a6b2bceb8401ebb4fb69b47e33e565058d1796cb9e
 SHA512 
1f20838f4e20d77c9596aa886f53bc4abedfc5e5634665d3bd571fb920013b2dfdf7dcd082b0cfebdf4d104e87203965cff6a04863f9b0bd43f9e25264217578
+DIST nvidia-installer-590.44.01.tar.bz2 170890 BLAKE2B 
e6bbd5f862673217dd4359533bb3c275c3319af69b2a912e43ea5d1fbb0cde2434c0decf2330bf3ac94d78cbd21fcbda6c5cd7e1b34bb44dc6313be3257072b7
 SHA512 
558fcb1984a5a399e7b388923f43821913b523cacd8a4496c05db92362b270f6e58bdb838be7f5ebb02bd3422dd43cbff952f3ce506cf7fc0c42b5fc92d3b3f8
 DIST nvidia-modprobe-390.157.tar.bz2 35306 BLAKE2B 
80d202b39c2f95ec0f909712c2e101483af50124092c32efb33bd98ff58ddfb97b737ff07f1ddc941f688c1b4c26a15f392566d522e18506771f10422fcd571c
 SHA512 
109bbe24a3758b568ea65fe1e9d78f69fae6108ec0497b796c885a3912825fe04ffd7389a3e22987f1a10a2926bf6eaa384faabc59478aa3ee244dd3ac91c6d3
 DIST nvidia-modprobe-470.256.02.tar.bz2 38769 BLAKE2B 
0db444b09b0b6d24c04877fae95249e781d82b3141f90eb05d869b64d2b6e65ad00bf44c4e427c64dbd4765fa99a8699f80a1d95b00c66137a54dc878d7ea298
 SHA512 
c1cbfa6c8e188e5a5eb5d390b9a903406cbff103d212fc30e611e4023be3fde896ad84e8bb45b030beb5d1bcd8155c9e55a8f9636c45ce1e2a5c03f672989a31
 DIST nvidia-modprobe-535.274.02.tar.bz2 40749 BLAKE2B 
85cab6efd924d6a10a1336334ef2b3dd7005da9315518b59a865feffd889aaebfe428d142dee4cdc03eb4f77850c314abc1ba1b60083d0339c2466ed3c30b220
 SHA512 
cad7dd263ac430457fcb2a1e8659f53d436e2c46330ded165698c5b8ff0a52795edc837f724178f5c929e25aebf6c6094d14eb08e9469a17bd1673195cbc849b
@@ -30,6 +34,7 @@ DIST nvidia-modprobe-570.195.03.tar.bz2 41605 BLAKE2B 
e61623d3249911b0d0c8f6d66f
 DIST nvidia-modprobe-570.207.tar.bz2 41621 BLAKE2B 
84b84be1ace3554be45b56866ffec617e4d4c838889257fffe19fea5811414cc417b7d6e297b32f23e0c2ab092ff911b3c7d04de168c84f4c9fccbd52be69c8a
 SHA512 
d13dbefbe730a9aca3786effb5c7b361b5405b687bd17096b5815756e1c58ed265250b0faaf99da4fb29bb67c7d7da7d4d4609d2f2be03d8a9cfaa74e27cea5b
 DIST nvidia-modprobe-580.105.08.tar.bz2 41687 BLAKE2B 
3b0738cda7b3d295c278b5ce9661ad5f1475d0bc1f8c328431d2b3290782036c902f3719c2ec986053427e385ee46aedff4f04d299cba7579fa9fce470c36d6e
 SHA512 
c696f1f5b77872955cc63793f6a73025e05e1271648258a8f8a33e0a4cec2a118ba1cfccc828bba817350bb356fd8d3c3ef8e04f121911db8d3de58a86e38c5d
 DIST nvidia-modprobe-580.95.05.tar.bz2 41708 BLAKE2B 
17988280c9c54fdc86dcf757903f18f83d1eb44b25a1386f8cc9bf098aec87b77c52bd3da9ea77511716c678e4354e8a40bee1561a953ed56eda350ab4a3e464
 SHA512 
67faabda2388515fcad71ffc965c7506156116f4e020837da33b0f17bd30aa05cd2d28a54711990684110133ad1a58a8db5473f58f2e5e587bc8edf5253a9351
+DIST nvidia-modprobe-590.44.01.tar.bz2 41704 BLAKE2B 
224db886b27160e65f4b36fced5ae2b1915daf14228c1da613351cccc0669ac2dcf528bd5c10e105fe68a42bc981c44a7c6bad261e29cf286f5c52a8d4583305
 SHA512 
162b6106c6d98886f374c3351197a3239b416f678524f08e9e8490979a36df74d6c7c0a3d18c5cdb288d2492bb39d1ab43251806cb83bbd90db61d6f98e9dc00
 DIST nvidia-persistenced-390.157.tar.bz2 48654 BLAKE2B 
2cf6c92da90acff55e8c180a06b0c6a29d48be9fd8ca3c541202fd14f0697220fba6b66452942aa7ae7cc8821f5c5eb9fa8f7a31d2248624e5f9141d83a176b8
 SHA512 
70f0707ed6f2b877e69ef90cf782f66cbc9d2071db53ca09ceb7b89427b0fe176708517340621fa251539b7d481b238adeeb60261674eed74de1f62db6dbb72e
 DIST nvidia-persistenced-470.256.02.tar.bz2 46567 BLAKE2B 
8f837322a3b88412fd2f6acf38721b49a6cb444fbd842d652519e5596f2e545d8f06bbdf017f46a22301ce87455f96147fab2829ca5fbf26131ec3e4a772e282
 SHA512 
4fd19258649b7d39945fb5c8578bf11ab118617dd14f3d11cdf15cb3fe77daf7b4719e4ae57af59031b1b809d02f4e8e8afed0ec60b9d0aed4d2488bd3013cd9
 DIST nvidia-persistenced-535.274.02.tar.bz2 48596 BLAKE2B 
1f87652351ebdca97b1b145e421abdb2381fe9d824ebde12eb60983cf8480f60dc530337fd2a47d5120f3c77a6fbd895fca2497dacb31ed234a9e5cb357703c4
 SHA512 
2e8e3929039af7f468a4d43ea5a6452aba86fd715d229883212b9223603d0ecb7417380354e70c85366b173905708947f3bb1919e09382f69a62f502f7c6ae7a
@@ -37,6 +42,7 @@ DIST nvidia-persistenced-570.195.03.tar.bz2 61806 BLAKE2B 
6dc878a1febffaa1faad53
 DIST nvidia-persistenced-570.207.tar.bz2 61835 BLAKE2B 
6dc810a183dd37f33b7cd2e9dcead6369adfffe1e2e85b40c0b18a72044131d1098be1e06550ac3fff39706aa2cff348ccbbc243fececef9de8147997a7cc98e
 SHA512 
c178ddd4125c6002c414d14c162f272a144fc0621b6c51916bb8304a6fd7658cba6f1cc175fe65270b589ea8fa529531dff99ff3ac5336cf2f0f53775e07d7ad
 DIST nvidia-persistenced-580.105.08.tar.bz2 62195 BLAKE2B 
8ce15102d60e33a34a0db0fbbbdcbd34c34bca4c3ae20edf2e45b8a7a21ac3bcd640fd92679953248b642cfb683caefca15f01323cd417e35bc3f55d8b85933e
 SHA512 
fa08ba0e8d8ce8c483029d70c6fa2bc14d104aeae174bc42dbee2f448881f8165311f5bdd281470d2e931ce606c31baf32c4ba7861bda840807b9198439c6c9f
 DIST nvidia-persistenced-580.95.05.tar.bz2 62343 BLAKE2B 
ad5a8b185accac6e8488f7b6d138e71db783590ca3b9890a1034771977b2f598c4f920bc48e65dc254b925e71d7f59e935cf1e43c90982e81b48266ac5da4171
 SHA512 
624c052fd7e7aab74e86c07ab281448415f9900cade11c255f7b6907e7de26180513e83d7374b4a823ab431a0ce2c5a74ae51f8de3889bddeb959ec73c373605
+DIST nvidia-persistenced-590.44.01.tar.bz2 62203 BLAKE2B 
c656171144f8bf0c209a7d34813040ee3c19128520d07d72e46ad54972982b9d1ea9999bb31ed30b3f6479d1a8ac9c2476eebfe0cb71e41bfe7b062c1f8dc132
 SHA512 
41b373df321e58bb196b46ae0eeb83c3514f562fcb3ac0b159ea82446ef4e759a8a7a9952248b2fa28dc5294ecb2ad390c815933a05b1cba49023fb4b721b660
 DIST nvidia-settings-390.157.tar.bz2 1108938 BLAKE2B 
d9ec1ab5d7f157d74627272adf752a671dd17e2ede02069437b6180b927fe315b15cc6416d584ab2f038b76fe01e5b64514a834f24d88ac16676e55205fdecdd
 SHA512 
b16699009bf56a1ff3b623a528c58061c4f5a2c5c4a373756a07bcd667743a1df7c733a572d2d0baa835a904ac2fda8a5c85890dcc00c3a0f223e0467aea902d
 DIST nvidia-settings-470.256.02.tar.bz2 1062273 BLAKE2B 
8e66201e7861469b12932595ef8f9fd29d4cfd570c2576ae7fbb7383f61c55ac71fe721cc431e79d6d69f86d998b5b4c3cafe531b573f439e6b499b0fc047a19
 SHA512 
626e66118ae2e62eacfdf44e37529c409b945a6f33637b9690d74abd87a2afb581aaca5f90328d280da99ceb659959d0e5dc5c22ef8013b2205b2b1c72e08007
 DIST nvidia-settings-535.274.02.tar.bz2 1094628 BLAKE2B 
065eab7e3a6d2a38e437b133eeebddd647467ecfb110f1f356a37df2309e738372902bd8ad7cccb0643da0ef0a310536bc336e8583bf2a9058d580f4795a4b92
 SHA512 
bcaff79ebf66197a4228c6cda17995f6f0d1a6e8f1f156b907f5e7d7f06bdbf318b4fe084591e3f767ba4efc3a0986d2506fb4775ee09613d2c8f438762db1dd
@@ -44,6 +50,7 @@ DIST nvidia-settings-570.195.03.tar.bz2 1124511 BLAKE2B 
64f404f9659aeb97cf4c498e
 DIST nvidia-settings-570.207.tar.bz2 1124342 BLAKE2B 
7a1725d7ffb81df4d6d32fb4732aab44af5a84f8e42546e162924ec45fac06075e27748a2bdedfddddb8abf3387c07a79d8d23a7fea505f5efe213117a90ba08
 SHA512 
ed8a250c21f6fff50c6ebac6b6dcb016ce29bfef602ae57e4df87082e43640746bd900aef52c60b2415a23f658e3a8a5d3336c4cccaf9efcfc97d089bed11e8b
 DIST nvidia-settings-580.105.08.tar.bz2 1131887 BLAKE2B 
4f4deacbf3ae95b982e2b523d9cc17cb3a6de927b52496593fed09fb56b70561e0ad110d8b2b1beed028cde47de6d908c61950c1c6795d704b6f3f1873b80e37
 SHA512 
4e27ca95c354cb79e6aca06658d01c6a8cc1fc09a41564d0165ff2dd085e9e425aa4148e19383b31eebab706d885e67629c97e39b7168895dad29ee0939e465f
 DIST nvidia-settings-580.95.05.tar.bz2 1131496 BLAKE2B 
5eb45787d743319593ca36c6d95fc9e93a020615935211c627dbebccecf92b8dd7d28c6d63a95a07c8cad1a70a65b0ddcc0040564ece0bf3383478ae59bd3aa2
 SHA512 
8c60d4df230e253d5fdeda972f0a8a9285ee419fe9be34aa3d25c06d4954bb9b6fc6db789f3a621813fb817f6de6fbdec6d79f70d519f1ddcb6b25b8378d6480
+DIST nvidia-settings-590.44.01.tar.bz2 1134395 BLAKE2B 
b7a8a6f543f50bb2c399c45eba3cda4459518366868938f904a64412e83fca813cf6f545713c7dea2c9c8ac671b99192ba9e6e96c91fbccf4b4f8974a7a5471b
 SHA512 
8aa2987381ebf3e7c8cf85264a4482368578ae28319edb53c1be70130faf27a62b2fc291225c503b499095c05c4a50d0d2d6845e9ccd080395b511a6ebc474dd
 DIST nvidia-xconfig-390.157.tar.bz2 107399 BLAKE2B 
0cbb3b1ba508ddc3ba4a161c290b31bf7a67f67880bdbd01171a962c5fa97ca945b1ef17932403f8589309380743f1da632c728d8accb6d4e56dbd895e7486bb
 SHA512 
50b390811c9bf091b14add41f886925b17496b41006b7d3981d2398caa65cf5db8a579c8cebed78278384bf3acc629befb07b54339c61abcc75852c0dcb8b8ca
 DIST nvidia-xconfig-470.256.02.tar.bz2 108698 BLAKE2B 
e468574e4bc57e7279d4120e2b08a201671b50d408be0c530eabe5da7d45daaf21cbf5c7fa31410d0d732fe8ea1551cbfb21d1ae193c1b3f5b5c50c764c9e236
 SHA512 
9dcec1e0c2b56b4d38a5f2c76086302f8bc0860cc15012cce29c3a5062f801a48b6a2bb78344361b07a2717b58502783441a2daf402d9973a17526175b1f15ca
 DIST nvidia-xconfig-535.274.02.tar.bz2 111008 BLAKE2B 
4311cf01a7224a0fdf2d8730b2a88931d53916cd627740e6e8e73dbbd29641dfc32721c9886094799953464a69b80aa1fae1d6cf4b203c512ad65d2ae7f5356a
 SHA512 
6c2d5e068f1e6d1c37041b179203608144797893e31c99133e1189a31e219176b3e032222d935679f4c30a79cb960741cecdaca0b552feb75eb10366aa9d66fa
@@ -51,4 +58,5 @@ DIST nvidia-xconfig-570.195.03.tar.bz2 111245 BLAKE2B 
2718b5d16804bfbbddf54e1004
 DIST nvidia-xconfig-570.207.tar.bz2 111226 BLAKE2B 
63ecc5f170fadb60fb841727799a31a4bd5a8465ca4b890d1d959a3559fe396ffd4ef4d9f0f79abbd59114894411fa584e1abb3e535d4ac47421480a40d5b4f3
 SHA512 
4250eef4f367d2d2a7e99cc393c1c738fb84240248c482343acc2b3a197d3c2cd7668c455d5d64758d83823dd17393d1699bed13ac9f8eb05b4b62150a2dde57
 DIST nvidia-xconfig-580.105.08.tar.bz2 111476 BLAKE2B 
8eddc9ac8266db03c335ca0c0a83b3d6e5a54301f2014527d1289d549a7ec3d4e8ea4edb4d39b0a943e4e4f5f31be3a9f9b9e3da644d958db77ac0757d365c10
 SHA512 
2de5d43659e0b78d025eaf8e064e68abdaa5027ea942e2d32e241a1287fe913bca2bc9825c344d8a82eb8120c779630e5a8e09dfb61f1e0c586a7781cff2c7c4
 DIST nvidia-xconfig-580.95.05.tar.bz2 111488 BLAKE2B 
abaf3fa63c19129df539a1e0eb4466ff7b8ccf81527c69b6bcfb16df2abf0950541791ecca130ff59ec0028a5a92c1a0912bc1d35a48efbd331a58f224699db6
 SHA512 
4fa0d411e8c41ee5f24443ef9f88a261c006b5b487f6745d54eac27805a8a810ef5ffba1da3952a39978e1ccfe39114399722e392d282791a648c69a88b7777e
+DIST nvidia-xconfig-590.44.01.tar.bz2 111036 BLAKE2B 
a8108784699b6b8e507a916152a2a02918db4da1f0ee24d4e31dbd1de779bef910f69fbfe0414df33d58b0ca1656f2d9a6fd4796c472078b5d919a14dd0b42ff
 SHA512 
85b64c0fe5d6633b3aa95276f521b828b98278376b5be428080e257752332618867ded6805e8b50cbe9331bc4dd9fbdbdfd3c29e46fed1da890a993acbb3f613
 DIST open-gpu-kernel-modules-580.94.11.tar.gz 23281320 BLAKE2B 
2eabb58ae6bce6e13469d91337f4ea2f5ed1f779a2687be01a6d3c2ef36c2aa6d4a0629296f48cf9fd2421ea06bda30f03c3af66c357dcfd41c2eee62e84d4b4
 SHA512 
305e6ed817bf42ab3fc2dd26000aaf92ce21d6aa44176f4d48905094c77c50636646dc0cc933ce994f4a9566cef8674af56b8fc365a9f27b4a9793be9fc3909c

diff --git a/x11-drivers/nvidia-drivers/files/nvidia-590.conf 
b/x11-drivers/nvidia-drivers/files/nvidia-590.conf
new file mode 100644
index 000000000000..5ab27a9e9d62
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-590.conf
@@ -0,0 +1,41 @@
+# NVIDIA drivers options
+# See /usr/share/doc/nvidia-drivers-*/README.txt* for more information.
+
+# nvidia-drivers and nouveau / nova cannot be used at same time.
+# Comment out the following lines if you wish to allow either.
+blacklist nouveau
+blacklist nova_core
+
+# Kernel Mode Setting (notably needed for fbdev and wayland).
+# If in doubt, even X11 users should not touch this.
+options nvidia-drm modeset=1
+
+# If modeset=1 ^, NVIDIA will handle the console/tty display and allow
+# overriding DRM devices such as simpledrm by default. May or may not
+# cause issues like being unable to display/switch tty properly or
+# resume from sleep with *some* setups. Try disabling by uncommenting
+# if need to troubleshoot issues, and re-enable if unrelated.
+#options nvidia-drm fbdev=0
+
+# Suspend options. Note that Allocations=1 requires suspend hooks currently
+# only used when either systemd or elogind is used to suspend. If using
+# neither or have issues, try Allocations=0 (revert if it does not help
+# as =0 is not recommended).
+options nvidia \
+       NVreg_PreserveVideoMemoryAllocations=1 \
+       NVreg_TemporaryFilePath=/var/tmp
+
+# !!! Security Warning !!!
+# Do not change the DeviceFile options unless you know what you are doing.
+# Only add trusted users to the 'video' group, these users may be able to
+# crash, compromise, or irreparably damage the machine.
+options nvidia \
+       NVreg_DeviceFileGID=@VIDEOGID@ \
+       NVreg_DeviceFileMode=432 \
+       NVreg_DeviceFileUID=0 \
+       NVreg_ModifyDeviceFiles=1
+
+# Should be no need to touch anything below.
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+remove nvidia modprobe -r --ignore-remove nvidia-drm nvidia-modeset nvidia-uvm 
nvidia

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-590.44.01.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-590.44.01.ebuild
new file mode 100644
index 000000000000..d8ccb5dfd054
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-590.44.01.ebuild
@@ -0,0 +1,566 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_OPTIONAL_IUSE=+modules
+inherit desktop dot-a eapi9-pipestatus eapi9-ver flag-o-matic linux-mod-r1
+inherit readme.gentoo-r1 systemd toolchain-funcs unpacker user-info
+
+MODULES_KERNEL_MAX=6.18
+NV_URI="https://download.nvidia.com/XFree86/";
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/";
+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-2025 Apache-2.0 Boost-1.0 BSD BSD-2 GPL-2 MIT ZLIB
+       curl openssl public-domain
+"
+SLOT="0/${PV%%.*}"
+# kept unkeyworded due to being a beta, users are free to opt-in for testing
+#KEYWORDS="-* ~amd64 ~arm64"
+IUSE="+X abi_x86_32 abi_x86_64 persistenced powerd +static-libs +tools wayland"
+
+COMMON_DEPEND="
+       acct-group/video
+       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
+       )
+"
+# egl-wayland2: nvidia currently ships both versions so, to ensure
+# everything works properly, depend on both at same time for now
+# (may use one or the other depending on setup)
+RDEPEND="
+       ${COMMON_DEPEND}
+       dev-libs/openssl:0/3
+       sys-libs/glibc
+       X? (
+               media-libs/libglvnd[X,abi_x86_32(-)?]
+               x11-libs/libX11[abi_x86_32(-)?]
+               x11-libs/libXext[abi_x86_32(-)?]
+       )
+       powerd? ( sys-apps/dbus[abi_x86_32(-)?] )
+       wayland? (
+               >=gui-libs/egl-gbm-1.1.1-r2[abi_x86_32(-)?]
+               >=gui-libs/egl-wayland-1.1.13.1[abi_x86_32(-)?]
+               gui-libs/egl-wayland2[abi_x86_32(-)?]
+               X? ( gui-libs/egl-x11[abi_x86_32(-)?] )
+       )
+"
+DEPEND="
+       ${COMMON_DEPEND}
+       static-libs? (
+               x11-base/xorg-proto
+               x11-libs/libX11
+               x11-libs/libXext
+       )
+       tools? (
+               dev-util/vulkan-headers
+               media-libs/libglvnd
+               sys-apps/dbus
+               x11-base/xorg-proto
+               x11-libs/libXrandr
+               x11-libs/libXv
+               x11-libs/libvdpau
+       )
+"
+BDEPEND="
+       app-alternatives/awk
+       sys-devel/m4
+       virtual/pkgconfig
+"
+
+# there is some non-prebuilt exceptions but rather not maintain a list
+QA_PREBUILT="lib/firmware/* usr/bin/* usr/lib*"
+
+PATCHES=(
+       "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+       "${FILESDIR}"/nvidia-settings-530.30.02-desktop.patch
+)
+
+pkg_setup() {
+       use modules && [[ ${MERGE_TYPE} != binary ]] || return
+
+       # do early before linux-mod-r1 so can use chkconfig to setup 
CONFIG_CHECK
+       get_version
+       require_configured_kernel
+
+       local CONFIG_CHECK="
+               MMU_NOTIFIER
+               PROC_FS
+               ~DRM_KMS_HELPER
+               ~DRM_FBDEV_EMULATION
+               ~SYSVIPC
+               ~!LOCKDEP
+               ~!PREEMPT_RT
+               ~!SLUB_DEBUG_ON
+               !DEBUG_MUTEXES
+               $(usev powerd '~CPU_FREQ')
+       "
+
+       kernel_is -ge 6 11 && linux_chkconfig_present DRM_FBDEV_EMULATION &&
+               CONFIG_CHECK+=" DRM_TTM_HELPER"
+
+       use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
+
+       local drm_helper_msg="Cannot be directly selected in the kernel's 
config menus, and may need
+       selection of a DRM device even if unused, e.g. CONFIG_DRM_QXL=m or
+       DRM_AMDGPU=m (among others, consult the kernel config's help), can
+       also use DRM_NOUVEAU=m as long as built as module *not* built-in."
+       local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but is 
needed for nvidia-drm.modeset=1
+       support (see ${EPREFIX}/etc/modprobe.d/nvidia.conf) which is needed for 
wayland
+       and for config-less Xorg auto-detection.
+       ${drm_helper_msg}"
+       local ERROR_DRM_TTM_HELPER="CONFIG_DRM_TTM_HELPER: is not set but is 
needed to compile when using
+       kernel version 6.11.x or newer while DRM_FBDEV_EMULATION is set.
+       ${drm_helper_msg}"
+       local ERROR_DRM_FBDEV_EMULATION="CONFIG_DRM_FBDEV_EMULATION: is not set 
but is needed for
+       nvidia-drm.fbdev=1 support (see ${EPREFIX}/etc/modprobe.d/nvidia.conf), 
may
+       result in a blank console/tty."
+       local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but is 
required for compilation.
+       Cannot be directly selected in the kernel's menuconfig, and may need
+       selection of another option that requires it such as CONFIG_KVM."
+       local ERROR_PREEMPT_RT="CONFIG_PREEMPT_RT: is set but is unsupported by 
NVIDIA upstream and
+       will fail to build unless the env var IGNORE_PREEMPT_RT_PRESENCE=1 is
+       set. Please do not report issues if run into e.g. kernel panics while
+       ignoring this."
+
+       linux-mod-r1_pkg_setup
+}
+
+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
+
+       sed 's/__USER__/nvpd/' \
+               
nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
+               > "${T}"/nvidia-persistenced.service || die
+
+       # use alternative vulkan icd option if USE=-X (bug #909181)
+       use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die
+
+       # makefile attempts to install wayland library even if not built
+       use wayland || sed -i 's/ WAYLAND_LIB_install$//' \
+               nvidia-settings/src/Makefile || die
+}
+
+src_compile() {
+       tc-export AR CC CXX LD OBJCOPY OBJDUMP PKG_CONFIG
+
+       # extra flags for the libXNVCtrl.a static library
+       local xnvflags=-fPIC #840389
+       tc-is-lto && 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 modules; then
+               local o_cflags=${CFLAGS} o_cxxflags=${CXXFLAGS} 
o_ldflags=${LDFLAGS}
+
+               # environment flags are normally unused for modules, but nvidia 
uses
+               # them for building the formerly closed "blob" and it is a bit 
fragile
+               filter-flags -fno-plt #912949
+               filter-lto
+               CC=${KERNEL_CC} CXX=${KERNEL_CXX} strip-unsupported-flags
+               LDFLAGS=$(raw-ldflags)
+
+               : video:kernel-module-source:kernel-module-source/kernel-open
+               local modlist=( nvidia{,-drm,-modeset,-peermem,-uvm}=${_} )
+               local modargs=(
+                       IGNORE_CC_MISMATCH=yes NV_VERBOSE=1
+                       SYSOUT="${KV_OUT_DIR}" SYSSRC="${KV_DIR}"
+
+                       # kernel takes "x86" and "x86_64" as meaning the same, 
but nvidia
+                       # makes the distinction (since 550.135) and is not 
happy with "x86"
+                       # TODO?: it should be ok/better for tc-arch-kernel to 
do x86_64
+                       $(usev amd64 ARCH=x86_64)
+               )
+
+               # temporary workaround for bug #914468
+               addpredict "${KV_OUT_DIR}"
+
+               linux-mod-r1_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
+               # avoid noisy *very* noisy logs with deprecation warnings
+               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
+               [OPENGL_DATA]=/usr/share/nvidia
+               [VULKANSC_ICD_JSON]=/usr/share/vulkansc
+               [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=(
+               $(usev !X "libGLX_nvidia libglxserver_nvidia")
+               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
+               libnvidia-egl-wayland2 99_nvidia_wayland2 # 
gui-libs/egl-wayland2
+               libnvidia-egl-xcb 20_nvidia_xcb.json # gui-libs/egl-x11
+               libnvidia-egl-xlib 20_nvidia_xlib.json # gui-libs/egl-x11
+               libnvidia-pkcs11.so # using the openssl3 version instead
+       )
+       local skip_modules=(
+               $(usev !X "nvfbc vdpau xdriver")
+               $(usev !modules gsp)
+               $(usev !powerd nvtopps)
+               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 modules "
+
+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 additional information or for troubleshooting issues, please see
+https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers and NVIDIA's own
+documentation that is installed alongside this README."
+       readme.gentoo_create_doc
+
+       if use modules; then
+               linux-mod-r1_src_install
+
+               insinto /etc/modprobe.d
+               newins "${FILESDIR}"/nvidia-590.conf 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
+               strip-lto-bytecode
+
+               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}
+                               pipestatus || die
+                               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]} == EXPLICIT_PATH ]]; then
+                       into=${m[3]}
+               elif [[ ${m[2]} == *_BINARY ]]; then
+                       into=/usr/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
+               # avoid portage warning due to missing soname links in manifest
+               [[ ${m[0]} =~ ^libnvidia-ngx.so ]] &&
+                       dosym ${m[0]} ${into}/${m[0]%.so*}.so.1
+
+               printf -v m[1] %o $((m[1] | 0200)) # 444->644
+               insopts -m${m[1]}
+               insinto ${into}
+               doins ${m[0]}
+       done < .manifest || die
+       insopts -m0644 # reset
+
+       # 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,suspend-then-hibernate}.service
+
+       dobin nvidia-bug-report.sh
+
+       insinto /usr/share/nvidia/files.d
+       doins sandboxutils-filelist.json
+
+       # MODULE:powerd extras
+       if use powerd; then
+               newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117
+               systemd_dounit systemd/system/nvidia-powerd.service
+
+               insinto /usr/share/dbus-1/system.d
+               doins nvidia-dbus.conf
+       fi
+
+       # enabling is needed for sleep to work properly and little reason not 
to do
+       # it unconditionally for a better user experience
+       : "$(systemd_get_systemunitdir)"
+       local unitdir=${_#"${EPREFIX}"}
+       # not using relative symlinks to match systemd's own links
+       dosym 
{"${unitdir}",/etc/systemd/system/systemd-hibernate.service.wants}/nvidia-hibernate.service
+       dosym 
{"${unitdir}",/etc/systemd/system/systemd-hibernate.service.wants}/nvidia-resume.service
+       dosym 
{"${unitdir}",/etc/systemd/system/systemd-suspend.service.wants}/nvidia-suspend.service
+       dosym 
{"${unitdir}",/etc/systemd/system/systemd-suspend.service.wants}/nvidia-resume.service
+       dosym 
{"${unitdir}",/etc/systemd/system/systemd-suspend-then-hibernate.service.wants}/nvidia-suspend-then-hibernate.service
+       dosym 
{"${unitdir}",/etc/systemd/system/systemd-suspend-then-hibernate.service.wants}/nvidia-resume.service
+       # also add a custom elogind hook to do the equivalent of the above
+       exeinto /usr/lib/elogind/system-sleep
+       newexe "${FILESDIR}"/system-sleep.elogind nvidia
+       # <elogind-255.5 used a different path (bug #939216), keep a compat 
symlink
+       # TODO: cleanup after 255.5 been stable for a few months
+       dosym {/usr/lib,/"${libdir}"}/elogind/system-sleep/nvidia
+
+       # needed with >=systemd-256 or may fail to resume with some setups
+       # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072722
+       insinto "${unitdir}"/systemd-homed.service.d
+       newins - 10-nvidia.conf <<-EOF
+               [Service]
+               Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
+       EOF
+       insinto "${unitdir}"/systemd-suspend.service.d
+       newins - 10-nvidia.conf <<-EOF
+               [Service]
+               Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
+       EOF
+       dosym -r 
"${unitdir}"/systemd-{suspend,hibernate}.service.d/10-nvidia.conf
+       dosym -r 
"${unitdir}"/systemd-{suspend,hybrid-sleep}.service.d/10-nvidia.conf
+       dosym -r 
"${unitdir}"/systemd-{suspend,suspend-then-hibernate}.service.d/10-nvidia.conf
+
+       # 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]}
+
+       # sandbox issues with /dev/nvidiactl and others (bug #904292,#921578)
+       # are widespread and sometime affect revdeps of packages built with
+       # USE=opencl/cuda making it hard to manage in ebuilds (minimal set,
+       # ebuilds should handle manually if need others or addwrite)
+       insinto /etc/sandbox.d
+       newins - 20nvidia 
<<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"'
+
+       # dracut does not use /etc/modprobe.d if hostonly=no, but want to make 
sure
+       # our settings are used for bug 932781#c8 and nouveau blacklist if 
either
+       # modules are included (however, just best-effort without initramfs 
regen)
+       if use modules; then
+               echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf 
\"" >> \
+                       "${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || 
die
+       fi
+}
+
+pkg_preinst() {
+       use modules || return
+
+       # 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-r1_pkg_postinst
+
+       readme.gentoo_print_elog
+
+       if [[ -r /proc/driver/nvidia/version &&
+               $(</proc/driver/nvidia/version) != *"  ${PV}  "* ]]; then
+               ewarn "\nCurrently loaded NVIDIA modules do not match the newly 
installed"
+               ewarn "libraries and may prevent launching GPU-accelerated 
applications."
+               if use modules; then
+                       ewarn "Easiest way to fix this is normally to reboot. 
If still run into issues"
+                       ewarn "(e.g. API mismatch messages in the \`dmesg\` 
output), please verify"
+                       ewarn "that the running kernel is ${KV_FULL} and that 
(if used) the"
+                       ewarn "initramfs does not include NVIDIA modules (or at 
least, not old ones)."
+               fi
+       fi
+
+       if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+               ewarn "\nDetected that the current kernel command line is using 
'slub_debug=',"
+               ewarn "this may lead to system instability/freezes with this 
version of"
+               ewarn "${PN}. Bug: https://bugs.gentoo.org/796329";
+       fi
+
+       if [[ -v NV_LEGACY_MASK ]]; then
+               ewarn "\n***WARNING***"
+               ewarn "\nYou are installing a version of ${PN} known not to 
work"
+               ewarn "with a GPU of the current system. If unwanted, add the 
mask:"
+               if [[ -d ${EROOT}/etc/portage/package.mask ]]; then
+                       ewarn "  echo '${NV_LEGACY_MASK}' > 
${EROOT}/etc/portage/package.mask/${PN}"
+               else
+                       ewarn "  echo '${NV_LEGACY_MASK}' >> 
${EROOT}/etc/portage/package.mask"
+               fi
+               ewarn "...then downgrade to a legacy[1] branch if possible (not 
all old versions"
+               ewarn "are available or fully functional, may need to consider 
nouveau[2])."
+               ewarn "[1] https://www.nvidia.com/object/IO_32667.html";
+               ewarn "[2] https://wiki.gentoo.org/wiki/Nouveau";
+       fi
+
+       if ver_replacing -lt 590; then
+               elog "\n>=${PN}-590 has changes that may or may not need 
attention:"
+               elog "1. support for Pascal, Maxwell, and Volta cards has been 
dropped"
+               elog "  (if affected, there should be a another message about 
this above)"
+               elog "2. kernel-open USE is gone and the open source variant is 
*always* used"
+               elog "  (no longer possible to disable GSP with 
NVreg_EnableGpuFirmware=0)"
+               elog "3. nvidia-drm.modeset=1 is now default regardless of 
USE=wayland"
+               elog "4. nvidia-drm.fbdev=1 is now also tentatively default to 
match upstream"
+               elog "See ${EROOT}/etc/modprobe.d/nvidia.conf to modify 
settings if needed,"
+               elog "fbdev=1 *could* cause issues for the console display with 
some setups."
+       fi
+}


Reply via email to