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] Screenshare takes a few minutes to load on hyprland #1012

Open
3 tasks done
Syrent opened this issue Dec 17, 2024 · 10 comments
Open
3 tasks done

[Bug] Screenshare takes a few minutes to load on hyprland #1012

Syrent opened this issue Dec 17, 2024 · 10 comments
Labels
system issue issue caused by incompatibilities with the user's system e.g. nvidia + wayland combo upstream related to a dependency, for example electron wontfix This will not be worked on

Comments

@Syrent
Copy link

Syrent commented Dec 17, 2024

Discord Account

.syrent

Operating System

6.12.4-arch1-1

Linux Only ~ Desktop Environment

Hyprland on Wayland

Package Type

installed from aur

What happens when the bug or crash occurs?

vesktop was working fine until i updated some packages. the day after that my friends couldn't see my screenshare anymore. after some troubleshooting, i noticed if i start the screenshare in Prefer Clarity type the screenshare does load, but it takes about 5 minutes to appear. and if i start screenshare in Prefer Smoothness type it will load instantly but everything is black until i do things that changes the first frame. i tried various combinations of xdg-desktop-portal options, hyprland, wlr, both, etc. but none of them made a difference.

What is the expected behaviour?

i expect screenshare to work without the delay/blackscreen

How do you recreate this bug or crash?

  1. open discord
  2. join a voice chat (the voice server doesn't matter)
  3. start an screenshare
  4. select an screen (i have two screens, not sure if its related)

Debug Logs

APPIMAGE env is not defined, current application is not an AppImage
checkForUpdatesAndNotify called, downloadPromise is null
[32525:1218/024109.259206:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParamet
➜  ~ [proxychains] Dynamic chain  ...  127.0.0.1:1080  ...  140.82.113.5:443  ...  OK
[32485:1218/024120.641588:ERROR:egl_dmabuf.cc(609)] Failed to record frame: Error creat
ing EGLImage - EGL_BAD_MATCH
[32485:1218/024120.641631:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modi
fier: 144115188488387331 and trying to renegotiate stream parameters
[32485:1218/024121.114144:ERROR:egl_dmabuf.cc(609)] Failed to record frame: Error creat
ing EGLImage - EGL_BAD_MATCH
[32485:1218/024121.114164:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modi
fier: 144115188488370947 and trying to renegotiate stream parameters
[32485:1218/024121.670028:ERROR:egl_dmabuf.cc(609)] Failed to record frame: Error creat
ing EGLImage - EGL_BAD_MATCH
[32485:1218/024121.670060:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modi
fier: 144115188488174339 and trying to renegotiate stream parameters
➜  ~ 'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:425 pw_thread_loop_wait()
[2024-12-18 02:41:23.533] [venmic] [info] [patchbay] (handle) found default metadata: 39
[2024-12-18 02:41:23.533] [venmic] [info] [patchbay] (meta_update) speaker name: "alsa_output.pci-0000_00_1f.3.analog-stereo"
[2024-12-18 02:41:23.534] [venmic] [info] [patchbay] (get) running venmic 6.1.0
[32525:1218/024128.917170:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[32485:1218/024131.022339:ERROR:egl_dmabuf.cc(609)] Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH
[32485:1218/024131.022380:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modifier: 144115188488387331 and trying to renegotiate stream parameters
[32485:1218/024131.050151:ERROR:egl_dmabuf.cc(609)] Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH
[32485:1218/024131.050182:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modifier: 144115188488370947 and trying to renegotiate stream parameters
[32485:1218/024131.118636:ERROR:egl_dmabuf.cc(609)] Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH
[32485:1218/024131.118706:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modifier: 144115188488174339 and trying to renegotiate stream parameters
[32525:1218/024138.431127:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

Request Agreement

  • I have searched the existing issues and found no similar issue
  • I am using the latest Vesktop and Vencord versions
  • This issue occurs on an official release (not just the AUR or Nix packages)
@Syrent Syrent added the bug Something isn't working label Dec 17, 2024
@avalonv
Copy link

avalonv commented Dec 18, 2024

This doesn't seem to be specific to hyprland, I can reproduce this issue on KDE Plasma and Gnome as well. Both X11 and Wayland.

edit: I'm also on Arch, and only noticed this after doing a system wide upgrade about a week ago, perhaps that is the culprit?

@jwols27
Copy link

jwols27 commented Dec 18, 2024

This doesn't seem to be specific to hyprland, I can reproduce this issue on KDE Plasma and Gnome as well. Both X11 and Wayland.

edit: I'm also on Arch, and only noticed this after doing a system wide upgrade about a week ago, perhaps that is the culprit?

I was having the same problem until i switched to the flatpak version. In a different issue someone said downgrading Vesktop to 1.5.3 also worked. I'm on 6.12.4-arch1-1 + KDE Plasma 6.2.4 btw, if that helps.

@Vendicated
Copy link
Member

Vendicated commented Dec 18, 2024

This is either an issue with your system or a regression in electron 33 or 32. Try building from source and switching to electron 32 by running pnpm i electron@32 after the pnpm i call (repeat and test 31 too if 32 is also broken)

If that fixes it, you should report it to electron instead. You will have to create a minimal electron reproduction example for that, see the instructions in their issue template for more info

@Vendicated Vendicated added wontfix This will not be worked on upstream related to a dependency, for example electron system issue issue caused by incompatibilities with the user's system e.g. nvidia + wayland combo and removed bug Something isn't working labels Dec 18, 2024
@avalonv
Copy link

avalonv commented Dec 18, 2024

Thanks a lot for the feedback and guidance. Tried both, unfortunately neither seemed to solve the issue for me. It's quite awkward because it seems to work eventually, it just takes several minutes for it to show up.

Would I be correct in assuming this is most likely a driver issue on my end?

@Vendicated
Copy link
Member

Vendicated commented Dec 18, 2024

well your console output has a lot of errors that probably aren't normal. I would suggest googling them and maybe you'll find something relevant!

I googled Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH and found a hyprland issue so maybe it's an issue with that for you? Perhaps try running a different WM/DE to see if it works normally there

(actually i now realised you're not the issue opener, but still do google any errors)

@Syrent
Copy link
Author

Syrent commented Dec 18, 2024

i’ve tested other programs like OBS, and they seem to work fine. However, when someone tries to watch my screenshare, it takes a few minutes for the stream to appear. if they close and reopen the screenshare, the delay happens again. it’s as if something on their end is preventing them from viewing the stream properly.

initially i thought it was an issue on their side, but i’ve tried it with multiple people, and they all experience the same problem.
not sure if this is helpful, but they are able to see the stream preview:
image

@Vendicated
Copy link
Member

please read my replies.

@Syrent
Copy link
Author

Syrent commented Dec 18, 2024

I spent a lot of time trying to solve this issue and tested many solutions, but nothing worked until now. To save others some time, here's a list of what I tried:

  1. Downgrading the system's Electron from version 33 to 32 – no luck.
  2. Building Vesktop from source with Electron 32 – still didn't work.
  3. Tried every possible combination of xdg-desktop-portal – none of them helped.
  4. Switching Vesktop to Canary or PTB – also failed.
  5. Downgrading PipeWire to 1.2.4 – no improvement.
  6. The only thing I could find related to the ~ 'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:425 pw_thread_loop_wait() error was a Firefox bug from about a year ago, which wasn’t helpful.
  7. I came across references to an issue with Vesktop on Hyprland causing the Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH error. However, after searching through them, I couldn't find a fix. The only related issue on Hyprland's GitHub was resolved six months ago.

Finally, someone suggested using the normal Discord client on Canary, and it worked. I installed Vencord on the normal Discord client, and it works perfectly on my system.

For now, my current setup is Discord on Canary with normal Vencord, and everything is working fine. I'll stick to this configuration since it resolves the issue and works with Vencord.

@mazeratibooloo
Copy link

I spent a lot of time trying to solve this issue and tested many solutions, but nothing worked until now. To save others some time, here's a list of what I tried:

  1. Downgrading the system's Electron from version 33 to 32 – no luck.
  2. Building Vesktop from source with Electron 32 – still didn't work.
  3. Tried every possible combination of xdg-desktop-portal – none of them helped.
  4. Switching Vesktop to Canary or PTB – also failed.
  5. Downgrading PipeWire to 1.2.4 – no improvement.
  6. The only thing I could find related to the ~ 'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:425 pw_thread_loop_wait() error was a Firefox bug from about a year ago, which wasn’t helpful.
  7. I came across references to an issue with Vesktop on Hyprland causing the Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH error. However, after searching through them, I couldn't find a fix. The only related issue on Hyprland's GitHub was resolved six months ago.

Finally, someone suggested using the normal Discord client on Canary, and it worked. I installed Vencord on the normal Discord client, and it works perfectly on my system.

For now, my current setup is Discord on Canary with normal Vencord, and everything is working fine. I'll stick to this configuration since it resolves the issue and works with Vencord.

This is, finally, the workaround I have been looking for. In issue #1004 we were trying to find some sort of solution or workaround, and this is the first thing that actually fixed the issue. Thanks so much for looking into it!

@Bahnschrift
Copy link

Bahnschrift commented Dec 23, 2024

Can confirm that this issue is occurring (in some form) on Arch with both Hyprland and Xfce (X11), with the aur packages vesktop-bin, vesktop-electron, and the flatpak package.

It seems to manifest as streams taking ages to load for viewers (but thumbnails load with no problem?), and when they do load they are usually just a black screen, or have very strange colours (example below).

image

There don't seem to be any errors on the console when running in X11, but I was getting the same Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH when running in Hyprland.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system issue issue caused by incompatibilities with the user's system e.g. nvidia + wayland combo upstream related to a dependency, for example electron wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants