# Gentoo, Nvidia Optimus & glamor

## Xywa

Hi,

Nvidia Optimus 361.28 manual says:

 *Quote:*   

> Some versions of the “modesetting” driver try to load a sub-module called “glamor”, which conflicts with the NVIDIA GLX implementation. Please ensure that the libglamoregl.so X module is not installed.

 

http://us.download.nvidia.com/XFree86/Linux-x86_64/361.28/README/randr14.html

So should I uninstall glamor at all? Or is just case of configuration in Gentoo? Does some use glamor + nvidia optimus in configuration which works?

```
# emerge -s glamor

  

[ Results for search key : glamor ]

Searching...

*  x11-libs/glamor

      Latest version available: 0.6.0-r1

      Latest version installed: [ Not Installed ]

      Size of files: 419 KiB

      Homepage:      http://xorg.freedesktop.org/

      Description:   OpenGL based 2D rendering acceleration library

      License:       MI
```

----------

## Princess Nell

It looks to me like this would require building xorg-server without the glamor USE flag.

```

 # locate libglamor

/usr/lib64/xorg/modules/libglamoregl.so

 # equery b /usr/lib64/xorg/modules/libglamoregl.so

 * Searching for /usr/lib64/xorg/modules/libglamoregl.so ... 

x11-base/xorg-server-1.17.4 (/usr/lib64/xorg/modules/libglamoregl.so)

 # eix xorg-server

[I] x11-base/xorg-server

     Available versions:  1.12.4-r5(0/1.12.4) 1.12.4-r7(0/1.12.4) 1.15.2-r2(0/1.15.2) 1.15.2-r4(0/1.15.2) 1.16.4(0/1.16.1) 1.16.4-r5(0/1.16.1) 1.17.4(0/1.17.4) {dmx doc glamor ipv6 kdrive libressl minimal nptl selinux static-libs +suid systemd tslib +udev unwind wayland xephyr xnest xorg xvfb}

     Installed versions:  1.17.4(21:34:34 06/12/15)(glamor nptl suid udev xorg -dmx -doc -ipv6 -kdrive -libressl -minimal -selinux -static-libs -systemd -tslib -unwind -wayland -xephyr -xnest -xvfb)

     Homepage:            http://xorg.freedesktop.org/

     Description:         X.Org X servers

 #

```

----------

## Xywa

Looks like only xorg-server uses glamor:

```
# equery h glamor

 * Searching for USE flag glamor ... 

[IP-] [  ] x11-base/xorg-server-1.18.2:0/1.18.2
```

I will try to recompile it without this USE flag and see if nvidia works.

This is my old Xorg.0.log:

```
[  2228.295] (II) Loading sub module "glamoregl" 

[  2228.295] (II) LoadModule: "glamoregl" 

[  2228.295] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so 

[  2228.297] (II) Module glamoregl: vendor="X.Org Foundation" 

[  2228.297]    compiled for 1.18.1, module version = 1.0.0 

[  2228.297]    ABI class: X.Org ANSI C Emulation, version 0.4 

[  2228.297] (II) glamor: OpenGL accelerated X.org driver based. 

[  2228.304] (EE) modeset(G0): eglInitialize() failed 

[  2228.305] (EE) modeset(G0): glamor initialization failed
```

----------

## riguz

I got the same error .startx returns a black screen, and closed after a few seconds.

Kernel-4.4.39, nvidia-drivers-375.26, Xorg-server 1.18.4, the Xorg.0.log says:

```

[  2228.304] (EE) modeset(G0): eglInitialize() failed 

[  2228.305] (EE) modeset(G0): glamor initialization failed

```

I believe we should rebuild xorg-server without glamor USE, or try to use xorg-server1.17.

Any one who have already solved this problem?

----------

