Created
March 4, 2020 23:16
-
-
Save abenson/a5264836c4e6bf22c8c8415bb616204a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export __NV_PRIME_RENDER_OFFLOAD=1 | |
export __GLX_VENDOR_LIBRARY_NAME=nvidia | |
export __VK_LAYER_NV_optimus=NVIDIA_only | |
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json | |
exec "$@" |
wget https://gist.githubusercontent.com/abenson/a5264836c4e6bf22c8c8415bb616204a/raw/5f65679690075547938ed808d1e665f93eb9f2fd/prime-run sudo cp prime-run /usr/bin/prime-run sudo chmod +x /usr/bin/prime-runI just want to note, the correct location for files that aren't controlled by the package manager is
/usr/local/
. If someone installs this, and a while later their distribution decides to add it to their NVIDIA packages (such as Arch's nvidia-prime package), they would get a conflict error from the package manager.
Thanks fixed it! You right.
I've only tested this on x11, but it should be agnostic
…On Fri, Nov 8, 2024, 03:16 Known Black Hat ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
is this only for wayland? what about x11??
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/abenson/a5264836c4e6bf22c8c8415bb616204a#gistcomment-5271762>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXP5JQX4AG5LBGJT74ZRTZ7R6N7BFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTAMJWGEZTMMZYU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you authored the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
I can confirm that it also works on Wayland
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just want to note, the correct location for files that aren't controlled by the package manager is
/usr/local/
.If someone installs this, and a while later their distribution decides to add it to their NVIDIA packages (such as Arch's nvidia-prime package), they would get a conflict error from the package manager.