Hybrid Graphics Mode issue with Alacritty

Hi,

Up until yesterday I used Ubuntu 20.04 LTS on my Dell Precision 5530. I just upgraded to 20.10 and most of the stuff works as expected. I don’t want my computer to run on performance mode so I switched nVidia settings to “on-demand” mode. This used to be fine with Alacritty but now it doesn’t work.

I’ve created a snap of Alacritty (confinement: classic) and have been using it for quite some time now. It worked fine in performance and on-demand modes of nvidia.

Now that I upgraded, I get the following error when I try to run alacritty:

$ alacritty                                                                                                                                          ⏎ 
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
libEGL warning: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

[2021-01-05 12:47:13.509534918] [ERROR] [alacritty] Alacritty encountered an unrecoverable error:

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

Created log file at "/tmp/Alacritty-374595.log"

However I can force it to run with nVidia GPU with the following command and it works fine (with the exception of transparency which worked fine on 20.04 LTS – this is probably an nvidia related issue of alacritty):

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia alacritty

How can I make it work with Intel integrated GPU like it did on 20.04? Most people suggest to downgrade mesa libraries but I don’t think it’s a good idea since this may break other things.

My system has all the latest updates and I’ve rebooted a number of times.