Skip to content

When disabling GPU acceleration access in flatpak, sometimes the UI doesn't open up when launched, but when launching a second time it works #5024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ell1e opened this issue Apr 22, 2025 · 4 comments

Comments

@ell1e
Copy link

ell1e commented Apr 22, 2025

Sometimes the UI doesn't open up when launched. Here's the terminal output of that happening:

$ flatpak run chat.delta.desktop
[2:0422/190226.757330:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Logfile: /home/user/.var/app/chat.delta.desktop/config/DeltaChat/logs/2025-04-22-19-02-26.log
[2:0422/190226.941571:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0422/190226.941624:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
libEGL warning: wayland-egl: could not open /dev/dri/renderD128 (No such file or directory)
libEGL warning: wayland-egl: could not open /dev/dri/renderD128 (No such file or directory)
[48:0422/190227.008772:ERROR:viz_main_impl.cc(185)] Exiting GPU process due to errors during initialization
libEGL warning: wayland-egl: could not open /dev/dri/renderD128 (No such file or directory)
libEGL warning: wayland-egl: could not open /dev/dri/renderD128 (No such file or directory)
[2:0422/190227.074530:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0422/190227.074586:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0422/190227.074609:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[93:0422/190227.086844:ERROR:viz_main_impl.cc(185)] Exiting GPU process due to errors during initialization
init: 383.169ms

After this the command continues. And if I press the DeltaChat icon again a second time, now the UI comes up without any problems whatsoever.

  • Operating System (Linux/Mac/Windows/iOS/Android):
  • Delta Chat Version: 1.56.0 (git: flathub) core v1.157.3
  • Expected behavior: UI comes up when launching once
  • Actual behavior: UI comes up only when launching once, then waiting a few seconds, then launching again
  • Steps to reproduce the problem: 1. Try to launch delta chat either via command line like above or via the launcher icon
  • Screenshots:
  • Logs: see above
@ell1e ell1e changed the title Sometimes the UI doesn't open up when launched, but when launching a second time it works When disabling GPU acceleration access in flatpak, sometimes the UI doesn't open up when launched, but when launching a second time it works Apr 22, 2025
@ell1e
Copy link
Author

ell1e commented Apr 22, 2025

I found out this is tied to this option:

Image

When GPU acceleration access is disabled, DeltaChat needs to attempts to open for whatever reason. if it's enabled, then it opens instantly. Since GPU acceleration is a somewhat dangerous attack surface and arguably not needed for a messenger, it would be nice if this quirk could eventually be fixed.

@ell1e
Copy link
Author

ell1e commented Apr 22, 2025

Can confirm this is apparently the same bug as #5020 and apparently both tied to this option.

It seems like that when 3d acceleration isn't available in flatpak, DeltaChat randomly fails to open some windows, but only sometimes, and sometimes only on first try but the second try works. For "Show full message", it never works even with multiple tries, for some reason.

@ell1e ell1e marked this as a duplicate of #5020 Apr 22, 2025
@Simon-Laux
Copy link
Member

Simon-Laux commented Apr 22, 2025

Well this is a bit outside of the scope for the delta chat desktop team.

I'm happy to merge a fix if it has no side-effects for normal users, but for the core maintainers this is out of scope, since the issue is likely in flatpak, gnome, wayland or electron.

You can try if the tauri version works better.

arguably not needed for a messenger,

you may want to have it for certain webxdc apps and those you anyway need to click explicitly on to run them and WebGL is not used with potentially untrusted user input in any other scenario AFAIK. - so very likely not really practical to exploit.

@ell1e
Copy link
Author

ell1e commented Apr 23, 2025

I think testing the tauri flatpak might be interesting to figure out whether perhaps this is an electron bug. I'm happy to bring up the issue with an upstream project, I guess it's not that super likely to be a mistake in the delta chat code base.

Given how leaky browsers can be though, due to their complexity, I think removing the 3d acceleration permission from a web app like Delta Chat isn't that absurd to at least have as a working option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants