tunix / alacritty-snap

A cross-platform, GPU enhanced terminal emulator
MIT License
5 stars 13 forks source link

Fails to launch with graphics error #10

Closed elcste closed 3 years ago

elcste commented 3 years ago

I just installed (on Ubuntu 21.04), and when I try to run it I get graphics errors

$snap run alacritty
libGL error: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast
libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

Created log file at "/tmp/Alacritty-91064.log"
[2021-04-29 21:09:42.846662771] [ERROR] [alacritty] Alacritty encountered an unrecoverable error:

                                                        Error creating GL context; Received multiple errors. Errors: `[OsError("eglInitialize failed"), OsError("GL context creation failed")]`
tunix commented 3 years ago

Thanks for reporting! I embedded most of the libraries inside the snap but looks like that's not enough. I'll see what I can do.

tunix commented 3 years ago

@elcste - Can you also please provide the output of this command:

LIBGL_DEBUG=verbose alacritty
elcste commented 3 years ago
$ LIBGL_DEBUG=verbose snap run alacritty
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libGL: using driver i915 for 7
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libGL: using driver i915 for 7
libGL: pci id for fd 7: 8086:3ea0, driver iris
libGL: MESA-LOADER: failed to open /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri/iris_dri.so: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libtinfo.so.6)
libGL error: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL: using driver i915 for 7
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libGL: using driver i915 for 7
libGL: pci id for fd 7: 8086:3ea0, driver iris
libGL: MESA-LOADER: failed to open /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri/iris_dri.so: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libtinfo.so.6)
libGL error: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL: MESA-LOADER: failed to open /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libtinfo.so.6)
libGL error: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/alexander/.drirc: No such file or directory.
libEGL warning: MESA-LOADER: failed to open iris (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /snap/alacritty/17/usr/lib/x86_64-linux-gnu/dri)

Created log file at "/tmp/Alacritty-92638.log"
[2021-04-30 07:27:40.874111140] [ERROR] [alacritty] Alacritty encountered an unrecoverable error:

                                                        Error creating GL context; Received multiple errors. Errors: `[OsError("eglInitialize failed"), OsError("GL context creation failed")]`
tunix commented 3 years ago

Created a forum thread to make sure I'm on the right direction.

tunix commented 3 years ago

@elcste - do you have an nvidia card? can you please specify a little bit more information about your system? thanks!

Also, could you please try building u2104-10 branch and see if it's working for you?

elcste commented 3 years ago

@tunix No, my computer is an HP laptop with pretty boring specs: i5-8265U and Intel UHD 520 graphics.

If you tell me how to build it, I will try :-)

tunix commented 3 years ago

@tunix No, my computer is an HP laptop with pretty boring specs: i5-8265U and Intel UHD 520 graphics.

If you tell me how to build it, I will try :-)

First clone this repository. Then go to the branch by typing the following command: git checkout u2104-10

Then issue the following command to build the snap:

SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=4G snapcraft --debug

You need to install multipass + snapcraft if you don't have them.

elcste commented 3 years ago

I tried building it, on a different machine I have at work, but also with Intel graphics (just older). It stops when trying to prime mesa with this message:

+ snapcraftctl prime
The primed files for part 'mesa' will not be verified for correctness or patched: build-attributes: [no-patchelf] is set.
Issues while validating properties: The 'version' property does not match the required schema: 'lacritty_terminal_v0.13.0' is not a valid snap version string. Snap versions consist of upper- and lower-case alphanumeric characters, as well as periods, colons, plus signs, tildes, and hyphens. They cannot begin with a period, colon, plus sign, tilde, or hyphen. They cannot end with a period, colon, or hyphen.
woutervb commented 3 years ago

Just had a quick look, an possibly you are missing some search paths for the dri drivers; https://docs.mesa3d.org/envvars.html

Did a local (non snap) build and then checked of the loaded drivers are included in the snap, which they are, but since the snap changes paths, this might be the issue.

tunix commented 3 years ago

Hi,

I've just merged @woutervb 's changes and the builds are now in progress. Please test the latest snap and let me know if it now works for you. Thanks!

elcste commented 3 years ago

Yes, it works now!