Comment 183 for bug 1803179

Revision history for this message
In , mfulz (mfulz-linux-kernel-bugs) wrote :

(In reply to Ranjith Hegde from comment #164)
> (In reply to Matthias Fulz from comment #161)
>
> Hello,
> Thank you for your patch and effort. I tried your primusrun patch. First I
> get an infinite repetitions of this
> /bin/bash: warning: shell level (1000) too high, resetting to 1
>
Ok this is NOT a patch :)
It's just a simple script to run optirun / primusrun encapsulated to load and unload the nvidia module.

> and when I stop (C-c) I get an infinite loop of this
>
> rmmod: ERROR: Module nvidia is not currently loaded
> finished.
> unloading nvidia modules ...
> rmmod: ERROR: Module nvidia is not currently loaded
> finished.
>
> nothing launches..
> Any ideas?
>
Yes: I'm quite sure you've got /usr/local/bin in your PATH and this before the /usr/bin entry, where optirun / primusrun should be placed in.

Two possible solutions:

1.) Change the lines primusrun $@ and optirun $@ to use the full path a.e. /usr/bin/primusrun $@ instead of primusrun $@

2.) Rename the scripts to something like /usr/local/bin/primusrun.sh and /usr/local/bin/optirun.sh

Second solution will avoid any naming clushes for sure.

Hope that helps

BR,
Matthias