Command prime-run outputs prime-run: command not found
.
I have Ubuntu 20.04.3 and nvidia-driver-470
Asked
Active
Viewed 1.7k times
1 Answers
13
I have the same nvidia driver version and for some reason prime-run
command does not exist.
I just solved it by doing the following:
- Copy contents of the gist here
#!/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 "$@"
- Create a file
~/bin/prime-run
("~" means your home directory) - Paste the contents there.
- Run
chmod +x "~/bin/prime-run"
to make it executable.
You might want to re-open your terminal or restart your session so your terminal could recognize your ~/bin
folder and be able to run prime-run
command, that is, if the folder is not already there.
-
Nice workaround. prime-run was part of the proprietary nvidia drivers in the past. I assume that the command has been deprecated, for whatever reason and now removed. – jastram Oct 14 '21 at 06:07
-
I installed nvidia 510.60.02 with runfile and I don't have /usr/share/vulkan/icd.d/nvidia_icd.json. Is the file the same as /etc/vulkan/icd.d/nvidia_icd.json? – Gorgo Apr 13 '22 at 16:45
-
-
@Gorgo probably, but why don't you install NVidia drivers from Ubuntu packages? That way you can be sure you can cleanly remove or upgrade them without having to manually clean up the file mess the non-ubuntu installer creates – blubberdiblub Mar 24 '24 at 03:27
optirun
from bumblebee package... – N0rbert Sep 20 '21 at 20:45