# Cannot get NVidia Optimus running on Lenovo W530

## daniel4230877

I have tried for the past few days to get optimus running on my Thinkpad W530. I have Intel HD4000 and NVIDIA K1000M. /dev/nvidia0 does exist. When I run /etc/init.d/vgl restart I get the error: xauth:  file list does not exist

----------

## Uzytkownik

Have you tried to use x11-misc/bumblebee? I have no problems with it (ok - the virtualgl stopped working on multilib with steam so I switched to x11-misc/primus).

Regarding lack of /dev/nvidia0 - it would indicate that a) nvidia driver is not loaded or b) something's else is wrong with initialization. Could you check if nvidia module is loaded (lsmod | grep nvidia)[/url]?

----------

## daniel4230877

 *Uzytkownik wrote:*   

> Have you tried to use x11-misc/bumblebee? I have no problems with it (ok - the virtualgl stopped working on multilib with steam so I switched to x11-misc/primus).
> 
> Regarding lack of /dev/nvidia0 - it would indicate that a) nvidia driver is not loaded or b) something's else is wrong with initialization. Could you check if nvidia module is loaded (lsmod | grep nvidia)[/url]?

 

I was actually able to fix it. Also /dev/nvidia0 DID exist. What I had to do to enable optirun to work (I plan to switch to primus soon) was to edit the file /etc/conf.d/vgl The issue was that the vgl service wouldn't start, so the bumblebee service couldn't start at boot. Since I was using lightdm what I did was commented the common case line and uncommented the lightdm line. Then a simple /etc/init.d/vgl restart and /etc/init.d/bumblebee restart fixed the problem.

So if the vgl service (or bumblebee, because bumblebee depends on vgl) returns an error like xauth: file list does not exist, what you need to do is edit /etc/conf.d/vgl and comment the line XAUTHORITY="$(ps wwax -C X,Xorg -o args= --sort=-stime | grep -m 1 -o '\B[-]auth\s*/var\S*auth\S*' | cut -d ' ' -f 2)" and uncomment the line for your display manager. After that either restarting the services or rebooting will fix it. I hope this helps someone, it took me over five hours to find this info.

----------

