keylase / nvidia-patch

This patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs.
3.52k stars 277 forks source link

ERROR: cannot detect driver directory #600

Open JoeITCanuck opened 1 year ago

JoeITCanuck commented 1 year ago

Describe the bug When I run either sudo ./patch-fbc.sh or sudo ./patch.sh I get this error:

Detected nvidia driver version: 525.60.13 ERROR: cannot detect driver directory

To Reproduce Steps to reproduce the behaviour:

Clone the repository
Run sudo ./patch-fbc.sh or sudo ./patch.sh
Get error

Environment (please complete the following information):

OS: Debian 11 (latest)
GPU model: GTX 1650
Patch commit used: Latest on master branch 
Nvidia driver version: 525.60.13

Additional context Seems to be an issue that has cropped back up from before as this happened last Aug / Sept 2022.

jailuthra commented 1 year ago

Unfortunately debian apt installed driver keeps moving around, and it is hard to debug for us on every distro. If you can find out where the *.so files moved then I can add them in the search list, like it was done in Sept 2022.

Otherwise please switch to using the nvidia .run file to install instead. https://github.com/keylase/nvidia-patch/issues/422#issuecomment-886532765

sirrush7 commented 1 year ago

Hello Jailuthra and thank you for your continued support of this project!!! Very much...

I didn't realize that was the intended way to use the patch with the driver, just thought it would be simple to go with the latest and greatest and added the NVIDIA repo.

Thanks for clarifying.

So it looks like on latest 525.60.13 it's found in: /usr/lib/nvidia/current# ls libglxserver_nvidia.so nv-control-dpy nvidia-debugdump nvidia.ids nvidia-settings nvidia-settings.desktop nvidia-smi.1.gz libglxserver_nvidia.so.525.60.13 nvidia-bug-report.sh nvidia_drv.so nvidia-ngx-updater nvidia-settings.1.gz nvidia-smi

Is this what you're looking for? If it's not the intended path going forward, for those who use this patch on a Debian based system, I would recommend the documentation be modified stating a requirement for Debian users to install from downloaded file directly.

Maybe this is so infrequent it's not worth putting that effort in, your instructions do state to download the driver, it's just not explicit.

Thanks again for your help.

jailuthra commented 1 year ago

@sirrush7 Thanks,

The ls output you shared does not list the two libraries this patch is concerned with, namely libnvidia-encode.so and libnvidia-fbc.so. Let me know if/where you are able to find them on your Debian install.

And sure I think we can make it more explicit in the readme that users should download the installer from nvidia website if their distro packaged ones don't work. Edit: Done in #605

Ra6107 commented 1 year ago

Maybe installing as me, libnvidia-fbc1.. from debian packages.

sirrush7 commented 1 year ago

Just wanted to circle back and mention that once I continued using a downloaded installer as per jailuthra's instructions, never had this problem again!

Post-upgrade from Deb11 -> Deb 12, just had to re-install some kernel packages, install new driver, redo the patch and all was great!

FrozenAlex commented 1 year ago

Windows names the file differently. Regardless of version it seems to be named libnvidia-encode.so.1 Tried patching it on windows and it seems to not work