commit:     0023d464ce869d0d80fc7847dea9ed40a348d1d4
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  1 20:24:52 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 14 15:54:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0023d464

x11-drivers/nvidia-drivers: add 495.46{,-r10} with revamped ebuild

495.46 release is almost identical to 495.44 beside adding support
for a few additional cards, so the same issues (e.g. dbus spam) exist
which is patched in -r10 and left alone in -r0.

ebuild-wise, now reads .manifest to mimic nvidia-installer.

For a few advantages:
* less unused .so links or using scanelf to find sonames, matches
  nvidia's intended links
* can bump without constantly adjusting for every new/removed files
* warns if something entirely new needs work (e.g. GBM support)
* more solid when using different .run, e.g. amd64 vs arm64, not
  keyworded yet (waiting for confirmation that it works), but arm64
  install broke in the past because of this

Other changes:
* IUSE=persistenced: add to control installing nvidia-persistenced
  which allows libtirpc and acct-user/nvpd to be optional
 (off by default given primarily intended for headless)
* nvidia-drm_gbm.so: install unconditionally to avoid spurious
  errors with vaapi (no extra dependencies).
* nvidia-settings: hide gtk deprecation noise as it makes the log
  hard to follow, considerably bigger, and the issue is already well
  known (NVIDIA is hopefully due to revamp this tool, e.g. wayland).
* README.gentoo: add abi_x86_32 warning for new users given no longer
  default, the "flip" elog may be removed in the future after users
  had time to adapt with the profile change.
* drop multilib-build eclass as it doesn't make that much sense with
  a binary-only package, compat32 libraries are still installed with
  USE=abi_x86_32 (abi_x86_64 kept for compatibility with ebuilds
  using ${MULTILIB_USEDEP} but is unused)
* fix build if /usr/bin/ld or LD points to ld.lld
* replaced .desktop and gtk2 seds by patches

Various other small adjustments/cleanups, changes will be rolled
out to older branches in time (patches are already based on 390.xx).

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

 x11-drivers/nvidia-drivers/Manifest                |   7 +
 .../files/nvidia-settings-390.144-desktop.patch    |  12 +
 .../files/nvidia-settings-390.144-no-gtk2.patch    |  11 +
 .../nvidia-settings-390.144-raw-ldflags.patch      |   9 +
 x11-drivers/nvidia-drivers/metadata.xml            |   1 +
 .../nvidia-drivers-495.46-r10.ebuild               | 479 +++++++++++++++++++++
 .../nvidia-drivers/nvidia-drivers-495.46.ebuild    | 463 ++++++++++++++++++++
 7 files changed, 982 insertions(+)

diff --git a/x11-drivers/nvidia-drivers/Manifest 
b/x11-drivers/nvidia-drivers/Manifest
index 2a697fe87d6a..f39baeeae3d6 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -1,34 +1,41 @@
 DIST NVIDIA-Linux-aarch64-460.91.03.run 111886330 BLAKE2B 
24ab316e216caa61f7edb4dbcb34541709d3229d495e6ead95e99db7403cddee03467ee28d007f0fa3c4f2fa267e1994533c90a7a67885e9e76d501ab0f8aaa5
 SHA512 
edcfd3b11afe625c8996cda488a8de2e0e40eb4b95c8cf0ead9e1226d7cee8140a83c247d745ceefe997a39cfcf3e3f9bde575d97aa39090f97f88817d89cb28
 DIST NVIDIA-Linux-aarch64-470.86.run 183560501 BLAKE2B 
dab90940b4259ef65eedf775b4aaf5b25775241b78e7cff6181137dc580531ad96eff0f5c5a1c4f38797d0e4e05414384d00a11c6532105af63f087c2160d328
 SHA512 
785414e120b5abbc97b4af2645fef8ac8be586eeaf9c759cc2083a0ac0ae62a8c869afdea4e79cdc4f0c3e2de1700f7e0949441943ccc3176e2a42ceaa364245
 DIST NVIDIA-Linux-aarch64-495.44.run 210477242 BLAKE2B 
8fb5419be19ab4feab158fb43f142fdc1471b756f7d43afac1c9e787465a991e291cac725dda266b2f454022aea7cb3e249c6f132963a89c97564ef378e876b4
 SHA512 
4d2ed853bc3d7812652f3e677ca1cf56f1b2563bc0a43cee2cf4544f8d3b30d8f29ccc994fc8f95e2c8b40b04efdca066b616983bf2e2fb9247d2d9a8503d4ea
+DIST NVIDIA-Linux-aarch64-495.46.run 211122869 BLAKE2B 
2193f9de186b727af4f22999f6890c1b06a89e88308d5f0cc317b5b1088c62313b34efb4cbd782bc9565083191c443e5cd10b6c8cf89a988153c1abff4e9b1ec
 SHA512 
c830482fa75e841f33a32bd28e842892613968e3e23928f1e1fa45672ef2349fbd33af59341cc4e789f702163b17b10a861b071b42f90e037050769c83ae53b9
 DIST NVIDIA-Linux-x86-390.144.run 49210937 BLAKE2B 
b7e6edb55af88be74e4322ff1d270388a60a9d9809314c3a0502f86ed97edb99dfcdd3c81c5f51e681c8fcc47ecbfecd124b4d733141d23726226a3965b4c1f1
 SHA512 
d962c7e7b4b9c4635a887767d34a49c401a89e5975a5e57fa83366ca824ab70d5b8a81f3dce2e05e0528afddc72d70b2fcd69a216bd16d75e7b88ec704390546
 DIST NVIDIA-Linux-x86_64-390.144.run 85000417 BLAKE2B 
8ecfa768fb8fe92170ff5b82698a7fb22da8bc557ab2036464bf5650b6fffc7028e25a68e1f5638f6bc171eb45a4aba459465490c7a99aacd36dc769994062e8
 SHA512 
9503ebf41037a14deba995288a364768cb03fb682de8653a4b0c05955b23603443c41c4216c93eac7d7efc301734416012864ede728324ab47b93ff167d93da4
 DIST NVIDIA-Linux-x86_64-460.91.03.run 178201292 BLAKE2B 
4d407b7bb3a99ab71c62c3cd18dc3549c98a24e7af28276e6e6a21dd33efcab017fed3f782f6dfb060c4437cd718f19c2f9900de367cc47bf19fa2718a18ad55
 SHA512 
4ac11130fe5a8f1c26f459e9c19660b3ff6f23011e9f77b09ca948fc42609e523ecea70d3bf6def50a75b4a3079ab280018753fb6e53875d9bb8093a033e3b70
 DIST NVIDIA-Linux-x86_64-470.62.13.run 272974366 BLAKE2B 
08f8e5828adf3823f0988abb67c0a2b92b80637b2a28e24f056884aabad69c7ac929c8c32594c3d63d8a1ee69f58f9a99cadab9b1a2bc3e42ddab3146ab7376c
 SHA512 
5228bdb88a005bec9cd66f23197b0f1ee8b9d7c5c68b3d13352102125d21da67c6800cbe18215d77f2b3dc59a7ab9cdaf78f42b21e87b7eb8123bbc9f3b6a42e
 DIST NVIDIA-Linux-x86_64-470.86.run 273149806 BLAKE2B 
c7f5a64dfb6547856d5bccdce0fcce0f6180966961245508cdc96e672ae500940f35fad0a9b8e8e9692b5cc67d68504371e041364e3a367deb4e1c3c75222c20
 SHA512 
e541549967ee992b8e6812cb6a294307217e66c7380ec17ff143ddc637f6e3a5b6c807ba8e29bf4c3d6813d7589a41aa124e8a5709a484ecf7fedfe420598a06
 DIST NVIDIA-Linux-x86_64-495.44.run 282259831 BLAKE2B 
ca11406a5b1b25d9691ec61d4125457c22438b8f0af0651043235f72ee75c4b264cfde7b04840bbec15c22bc5eb657a46326b49941e6c776a8990430cf052818
 SHA512 
bc9054e6028ba172906e6eb9a0b8f5cfc3ae74d57f3e95e0f9057879e3af07a4b19479e80d81e948872bc47bbd674f77f5f81d4debd2e2c3ce45058cd9211802
+DIST NVIDIA-Linux-x86_64-495.46.run 280886811 BLAKE2B 
156917245f37a5da9121cf570616d6367eec66998a50136f1db0c521fc725e68db27acd5741a9fc3e3d502a2c7e90ccde68a7e56346cb8f5fc65ea419c2f0576
 SHA512 
859548fa81478acb994b40434fc85824976b1f83bc15846290898854db84ea3c6550586a1d7e89ff3afa248310d2bcf4d2d52d5d8e91cf74e3f7e4108a7002ad
 DIST nvidia-installer-390.144.tar.bz2 150017 BLAKE2B 
1a633594ecb9b54ee5a1e3620263a95db30c1ddebf547ecc7f267e1f0b799bcdb44cc3ddd6c96eda085d9be5c8f691e92556296f250495d80eec0c2f155f5bd5
 SHA512 
e4c624afc18bd1d61264f93bdcbc72afe42687baadf31683a6dd11a45c6257f6a5185b91f4b3d4c0316b8eb03ed79511f9ad260ee9e6f299fc136f5dc2178e42
 DIST nvidia-installer-460.91.03.tar.bz2 144463 BLAKE2B 
b8c381158f614331fbfd04dcfdd7227fcb3eb16cbe4e3cbcbb34ba6af2370b05ebd72dc46375b2099b950817e6a0565c418e62b6364f1d7269f78c1dce5f5535
 SHA512 
10c873597202a1d8aa0dc4629b1e64f8c1f65a68c91f6babe312cf9fabbb9257b77d03a3917c0f4f5d6994e90cf58c6c7d9a802a675ea3ef60b571c9b7abc391
 DIST nvidia-installer-470.63.01.tar.bz2 146093 BLAKE2B 
49f16fd7b27552013067410e3cfc80d44a4ec9c454d5db542caaa84b34e20cddabdeba2391d451aab39c832745fc2fbfc5bda3876a67859027d83b482d55118f
 SHA512 
92d680d845abb39d77a51ccc47f1102825387b664e87fb2f5d976a0a4cc6baee508fe86bc92f5f0c77f1cec61506826b155ca1ef02708c39d145c9d897868397
 DIST nvidia-installer-470.86.tar.bz2 146359 BLAKE2B 
e1df27887ef7168dc50d54fd688fa04e80f79065c26386aa8f5f2b0726302a0dde51093d93c24d4145d0ff72cea14e76eee4fb9503c16a562c211dab9b2fdeaf
 SHA512 
8bcc9a32d9f6c3cb778838124be5b112edf1b38753842bb436db74ae6448b4b7a367b79585f28bee9f2a41844e71083cea9b59beab99c14598a8d855ac432113
 DIST nvidia-installer-495.44.tar.bz2 147036 BLAKE2B 
a340d1629ab133d072cd7d673a474ec834c2cd71f35b2e98d837deaa6535a784c93978ec484c5060ff28cf845d5cffa08b368b3b8b18a7ddabb4a7cb1c7a0ad0
 SHA512 
9f9f592b2d73515a484720eb421774a28b39af0ba3fbea127d1987533ed0f42104f640da6211f9eee63cc1063aad68dddfe8d378e3ef590c7f77d54e56bbb8bd
+DIST nvidia-installer-495.46.tar.gz 202462 BLAKE2B 
2ad427e0c4df3ba1ef2faa7b92c4a21465961b6fb6d5f6f1997a8d1039b35341789168f82c0b9397f57f1574cb97418b69823fe5b5d321188a841e7347bb0f8c
 SHA512 
c2fc5935e6736ea6e146a711ff05267ec42da6b1f7286589556a77f97fa02e30dacf098f9e23319ebf70808ae93275bdf3309740c6210a7d57636b483f11be74
 DIST nvidia-modprobe-390.144.tar.bz2 35308 BLAKE2B 
1930c315aeb0e296c0d4795170d44a275da5ff8838fd8230559227852001b679fbca2830142ca7abcfa9c84626c9d9f222f7ab0cb3984d8d517f5ce431e5a9ea
 SHA512 
d542c1a7634a8c5ff803ca79f2fc02b17b129185177226ad60625a4d246bbaf740719ff024dbde0f5aa8273949446561261d700a27cf88217c2572e69882142c
 DIST nvidia-modprobe-460.91.03.tar.bz2 38144 BLAKE2B 
660b381f8757fe8862f7c4a971e44d3124afa3783d52af29543b8ed67486ba03b76c0b5d8dfadc5da8fdcc2c8799ec5f9c3016fd58e9c209fcc3ae897fb0436b
 SHA512 
aa47a9c0744b8e11e87d2c0f300b13fee435cd5225444be7fb0b6bea49af33811dfa723a9ccfe904c7de2b5a8da36b707c1024eb495e3f0b587e3231a4bc4f39
 DIST nvidia-modprobe-470.63.01.tar.bz2 38357 BLAKE2B 
906f966df5aafe5478550bb30b4d624247c2c621ecc5e21fa9aa0e37f1ffe39b3e44d70f24864d49c99c63d5a5045057f46b9b364f6f662bd5676b242fa3c265
 SHA512 
f41a168fe4b2278cd4cc53dd0e334e7e7dfccc91abd818b7e2b5d67c3a806d2ce5d1b11cd3cdc2f4507cc0baf42c3c5985784e19665c7a3bafb9ab433132271e
 DIST nvidia-modprobe-470.86.tar.bz2 38361 BLAKE2B 
eacef469888392d5993d018421e50cc594fadfcbe1367f13b68519c15d097759a91d3e294e3dc7391d2e3f93783fcd2e696ef25a7b4aad90abd18d992c480623
 SHA512 
5478bdd01aa7af79fcc6264b347b78bf68d2ade77eac388eb6968db72056859443778d0aad7bae1d5d63c01af332a21504fff13ac3e226446c8a71beef777860
 DIST nvidia-modprobe-495.44.tar.bz2 38377 BLAKE2B 
f1695c778c25d41795b1bda43df68a1dea9c3d16fc00acebe5948aeffd8aef174cb864d85260565fad8ac8c454ad3ad0cfb76529d9f88c3f10547de11492c61c
 SHA512 
cdf7331609ce2a400f2b0e987bdbd2450a07e837971ac94b5ab746874259e6e7a4bff5eb8b9518f786365af74e8650f1c5ddfb745f867a6777825f550a6a74c0
+DIST nvidia-modprobe-495.46.tar.gz 43480 BLAKE2B 
32b6592ca1df822227adc9a05848e98b09cfbde676b152d432aaea43ba753ccd8451515b37e275ef58159c468502b7e6d8020ce82d140c63176cd2bbdc65d1aa
 SHA512 
1b6ba93ea72a6dbe345d360fc189ab3be038e2bf1bc93c8be2656aaaf0a81cd3a71aeefc244a71ad20db42a9e5f3145934a6c4cae70f0e8935d9891fe784676b
 DIST nvidia-persistenced-390.144.tar.bz2 48672 BLAKE2B 
82a92a33eb40971e56b772ffab121214f5675d0a8c618e356e7b55bc38ff9605fd2701d740d00a1e26c158c9df0ab38d0ba10891a3850f8e8cbee8fb231ba52d
 SHA512 
4432f2dd18c7c91fd0d59e4f2bdf7254f58ed2a6b652d319c4f7ce674522da1797a68dd6939c38e71710dcd3b754ae7cc8c6e7acb47a76e13d2091e8a8ee99c8
 DIST nvidia-persistenced-460.91.03.tar.bz2 46160 BLAKE2B 
f7f34cc12de2a4d69184c60caf7a8e8025b58005ade0a3e9a1a0e95856055f7211a710a1145d674d8a2e97cf70a43175cbc5c9a5dabc49ce378623be1720c6ea
 SHA512 
c3ff5875353c264cb224b3f512ff8308bf1b0b95282e34500d88da2574719c3c514581e5900841b089c2e6f0fe29198fa06a11668de8e21c59f9f96244a74757
 DIST nvidia-persistenced-470.63.01.tar.bz2 46544 BLAKE2B 
c2bbc76bc06db1dc963ed34731fc9ca9ad2145dad4326586a7e37a395ff8ffac940800138bec08cdfafa9eb8ab5b79412e66e78cb5ef58aca4ee476d31ce0c89
 SHA512 
6ae699cae67911f92ac2dae82856e0a4d31a8d47a3d2e8e6fbae6469f28960caab4a56aae1a1ac3de0339c78dedc344c09136ec922690abd9fb5abc96afba5ca
 DIST nvidia-persistenced-470.86.tar.bz2 46523 BLAKE2B 
29b60ff1a4e7db8ff8a2b32ab6ff2efd5d5010cb66ba1678e76a55fbe4b9f51ced06f9939ee2b44d5e073d7cc5b7b246fd2a531d9607b452a9a85cf6519c783e
 SHA512 
6194ebc246d305ad5cc4276c1d2fa06c383e28ee8accef0e39ef3dedf637684837c10b78ee2b96a0b77d3e6e5e3c3555fe12629984f8ebc6358b96e303cb81a2
 DIST nvidia-persistenced-495.44.tar.bz2 46259 BLAKE2B 
ed34bb3b82a24fe7e651eaf671469988f32a9fa4782f0a8d8f08499b85cee596996611f08fe8e26a295a3073ae6a5bd59c44a1d9c6db41138339656e932aa7df
 SHA512 
d295caaad65336495e22ebf890f6a1d323b9fabd0fb4900c8d4e37044f472836327743fceb6d433bd1ef61dffe8a84a655ddf81b2eff085c7e913105a05cb47e
+DIST nvidia-persistenced-495.46.tar.gz 53692 BLAKE2B 
0c449f2a870d3e29d7119250ecab962dca55a81f6cbbd110be05a7b8a739ca1f130ba255712425fe7f3d770a83f819c40c2464df2ca4c03b94df075d33f034b5
 SHA512 
402db637fff090dfea2bf26d44060297e21f53c23bb2abdd22e945f90d2fb5141621fa73b732257bb2fab488522b669af9b03c821467dc23f6b9f4dc00998917
 DIST nvidia-settings-390.144.tar.bz2 1109104 BLAKE2B 
6724f49c7e469f580206fc17308190bd346b6167348a8b8b3886209f58aca61b65eff30658484c1fee40af8c0d89fb62f73329b05a6ac45178ea4a6870e5aa85
 SHA512 
90afe201361d492c3152057d3ec46d68c0cd722fe0ea0587aa1156718017d59fb5f26f3db89d91d4680b2390617867dbe93bd14e1fb3dc70402527bfacf0ae5c
 DIST nvidia-settings-460.91.03.tar.bz2 1061093 BLAKE2B 
13f1da07eda3a0e7e96ac69091e4a34fcd75a8f459a4db3840c64272dd54080694c4df3b7c326884ff032eb1b8708b5e19107b112afee2c80eed242281292b02
 SHA512 
172ea3366065aa30e71a5a47b31366d076477b8801a8a37e0d76972406e69c8872daa80011ee020960bc5e00163c4e9e5f63aa4f0dc726065671d76851b4ad71
 DIST nvidia-settings-470.63.01.tar.bz2 1062399 BLAKE2B 
b3193ef94cf3cde41cf2b5f38cc39c090e54b5c0f980bdf6bff318554d155cb3639d5d65baf7148b5a5d378f483b3235aaa4ffa0cd625b44e7dd4ffcb7156f00
 SHA512 
d8458f8e103de0a5026857009da6cd55e969fbc2481d526b7e22fac92e865f9f226a2670bd984b743be093acd0fcd1970c1a20819ca736b0582b645a5c4c6e1e
 DIST nvidia-settings-470.86.tar.bz2 1062317 BLAKE2B 
348c0346cb224eacceb570c833d74dbafc79be0fa54cf1953a96ba4198e0c76784e482284fc6790edab31bdcff3a70fe870e4634c5442b455db9c92332b28747
 SHA512 
4a53f4d3f52e569c4957890fbc4a4c7b2429bbca5ec07901ebb20f1848cc9a5da3e36e206719419462076793bba0b51d37a11e0856be371a19f5b7f0f2da26e7
 DIST nvidia-settings-495.44.tar.bz2 1062420 BLAKE2B 
98d5ac73f279bc3d415e3902946eca15fe4d61978dde5b21a96e9e1367129b9949078bd2c3778d344237ff4b9cf65a2921025a6410394f007dd97f441dc320f4
 SHA512 
e69bb32e47a43368de1959a0c8a877281bba0139119b1a34f6da86e006a8b0dce5bafe0fd017221be40a6bddcd93934e9479cbb8f04fb979b84f5f206835118e
+DIST nvidia-settings-495.46.tar.gz 1235052 BLAKE2B 
aa4396b56a41f19f0876a135b6c2de0f74b3d8a50fb7ad51b00394868c3354cb85d0cb54dac146537010ea4d091daf02149e5ffc5d59f8ca27f2e08b9d798dd3
 SHA512 
f9019d651f482aa35ccade111dabcc6d21e2dcb229a6102d5b8c9c72df648fa053a01bf0d3efef27d974aed2a23cbfc5022ebb6e9a93eba309b0863068d2423a
 DIST nvidia-xconfig-390.144.tar.bz2 107147 BLAKE2B 
1b6ea6dfbe33474cd3e9409a7559a38716c4ce8d2583354232225a2a7ec10c7dbc2163f07c6849f4929e16c2fad179d583daad8a67d9cba950a62209b8ebebfa
 SHA512 
09bb3558be178deda4b26031560ebad4e98e68b6186e247d4638cbcb4bb5dc05937c6baeaf1cd4db5a7b7433af97c3150c526ed972ff51b6e1c7552235ec6b51
 DIST nvidia-xconfig-460.91.03.tar.bz2 108477 BLAKE2B 
d95505e508ca16d8ebe8c22c445a1b686c32a626c379b1b48e2a8101969fc03b90446953cc30e945da9388237fa1b9e5f83417aba1fb062d58866a523c256769
 SHA512 
4bb8f7fc42e7fa5e3897884bd7e722c4fe8ab1e4a87cad4136e1764cdd91d4795f817dcee63a20279315b4839d92fe5244d073ea2310c704f8aacd38bacb28a4
 DIST nvidia-xconfig-470.63.01.tar.bz2 109078 BLAKE2B 
786d4be4e1aa23ecdd51b0c5628e27a42472f4f119979acc62d100e094d077be6c7b893353d7d31ea4a47fe99135c01ea4ca0b539da62379295644fcd7b38c79
 SHA512 
5a3b599cba4be7e272fb1fc3c1dc31c09b1f101f81e7d24a27cf88d96746d42c84ba89f5ebeb4f602e012e0aa04804015cab5cf24947e60131652f1e010e96e2
 DIST nvidia-xconfig-470.86.tar.bz2 108946 BLAKE2B 
8711d46e18db89c94fe9986e3ea296504d1d4795be745f9ab9eac35e499220335fe882258bc52c1a9dedd7848c9715f8bf481e3690913204db71584b0913b85e
 SHA512 
ea658567b7532ae3a33a1783ef224b7f57db34391280f529352cce042b8104ee8092b3585b7eef8cd5b295e4f8246e872d935c32edf746ca38651b2df21e7e6a
 DIST nvidia-xconfig-495.44.tar.bz2 108699 BLAKE2B 
8027d9b14f16c792e0839746c549979017e52724a5826cad3b53cda0fa2638b6f7dfe72353e36b84084f4a56a004cd91f87ff1d1d9e542b5d760e47092268993
 SHA512 
624aa71f319d7d8e3383580eda5c6cfc986ef4c3a9c14493cd561cd3ba758763d79731bb7e7e03fc89d3b8a3a8b65cee324de1d9980b5725678ccd50cb26175e
+DIST nvidia-xconfig-495.46.tar.gz 142633 BLAKE2B 
1df2a080dba81b3c9e984a1d2e7d49f3e8adf9f1afb28dfe6a41a9f54b03e4830d42851a16583703c2bf88f11989851aaf23fc8dad0d3b5f2f8c3885dbb5db7e
 SHA512 
b60d65e421460e4bdad579b36a141e82b869d34ca21849bdc33a445466c1b8ab505ab4ab82d6801e05f85dcac286566ec792d8c7708ba511aebfebc29ec0447d

diff --git 
a/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-desktop.patch 
b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-desktop.patch
new file mode 100644
index 000000000000..a00545ad6044
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-desktop.patch
@@ -0,0 +1,12 @@
+For icon: https://github.com/NVIDIA/nvidia-settings/pull/56
+--- a/nvidia-settings/doc/nvidia-settings.desktop
++++ b/nvidia-settings/doc/nvidia-settings.desktop
+@@ -5,5 +5,5 @@
+ Comment=Configure NVIDIA X Server Settings
+-Exec=__UTILS_PATH__/nvidia-settings
+-Icon=__PIXMAP_PATH__/nvidia-settings.png
+-Categories=__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__
++Exec=nvidia-settings
++Icon=nvidia-settings
++Categories=System;HardwareSettings;
+ 

diff --git 
a/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-no-gtk2.patch 
b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-no-gtk2.patch
new file mode 100644
index 000000000000..d1689ee27280
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-no-gtk2.patch
@@ -0,0 +1,11 @@
+--- a/nvidia-settings/src/Makefile
++++ b/nvidia-settings/src/Makefile
+@@ -132,3 +132,2 @@
+ GTK2LIB_DIR  = $(OUTPUTDIR)/gtk2
+-GTK2LIB = $(OUTPUTDIR)/$(GTK2LIB_NAME)
+ GTK2LIB_SONAME = $(GTK2LIB_NAME).$(NVIDIA_SETTINGS_VERSION)
+@@ -276,4 +275,2 @@
+       $(MKDIR) $(LIBDIR)
+-      $(INSTALL) $(INSTALL_LIB_ARGS) $(GTK2LIB) \
+-          $(LIBDIR)/$(GTK2LIB_SONAME)
+ ifdef BUILD_GTK3LIB

diff --git 
a/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-raw-ldflags.patch 
b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-raw-ldflags.patch
new file mode 100644
index 000000000000..f815dadce704
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.144-raw-ldflags.patch
@@ -0,0 +1,9 @@
+Currently need to pass ABI flags if LD is ld.lld for USE=tools
+ld.lld: error: target emulation unknown: -m or at least one .o file required
+--- a/nvidia-settings/utils.mk
++++ b/nvidia-settings/utils.mk
+@@ -477,3 +477,3 @@
+       $(at_if_quiet)cd $$(dir $(1)); \
+-      $$(call quiet_cmd_no_at,LD) -r -z noexecstack --format=binary \
++      $$(call quiet_cmd_no_at,LD) $$(RAW_LDFLAGS) -r -z noexecstack 
--format=binary \
+           $$(notdir $(1)) -o $$(OUTPUTDIR_ABSOLUTE)/$$(notdir $$@)

diff --git a/x11-drivers/nvidia-drivers/metadata.xml 
b/x11-drivers/nvidia-drivers/metadata.xml
index a216893a49e5..ed2291926c60 100644
--- a/x11-drivers/nvidia-drivers/metadata.xml
+++ b/x11-drivers/nvidia-drivers/metadata.xml
@@ -11,6 +11,7 @@
        </maintainer>
        <use>
                <flag name="driver">Install kernel driver modules</flag>
+               <flag name="persistenced">Install the persistence daemon for 
keeping devices state when unused</flag>
                <flag name="tools">Install additional tools such as 
nvidia-settings</flag>
        </use>
        <upstream>

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r10.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r10.ebuild
new file mode 100644
index 000000000000..ca77b3dba138
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r10.ebuild
@@ -0,0 +1,479 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MODULES_OPTIONAL_USE="driver"
+inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \
+       systemd toolchain-funcs unpacker
+
+NV_KERNEL_MAX="5.15"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx";
+SRC_URI="
+       amd64? ( 
https://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run
 )
+       arm64? ( 
https://us.download.nvidia.com/XFree86/aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run
 )
+       $(printf "https://github.com/NVIDIA/%s/archive/refs/tags/${PV}.tar.gz 
-> %s-${PV}.tar.gz " \
+               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"
+RESTRICT="bindist"
+
+COMMON_DEPEND="
+       acct-group/video
+       persistenced? (
+               acct-user/nvpd
+               net-libs/libtirpc:=
+       )
+       tools? (
+               dev-libs/atk
+               dev-libs/glib:2
+               dev-libs/jansson:=
+               media-libs/harfbuzz:=
+               x11-libs/cairo
+               x11-libs/gdk-pixbuf:2
+               x11-libs/gtk+:3
+               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-r1
+               media-libs/libglvnd
+               >=media-libs/mesa-21.2[gbm(+)]
+               x11-libs/libdrm
+       )"
+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-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
+               ~!DRM_SIMPLEDRM
+               ~!LOCKDEP
+               ~!SLUB_DEBUG_ON
+               !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.
+       Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
+
+       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
+
+       BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" 
SYSOUT="${KV_OUT_DIR}"'
+       BUILD_TARGETS="modules"
+
+       if linux_chkconfig_present CC_IS_CLANG; then
+               ewarn "Warning: building ${PN} with a clang-built kernel is 
experimental"
+
+               BUILD_PARAMS+=' CC=${CHOST}-clang'
+               if linux_chkconfig_present LD_IS_LLD; then
+                       BUILD_PARAMS+=' LD=ld.lld'
+                       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
+               fi
+       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}"
+               ewarn "  <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}"
+               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
+               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
+
+       # temporary workaround for dbus powerd spam in 495 series
+       # (jz -> jmp after nvidia.powerd.server, need RESTRICT=bindist)
+       # 
https://forums.developer.nvidia.com/t/bug-nvidia-v495-29-05-driver-spamming-dbus-enabled-applications-with-invalid-messages/192892/14
+       if use amd64; then
+               sed 
's/\x0f\x84\[\x01\x00\x00\x4c\x8d/\xe9\x5c\x01\x00\x00\x00\x4c\x8d/' \
+                       -i libnvidia-glcore.so.495.46 || die
+               sed 
's/\x0f\x84\x65\x01\x00\x00\x83\xec\x08\x89/\xe9\x66\x01\x00\x00\x00\x83\xec\x08\x89/'
 \
+                       -i 32/libnvidia-glcore.so.495.46 || die
+       fi
+}
+
+src_compile() {
+       tc-export AR CC LD OBJCOPY
+
+       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
+       )
+
+       use driver && linux-mod_src_compile
+
+       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
+               # ldflags: abi currently needed if LD=ld.lld
+               CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \
+                       RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" \
+                       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=(
+               $(usex X '' '
+                       libGLX_nvidia libglxserver_nvidia
+                       nvidia_icd.json nvidia_layers.json')
+               $(usex wayland '' '
+                       libnvidia-egl-gbm 15_nvidia_gbm
+                       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=(
+               $(usex X '' 'nvfbc vdpau xdriver')
+               $(usex 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
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+$(use amd64 && usex 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: ]] ||
+                       eval '[[ " ${m[0]##*/}" =~ ^(\ 
'${skip_files[*]/%/.*|\\}' )$ ]]' ||
+                       eval '[[ " ${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
+       exeinto /lib/systemd/system-sleep
+       doexe systemd/system-sleep/nvidia
+       dobin systemd/nvidia-sleep.sh
+       systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
+
+       dobin nvidia-bug-report.sh
+}
+
+pkg_preinst() {
+       has_version "${CATEGORY}/${PN}[abi_x86_32]" && NV_HAD_ABI32=
+       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=$(getent group video | cut -d: -f3)
+       [[ ${g} ]] || die "Failed to determine video group id"
+       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() {
+       use driver && linux-mod_pkg_postinst
+
+       readme.gentoo_print_elog
+
+       if [[ -r /proc/driver/nvidia/version &&
+               $(</proc/driver/nvidia/version) != *"  ${PV}  "* ]]; then
+               ewarn "Currently loaded NVIDIA modules do not match the newly 
installed"
+               ewarn "libraries and may prevent launching GPU-accelerated 
applications."
+               use driver && ewarn "The easiest way to fix this is usually to 
reboot."
+       fi
+
+       if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+               ewarn "Detected 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
+               ewarn "***WARNING***"
+               ewarn
+               ewarn "You 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 branch if possible. For 
details, see:"
+               ewarn "https://www.nvidia.com/object/IO_32667.html";
+       fi
+
+       if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
+               elog
+               elog "USE=abi_x86_32 is disabled, 32bit applications will not 
be able to"
+               elog "use nvidia-drivers for acceleration without it (e.g. 
commonly used"
+               elog "with app-emulation/wine-* or steam). Re-enable if needed."
+       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
+
+       if use wayland && [[ ${REPLACING_VERSIONS} ]] &&
+               ver_test ${REPLACING_VERSIONS} -lt 495.29.05; then
+               elog
+               elog "While this version of ${PN} adds GBM support (allowing a"
+               elog "wider range of wayland compositors, such as sway), be 
warned it is"
+               elog "very experimental and many applications are known to have 
issues."
+               elog
+               elog "While not essential, some features also need 
>=egl-wayland-1.1.8"
+               elog "which is known to cause regressions with EGLStream (GBM 
alternative)."
+               elog
+               elog "If lacking a cursor with wlroots, try 
WLR_NO_HARDWARE_CURSORS=1"
+       fi
+
+       # Try to show this message only to users that may really need it
+       # given the workaround is discouraged and usage isn't widespread.
+       if use X && [[ ${REPLACING_VERSIONS} ]] &&
+               ver_test ${REPLACING_VERSIONS} -lt 460.73.01 &&
+               grep -qr Coolbits 
"${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then
+               elog
+               elog "Coolbits support with ${PN} has been restricted to 
require Xorg"
+               elog "with root privilege by NVIDIA (being in video group is 
not sufficient)."
+               elog "e.g. attempting to change fan speed with nvidia-settings 
would fail."
+               elog
+               elog "Depending on your display manager (e.g. sddm starts X as 
root, gdm doesn't)"
+               elog "or if using startx, it may be necessary to emerge 
x11-base/xorg-server with"
+               elog 'USE="suid -elogind -systemd" if wish to keep using this 
feature.'
+               elog "Bug: https://bugs.gentoo.org/784248";
+       fi
+
+       ewarn
+       ewarn "This revision of ${PN} is applying a binary patch to prevent 
heavy"
+       ewarn "dbus spamming while using OpenGL. If you experience issues, 
please try to"
+       ewarn "mask =${CATEGORY}/${PN}-${PVR} to use NVIDIA's intended version."
+}

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46.ebuild
new file mode 100644
index 000000000000..8fec48824818
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46.ebuild
@@ -0,0 +1,463 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MODULES_OPTIONAL_USE="driver"
+inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \
+       systemd toolchain-funcs unpacker
+
+NV_KERNEL_MAX="5.15"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx";
+SRC_URI="
+       amd64? ( 
https://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run
 )
+       arm64? ( 
https://us.download.nvidia.com/XFree86/aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run
 )
+       $(printf "https://github.com/NVIDIA/%s/archive/refs/tags/${PV}.tar.gz 
-> %s-${PV}.tar.gz " \
+               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
+       persistenced? (
+               acct-user/nvpd
+               net-libs/libtirpc:=
+       )
+       tools? (
+               dev-libs/atk
+               dev-libs/glib:2
+               dev-libs/jansson:=
+               media-libs/harfbuzz:=
+               x11-libs/cairo
+               x11-libs/gdk-pixbuf:2
+               x11-libs/gtk+:3
+               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-r1
+               media-libs/libglvnd
+               >=media-libs/mesa-21.2[gbm(+)]
+               x11-libs/libdrm
+       )"
+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-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
+               ~!DRM_SIMPLEDRM
+               ~!LOCKDEP
+               ~!SLUB_DEBUG_ON
+               !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.
+       Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
+
+       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
+
+       BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" 
SYSOUT="${KV_OUT_DIR}"'
+       BUILD_TARGETS="modules"
+
+       if linux_chkconfig_present CC_IS_CLANG; then
+               ewarn "Warning: building ${PN} with a clang-built kernel is 
experimental"
+
+               BUILD_PARAMS+=' CC=${CHOST}-clang'
+               if linux_chkconfig_present LD_IS_LLD; then
+                       BUILD_PARAMS+=' LD=ld.lld'
+                       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
+               fi
+       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}"
+               ewarn "  <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}"
+               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
+               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 LD OBJCOPY
+
+       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
+       )
+
+       use driver && linux-mod_src_compile
+
+       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
+               # ldflags: abi currently needed if LD=ld.lld
+               CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \
+                       RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" \
+                       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=(
+               $(usex X '' '
+                       libGLX_nvidia libglxserver_nvidia
+                       nvidia_icd.json nvidia_layers.json')
+               $(usex wayland '' '
+                       libnvidia-egl-gbm 15_nvidia_gbm
+                       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=(
+               $(usex X '' 'nvfbc vdpau xdriver')
+               $(usex 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
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+$(use amd64 && usex 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: ]] ||
+                       eval '[[ " ${m[0]##*/}" =~ ^(\ 
'${skip_files[*]/%/.*|\\}' )$ ]]' ||
+                       eval '[[ " ${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
+       exeinto /lib/systemd/system-sleep
+       doexe systemd/system-sleep/nvidia
+       dobin systemd/nvidia-sleep.sh
+       systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
+
+       dobin nvidia-bug-report.sh
+}
+
+pkg_preinst() {
+       has_version "${CATEGORY}/${PN}[abi_x86_32]" && NV_HAD_ABI32=
+       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=$(getent group video | cut -d: -f3)
+       [[ ${g} ]] || die "Failed to determine video group id"
+       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() {
+       use driver && linux-mod_pkg_postinst
+
+       readme.gentoo_print_elog
+
+       if [[ -r /proc/driver/nvidia/version &&
+               $(</proc/driver/nvidia/version) != *"  ${PV}  "* ]]; then
+               ewarn "Currently loaded NVIDIA modules do not match the newly 
installed"
+               ewarn "libraries and may prevent launching GPU-accelerated 
applications."
+               use driver && ewarn "The easiest way to fix this is usually to 
reboot."
+       fi
+
+       if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+               ewarn "Detected 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
+               ewarn "***WARNING***"
+               ewarn
+               ewarn "You 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 branch if possible. For 
details, see:"
+               ewarn "https://www.nvidia.com/object/IO_32667.html";
+       fi
+
+       if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
+               elog
+               elog "USE=abi_x86_32 is disabled, 32bit applications will not 
be able to"
+               elog "use nvidia-drivers for acceleration without it (e.g. 
commonly used"
+               elog "with app-emulation/wine-* or steam). Re-enable if needed."
+       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
+
+       if use wayland && [[ ${REPLACING_VERSIONS} ]] &&
+               ver_test ${REPLACING_VERSIONS} -lt 495.29.05; then
+               elog
+               elog "While this version of ${PN} adds GBM support (allowing a"
+               elog "wider range of wayland compositors, such as sway), be 
warned it is"
+               elog "very experimental and many applications are known to have 
issues."
+               elog
+               elog "While not essential, some features also need 
>=egl-wayland-1.1.8"
+               elog "which is known to cause regressions with EGLStream (GBM 
alternative)."
+               elog
+               elog "If lacking a cursor with wlroots, try 
WLR_NO_HARDWARE_CURSORS=1"
+       fi
+
+       # Try to show this message only to users that may really need it
+       # given the workaround is discouraged and usage isn't widespread.
+       if use X && [[ ${REPLACING_VERSIONS} ]] &&
+               ver_test ${REPLACING_VERSIONS} -lt 460.73.01 &&
+               grep -qr Coolbits 
"${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then
+               elog
+               elog "Coolbits support with ${PN} has been restricted to 
require Xorg"
+               elog "with root privilege by NVIDIA (being in video group is 
not sufficient)."
+               elog "e.g. attempting to change fan speed with nvidia-settings 
would fail."
+               elog
+               elog "Depending on your display manager (e.g. sddm starts X as 
root, gdm doesn't)"
+               elog "or if using startx, it may be necessary to emerge 
x11-base/xorg-server with"
+               elog 'USE="suid -elogind -systemd" if wish to keep using this 
feature.'
+               elog "Bug: https://bugs.gentoo.org/784248";
+       fi
+}

Reply via email to