maltejur / discord-screenaudio

A custom discord client that supports streaming with audio on Linux.
1.09k stars 35 forks source link

Blank screen on startup on NVIDIA Wayland session #219

Closed LazarusCat59 closed 6 months ago

LazarusCat59 commented 6 months ago

I am currently using Hyprland with an NVIDIA PRIME setup. Whenever I try to open discord-screenaudio, it prints these lines first:

[74187:74242:1215/150718.825205:ERROR:gl_context_egl.cc(259)] eglCreateContext failed with error EGL_BAD_CONTEXT
[74187:74242:1215/150718.825221:ERROR:gpu_channel_manager.cc(753)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[74187:74242:1215/150718.825225:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[74187:74242:1215/150718.825231:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub
[default] Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.NoReply", "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.")

The final line is printed after a delay but then it just hangs there for a while. After the window appears it is blank (discord gray) and terminal has these logs spammed.

[71813:71851:1215/150409.932629:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[71813:71851:1215/150409.932633:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub
[71813:71851:1215/150409.932801:ERROR:gl_context_egl.cc(259)] eglCreateContext failed with error EGL_BAD_CONTEXT
[71813:71851:1215/150409.932807:ERROR:gpu_channel_manager.cc(753)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.

I have the variable WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 defined so that my Hyprland renders on my NVIDIA GPU instead of the Intel one. If I remove this, only the following line is shown in the logs and it does start up properly, although it takes a long while to start up.

[default] Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.NoReply", "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.")

Using dbus-run-session discord-screenaudio or starting up kglobalaccel5 manually does make the startup immediate but the windows still remains blank and spams the same log messages as before.

If any other logs/info is needed, I'd be glad to provide. Thanks for all the cool work!

LazarusCat59 commented 6 months ago

Just found out that this is a duplicate of #190, according to instructions there running it through XWayland instead of Wayland works so using WAYLAND_DISPLAY= discord-screenaudio to run through XWayland launches the app just fine.

Closing as it is a duplicate issue.

Edit: App launches but the dialog for streaming does not show up, so no way to stream any windows.