# Autostarting optimus / rc.conf > optimus_enable don't work



## u666sa (Mar 6, 2020)

I have optimus_enable="YES" in rc.conf however when I run optirun glxgears it says optimus service isn't running.
I have to run sudo /usr/local/etc/rc.d/optimus onestart and only after that optirun glxgears works.

(interesting piece of info but unrelated is that if there is no optimus_enable, gnome starts with llvmpipe instead of i915kms)

So how to I start optimus automatically??


----------



## T-Daemon (Mar 7, 2020)

At the github repository for the FreeBSD Nvidia Optimus Driver that issue was opened (Optimus service doesnt start automatically #3), a fix was issued (5d5e41a). Check the /usr/local/etc/rc.d/optimus script  if the lines

```
# PROVIDE: optimus
# BEFORE:  LOGIN
```
are present. If absent add those lines at the beginning of the script, after `#!/bin/sh`, or patch the ports nvidia-optimus-driver/files/optimus.in file and `make reinstall`the port. If the fix doesn't solve the problem you could leave a comment at github.


----------

