Vencord / Vesktop

Vesktop is a custom Discord App aiming to give you better performance and improve linux support
GNU General Public License v3.0
4.13k stars 186 forks source link

[BUG] New Screenshare Implementation doesnt work on Wayland #40

Closed ToasterUwU closed 1 year ago

ToasterUwU commented 1 year ago

Not complaining, i just wanted to let you know about this. If you need any extra, any logs, and dumps, anything else.. Just tell me what you want

Here is my hyfetch (lgbt themeable neofetch fork) output, for some info you might need: image

Text Version, less pretty but more easy to copy:

                                                           aki@Barbara 
 /🐦🐦🐦$ /🐦/🐦                /🐦🐦🐦  /🐦🐦🐦           ----------- 
| 🐦__  $|__| 🐦               /🐦__  🐦/🐦__  🐦          OS: PikaOS 23.04 x86_64 
| 🐦  \ 🐦/$| 🐦   /🐦 /🐦🐦🐦| 🐦  \ $| 🐦  \__/          Host: MS-7B86 1.0 
| 🐦🐦🐦$| $| 🐦  /🐦/|____  $| 🐦  | $|  🐦🐦🐦           Kernel: 6.3.0-pikaos 
| 🐦____/| $| 🐦🐦🐦/  /🐦🐦🐦| 🐦  | 🐦\____  🐦          Uptime: 5 hours, 52 mins 
| 🐦     | $| 🐦_  🐦 /🐦__  $| 🐦  | 🐦/🐦  \ 🐦          Packages: 3517 (dpkg), 26 (flatpak), 15 (cargo) 
| 🐦     | $| 🐦 \  $|  🐦🐦🐦|  🐦🐦🐦|  🐦🐦🐦/          Shell: bash 5.2.15 
|__/     |__|__/  \__/\_______/\______/ \______/       .   Resolution: 2560x1440, 2880x1600, 2560x1440, 2560x1440 
                                                           DE: GNOME 44.2 (wayland) 
                                                           WM: Mutter 
                                                           WM Theme: Orchis-Purple-Dark 
                                                           Theme: Orchis-Purple-Dark [GTK2/3] 
                                                           Icons: Papirus [GTK2/3] 
                                                           Cursor: Adwaita [GTK2/3] 
                                                           Terminal: gnome-terminal 
                                                           CPU: AMD Ryzen 7 2700 (16) @ 3.1GHz 
                                                           GPU: AMD ATI Radeon RX 7900 XT/7900 XTX 
                                                           Memory: 17.15 GiB / 31.27 GiB (54%) 
                                                           Network: 1 Gbps 
                                                           Bluetooth: Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) 
                                                           BIOS: American Megatrends International, LLC. 5.17 (08/08/2022)
Vendicated commented 1 year ago

doesnt work how?

ToasterUwU commented 1 year ago

doesnt work how?

I press the button to start a screen share (the little monitor with arrow symbol), Vencord Desktop instantly crashes and closes completely.

Same thing happens when I try to do the same on Armcord btw.

Vendicated commented 1 year ago

seems to be an electron 22 bug: https://github.com/electron/electron/issues/36660

This is supposedly fixed in electron 23. Would you be able to test? To do so, you would have to clone the repo, manually update the electron npm dependency to 23, then pnpm start

ToasterUwU commented 1 year ago

seems to be an electron 22 bug: https://github.com/electron/electron/issues/36660

This is supposedly fixed in electron 23. Would you be able to test? To do so, you would have to clone the repo, manually update the electron npm dependency to 23, then pnpm start

Interesting. Yes, I can definetly test that c: Programmer and passionate Nerd, so no problem.

Expect me to send a message about it in like 12 hours, since I just laid down with my blahaj for bed time.

Vendicated commented 1 year ago

Bumped electron to 25 in v0.2.3, might or might not be fixed

ToasterUwU commented 1 year ago

Just did a fresh install with 0.2.3, but no luck. Exactly the same behaviour.

Vendicated commented 1 year ago

You're passing the proper command line flags, right?

discord --ozone-platform-hint=auto --enable-webrtc-pipewire-capturer
smartfrigde commented 1 year ago

https://github.com/electron/electron/pull/38833 Here's the fix everybody is waiting for

ToasterUwU commented 1 year ago

@Vendicated No i wasnt, but i tried anyways now:

aki@Barbara:~$ vencorddesktop --ozone-platform-hint=auto --enable-webrtc-pipewire-capturer
[arRPC > bridge] listening on 1337
[96663:0624/020906.452675:ERROR:browser_main_loop.cc(274)] Gdk: gdk_wayland_window_set_dbus_properties_libgtk_only: assertion 'GDK_IS_WAYLAND_WINDOW (window)' failed
[arRPC > ipc] not available, trying again (attempt 1)
[arRPC > ipc] listening at /run/user/1000/discord-ipc-1
[arRPC > websocket] 6463 in use!
[arRPC > websocket] listening on 6464
[arRPC > process] started
[arRPC > bridge] web connected
Segmentation fault (core dumped)
cclockworks commented 1 year ago

i have the same issue

Vendicated commented 1 year ago

Should be fixed on electron 26.0.0-beta.4. Would you be able to build from source with this version (pnpm add -D electron@26.0.0-beta.4) and see if it works for you?

ToasterUwU commented 1 year ago

Should be fixed on electron 26.0.0-beta.4. Would you be able to build from source with this version (pnpm add -D electron@26.0.0-beta.4) and see if it works for you?

I'm in bed now, will do when I get up!

ToasterUwU commented 1 year ago

@Vendicated I tested it and it kinda works.

  1. There is a dep conflict about the required version of es-lint. I ignored it by using --force since its just es-lint
  2. The build from source section refers to the repo still as Vencord/Desktop, even tho its now Vencord/Vesktop. It still works with the old name, but im not sure for how long GitHub keeps an alias like that alive, so better change it
  3. It works, but is super tedious to use. I recorded the stuff i need to go trough, thats easier than explaining it with words. But it boils down to having to select the window to share a total of 4 times. Also if i dont select something in BOTH windows but press "Cancel" in one of them instead, it just cancels everything and breaks the share button again (meaning it doesnt do anything on another click unless Vencord is restarted). The issue with the two windows and needing them both is from electron ( Comment about that in their Issue ), but i think the part of needing to select 4 times is a Vencord thing. Im not sure, but i think a way to work around the two windows is to specify in Discord which type i want to share, than only requesting Monitor or Window based on that, and also only requesting share stuff at the very end.

If you have questions or want me to test something else, just ask. Im happy to help!

https://github.com/Vencord/Vesktop/assets/43654377/b5a5858d-1987-4cc7-8208-3b9b72bc9c61

Vendicated commented 1 year ago

Thank you for testing! We will likely just have to make it skip the screen picker inside discord specifically for wayland and it'll be fine. The other duplicate prompts are upstream bug

Vendicated commented 1 year ago

wayland screensharing should work fine in the newest versions, so I'm closing this. It's still a bit ugly and needs improvements, issue #77 tracks that