Skip to content
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

[Bug]: Electron13 does not create window under Wayland with proprietary Nvidia driver #30878

Closed
3 tasks done
g4gg433 opened this issue Sep 8, 2021 · 5 comments
Closed
3 tasks done
Labels

Comments

@g4gg433
Copy link

g4gg433 commented Sep 8, 2021

Preflight Checklist

Electron Version

13

What operating system are you using?

Other Linux

Operating System Version

Arch

What arch are you using?

x64

Last Known Working Electron version

12

Expected Behavior

Running "electron13 --enable-features=UseOzonePlatform --ozone-platform=wayland --use-gl=desktop" should present a wayland native window

Actual Behavior

Running "electron13 --enable-features=UseOzonePlatform --ozone-platform=wayland --use-gl=desktop" does not create any window (but it does not crash or output any error either).

Testcase Gist URL

No response

Additional Information

Running "electron12 --enable-features=UseOzonePlatform --ozone-platform=wayland --use-gl=desktop" opens the electron window as a wayland native one. Trying the same with electron13 does launch electron (no crash or anything, it even gets an entry in Gnome/Plasma panel) but there is no window at all not an invisible or a pure black one just nothing even though the electron process did start and does not output any error or warning.

Running chromium (from arch repos) with the same flags works fine, this is with the proprietary nvidia drivers.

@vchernin
Copy link

vchernin commented Sep 8, 2021

What happens without --use-gl=desktop? Can you try Electron 14?

Similar Electron + Nvidia Wayland issue: signalapp/Signal-Desktop#5361

@g4gg433
Copy link
Author

g4gg433 commented Sep 8, 2021

Without --use-gl=desktop on electron12 I get the same behaviour as described above (non-existing window, but successfully running process).

Without --use-gl=desktop on electron13 (and electron14-bin from AUR) it works fine, why though? Chromium (latest from Arch repo) without that flag just spams errors ("context already lost" "Passthrough is not supported GL is egl", "Failed to create pixmap"), gets an entry in Plasma/Gnome panel but no window ever gets created the process keeps running spamming the same errors just like described.

I assume when electron gets upgraded to match chromium-93.0.4577.63-1 (probably even earlier version) you will also have this error. If this is not the case then this can be considered fixed already and can be closed.

Also it's evident all those issues are caused by Nvidias special rendering path.

@vchernin
Copy link

vchernin commented Sep 8, 2021

Well it's good to hear at least something works.

FYI Electron 14 is Chromium 93. See this page for reference (even if it kinda needs an update).

Out of curiosity can you try only using --ozone-platform=wayland on Electron 14? I'm pretty sure Ozone should be on by default in Chromium now, not sure about Electron here.

I am curious why removing --use-gl=desktop helps so much, but I'm not an expert. If possible, I would report the issue to Chromium too though if it's not already.

And also FYI Nvidia's special rendering path (EGLStreams) will be replaced by GBM in a future driver, but there isn't any timeline sadly. I am hopeful that will help here but no one can say for sure until the driver is public.

@g4gg433
Copy link
Author

g4gg433 commented Sep 8, 2021

Out of curiosity can you try only using --ozone-platform=wayland on Electron 14? I'm pretty sure Ozone should be on by default in Chromium now, not sure about Electron here.

This one produces an Xwayland window which runs fine (it has a titlebar in gnome and can be queried through wmctrl). Also get some error messages about "egl context lost" and "failed to make the glx context current"

If possible, I would report the issue to Chromium too though if it's not already.

It seems to require a Google account so I'm out.

electron14 wayland:
image text

electron14 xwayland
image text

This evidently has to be fixed upstream. Still curious why Chromium needs the use-gl=desktop but electron14 does not (if they are the same version). Just tried it again and Chromium does not produce a window without use-gl=desktop while electron13/14 do not produce a window with use-gl=desktop.

And also FYI Nvidia's special rendering path (EGLStreams) will be replaced by GBM in a future driver, but there isn't any timeline sadly. I am hopeful that will help here but no one can say for sure until the driver is public.

I highly doubt this will happen before the year 2098.

@3v1n0
Copy link
Contributor

3v1n0 commented Nov 23, 2023

Loooks like I'm getting the same issue, but only when not using --use-gl=desktop. This is in electron 22.

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

No branches or pull requests

3 participants