# nvidia on optimus laptop: not loading, flicker

## ExecutorElassus

I'm trying to get nvidia-drivers running on my relatively new laptop (an MSI GP72 from earlier this year). It has a pretty hefty nvidia chipset, and also an intel set. 

I'm given to understand that there are several steps to this, which I've followed from this guide. However, that guide is pretty old, and they don't seem to work for me.

When I log into lightdm and then enlightenment, on kernels-4.5.* and nvidia-drivers from a couple months ago (haven't synced in a while) I get an error message about there being no usable GLX module.

I just synced today, updating the kernel to 4.6.1 and nvidia-drivers to 367.18. Now, when I log in, I get the same thing, but there is also a horrible flicker to the screen.

Can anybody help me get this configured? All the guides I see for getting Optimus working (or should I be looking into Bumblebee?) look a couple years out of date.

Cheers,

EE

----------

## ExecutorElassus

Bump/update: I've updated my kernel now to 4.6.3 and nvidia-drivers to 367.27, and the problem is persisting. When I start lightdm, the screen flickers. However (and this is weird) if I move the mouse, the flickering stops while the mouse is in motion. It then starts flickering again once the mouse stops.

What might be causing this?

Cheers,

EE

----------

## Atmmac

Can you post up a copy of your xorg.conf? Also did you put this is your lightdm config file for boot?

```
/etc/lightdm/display_setup.sh

xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto
```

----------

## ExecutorElassus

The flickering is related to the introduction of PSR with the 4.6 kernels. If I set "i915.enable_psr=0" as a kernel option, the screen won't flicker, but also won't update until I move the mouse (either situation makes my laptop basically useless). I haven't tried other settings yet. See this bug report.

I'll boot up my laptop sometime this weekend and see about your other questions.

Cheers,

EE

----------

## Atmmac

Interesting. I am on 4.6.3 and I am not experiencing this issue. I have a 4k monitor attached with no flickering whatsoever. I upgraded to 4.6.3 last week. I did have to tweak my xorg.conf a bit as a result of some changes that were implemented in newer versions of xorg-server.

This is my xorg.cong for reference. 

```
Section "Module"

        Load "modesetting"

EndSection

Section "Device"

        Identifier "nvidia"

        Driver "nvidia"

        BusID "PCI:02:0:0"

        Option "AllowEmptyInitialConfiguration"

EndSection

```

----------

## vilehost

if you use bumblebee, install the one from 'seden' overlay

----------

## ExecutorElassus

UPDATE: setting "i915.enable_psr=3" (instead of "0") in the kernel options fixed the flickering. However, now I'm on to the lack of direct rendering. 

'glxinfo | grep rendering' returns:

```
Error: couldn't find RGB GLX visual or fbconfig
```

So, no direct rendering. 

I do not have /etc/X11/xorg.conf as a single file, but rather the directory /etc/X11/xorg.conf.d/, which has the files:

11-inputs.conf

20-opengl.conf

22-keyboard.conf

There is also the file /etc/bumblebee/xorg.conf.nvidia and the directory /etc/bumblebee/xorg.conf.d/ containing 10-dummy.conf.

Which files would you like to see? I'm guessing 20-opengl.conf is relevant, so its content is:

```
Section "Files"

            ModulePath "/usr/lib64/opengl/nvidia"

            ModulePath "/usr/lib64/xorg/modules"

EndSection
```

Anything else you need?

Cheers,

EE

----------

