You are not logged in.

#1 2016-06-09 17:59:43

bsld
Member
Registered: 2016-05-29
Posts: 23

Wayland failed to initialize EGL - NVIDIA proprietary driver

So I'm using the latest NVIDIA package plus the latest updates (using "pacman -Syu"). I have GTX 750. But when I try launching weston ("weston-launch") on tty - I get something on the line:

failed to initialize EGL

I tried to get the exact full error message using both:

weston-launch > outtxt

weston-launch > cat >> outtxt

But AFAIK both will create empty text file with the output of the command still being displayed on the tty.

Any ideas how to get over this error? I'm really sick of X11 and want to at least try using this new Wayland (I have already installed the Hawaii aur package which of-course (I guess?) is displaying the same error - when I try to launch it with "hawaii-session").

I read that initially NVIDIA proprietary drivers weren't supporting EGL but I also believe this is not the case anymore - or is it?

OK I read that I had to enable KMS in order to work but after following the instruction on this page - I'm getting those error messages on startup (output of "journalctl -p 3 -xb"):

-- Logs begin at Wed 2016-05-18 08:21:40 UTC, end at Thu 2016-06-09 11:30:38 UTC. --
Jun 09 11:28:09 localhost kernel: sd 4:0:0:0: [sdc] No Caching mode page found
Jun 09 11:28:09 localhost kernel: sd 4:0:0:0: [sdc] Assuming drive cache: write through
Jun 09 11:28:33 localhost kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
Jun 09 11:28:33 localhost kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object


The last 2 lines are new. I checked the log just before following the instructions on the page for enabling KMS on nvidia drivers.

Plus I still can't launch Wayland failing with the same error as before.

Last edited by bsld (2016-06-09 18:40:37)

Offline

#2 2016-06-09 18:54:01

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: Wayland failed to initialize EGL - NVIDIA proprietary driver

For nVidia you currently need special patches for weston. They're currently using an EGLStreams implementation (instead of GBM like everyone else) which none of the compositors/toolkits support at the moment (since everyone uses GBM).
It's still an ongoing debate between nVidia and the Wayland people atm.

Last edited by Omar007 (2016-06-09 18:55:24)

Offline

#3 2016-06-09 19:02:48

bsld
Member
Registered: 2016-05-29
Posts: 23

Re: Wayland failed to initialize EGL - NVIDIA proprietary driver

OK - so is there a way then to use let's say both nouveau and NVIDIA proprietary drivers as nouveau powering Wayland and then the NVIDIA proprietary driver - when playing OpenGL games?

Or what are those patches which are you talking about?

Last edited by bsld (2016-06-09 19:03:35)

Offline

#4 2016-06-09 19:05:03

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: Wayland failed to initialize EGL - NVIDIA proprietary driver

I'm afraid not, unless you don't mind swapping drivers, then rebooting to X to play games, swapping drivers again and rebooting to re-enter wayland.

It might become more doable as soon as both vendors use GLVND but that's not the case atm. The Mesa stack drivers do not support it yet (they plan to in the future).

EDIT: I believe this AUR package should contain everything you need for weston. https://aur.archlinux.org/packages/weston-eglstream
Though that still will not allow you to use Hawaii or any other (e.g. Gnome on Wayland). Just weston.

EDIT2: Actually, Hawaii might work. I believe it actually uses weston as the compositor?

Last edited by Omar007 (2016-06-09 19:09:59)

Offline

#5 2016-06-09 19:13:59

bsld
Member
Registered: 2016-05-29
Posts: 23

Re: Wayland failed to initialize EGL - NVIDIA proprietary driver

OMG, OMG - maybe yes look here. There is "weston" at the end of 'Dependencies' and in the brackets - "weston-eglstream". How do I do this now please?

Maybe I should rebuild the AUR hawaii package with the "weston-eglstream"?

Last edited by bsld (2016-06-09 19:15:03)

Offline

#6 2016-06-09 19:31:50

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: Wayland failed to initialize EGL - NVIDIA proprietary driver

I think you just install the weston-eglstream package followed by the Hawaii package and you're probably fine. I've not used either personally though so you may have to experiment some with this wink

Offline

#7 2016-06-10 13:33:56

bsld
Member
Registered: 2016-05-29
Posts: 23

Re: Wayland failed to initialize EGL - NVIDIA proprietary driver

OK I can now successfully launch weston using

weston --egl-device --current-mode

. I get rid of the start up nvidia_drm errors by using the 'edid', I extracted via nvidia-settings, on boot.

However I can't launch "hawaii-session" right now. And I still can't store the full output of the command. It says something like this:

[drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
[drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object

Seems the same as the start up errors I was getting earlier (but it's definitely different then before as now it also blacks the screen for a second).

I think the mode it's starts is "--eglfs" by default though I've tried different modes plus launching in the weston-terminal while weston is running but without any success. I think the problem is that I may need to pass the same parameters I do to "weston" (ie. "--egl-device --current-mode") but "hawaii-session" doesn't seems to allow me to. Any ideas how to make "hawaii" work?

Offline

#8 2016-06-13 10:49:56

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: Wayland failed to initialize EGL - NVIDIA proprietary driver

From the Hawaii notes:

*hawaii-session*

Manages the session, drives the compositor, runs autostart programs
and launches applications for the application launcher.

Autostarts the D-Bus session if needed and can logout an existing
session with:

```sh
hawaii-session --logout
```

Supports the following modes:

* **eglfs:** runs the compositor directly on KMS or other supported systems
* **hwcomposer:** runs the compositor directly with Android drivers
* **nested:** runs the compositor inside Weston

For **eglfs** mode the user must be in the ``video`` and ``input`` groups.
KMS support requires Qt 5.5 or better.
libinput is automatically used with Qt 5.5 or better, built with libinput support.

For **hwcomposer** mode the user must be in the ``video`` and ``input`` groups.
libinput is automatically used with Qt 5.5 or better, built with libinput support.

The mode can be specified with the ``--mode`` argument, here's an example:

```sh
hawaii-session --mode=eglfs
```

The best mode is automatically detected if you run ``hawaii-session``
without the ``--mode`` argument.

I can't give you anything else since I don't know anything about Hawaii.

Last edited by Omar007 (2016-06-13 10:52:07)

Offline

Board footer

Powered by FluxBB