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] Wayland startup took a long time #44

Open
Xxdsanctuary opened this issue Aug 8, 2024 · 7 comments
Open

[BUG] Wayland startup took a long time #44

Xxdsanctuary opened this issue Aug 8, 2024 · 7 comments

Comments

@Xxdsanctuary
Copy link

Xxdsanctuary commented Aug 8, 2024

Description

Goofcord took a long time to initialize the window in wayland, running on X11 doesn't exhibit this behavior. Sometimes Goofcord startup put the desktop environment on heavy load (some hangs at initialization of Goofcord, fans spinning up).

Steps to Reproduce

Run goofcord from app drawer (automatic .desktop shortcut) in GNOME, never tried using flatpak command

Expected Behavior

Initialization almost instantly opens the goofcord window, just like X11 one

Actual Behavior

Initialization takes a long time (around 4-5 minutes) and hangs the system sometime (albeit only temporary)

Environment

  • Operating System: Arch Linux (6.10.3-lqx1-1-lqx), GNOME 46
  • GoofCord Version: 1.6.0

Additional Information

Want to test using Xwayland on goofcord, any ideas?

@Milkshiift
Copy link
Owner

Try running from console to see what it gets stuck on flatpak run io.github.milkshiift.GoofCord.
Regarding XWayland you can pass ozone-platform-hint=x11 argument or disable wayland socket for flatpak sandbox

@Xxdsanctuary
Copy link
Author

Xxdsanctuary commented Aug 11, 2024

Ok so after I ran goofcord using the command flatpak run io.github.mikshiift.Goofcord, It outputs this :

Using NVIDIA on Wayland, applying workaround
Passing the following arguments to Electron: --ozone-platform-hint=auto --enable-gpu-rasterization --ignore-gpu-blocklist --enable-zero-copy --enable-drdc --disable-gpu-sandbox --enable-features=UseSkiaRenderer,VaapiVideoDecoder,VaapiVideoEncoder,PulseaudioLoopbackForScreenShare,VaapiVideoDecodeLinuxGL
[2:0811/154021.503643:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[2:0811/154023.593312:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[2:0811/154023.593378:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[Auto Fixer] GoofCord was unable to load the config: Error: ENOENT: no such file or directory, open '/home/Steven/.var/app/io.github.milkshiift.GoofCord/config/goofcord/GoofCord/settings.json'
at Object.readFileSync (node:fs:448:20)
at t.readFileSync (node:electron/js2c/node_init:2:10245)
at /app/bin/goofcord/resources/app.asar/ts-out/main.js:7:513
at oi (/app/bin/goofcord/resources/app.asar/ts-out/main.js:5:3118)
at pu (/app/bin/goofcord/resources/app.asar/ts-out/main.js:7:488)
at ng (/app/bin/goofcord/resources/app.asar/ts-out/main.js:51:12627) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/Steven/.var/app/io.github.milkshiift.GoofCord/config/goofcord/GoofCord/settings.json'
}
Setting up default GoofCord settings.
Process execution path: /app/bin/goofcord/goofcord
[Firewall] Set up CSP unstricter
[Firewall] Firewall initialized
[Message Encryption] Loaded encryption passwords
[2:0811/154023.743265:ERROR:browser_main_loop.cc(278)] Gtk: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
[Script Loader] Categorized scripts
Creating a settings window.
[0811/154053.794159:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
[2:0811/154053.806021:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=512
[2:0811/154057.196709:ERROR:browser_main_loop.cc(278)] GLib-GObject: ../gobject/gsignal.c:2778: instance '0x2c80301e9c0' has no handler with id '2534'
[Timer] GoofCord fully loaded in: 37.194s
[Mod Loader] Downloading mod bundles for: vencord
[Auto Fixer] Failed to write bundle for vencord Error: ENOENT: no such file or directory, open '/home/Steven/.var/app/io.github.milkshiift.GoofCord/config/goofcord/GoofCord/extensions/vencord/dist/bundle.js'
at async open (node:internal/fs/promises:639:25)
at async Object.writeFile (node:internal/fs/promises:1219:14)
at async /app/bin/goofcord/resources/app.asar/ts-out/main.js:18:2208
at async oi (/app/bin/goofcord/resources/app.asar/ts-out/main.js:5:3112)
at async j7 (/app/bin/goofcord/resources/app.asar/ts-out/main.js:18:2190)
at async Object.U7 (/app/bin/goofcord/resources/app.asar/ts-out/main.js:18:2568)
at async ng (/app/bin/goofcord/resources/app.asar/ts-out/main.js:51:12900) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/Steven/.var/app/io.github.milkshiift.GoofCord/config/goofcord/GoofCord/extensions/vencord/dist/bundle.js'
}
[Mod Loader] Mod loader installed for: vencord
[Mod Loader] Bundles downloaded for: vencord
[Mod Loader] Downloading mod bundles for: shelter
[Auto Fixer] Failed to write bundle for shelter Error: ENOENT: no such file or directory, open '/home/Steven/.var/app/io.github.milkshiift.GoofCord/config/goofcord/GoofCord/extensions/shelter/dist/bundle.js'
at async open (node:internal/fs/promises:639:25)
at async Object.writeFile (node:internal/fs/promises:1219:14)
at async /app/bin/goofcord/resources/app.asar/ts-out/main.js:18:2208
at async oi (/app/bin/goofcord/resources/app.asar/ts-out/main.js:5:3112)
at async j7 (/app/bin/goofcord/resources/app.asar/ts-out/main.js:18:2190)
at async Object.U7 (/app/bin/goofcord/resources/app.asar/ts-out/main.js:18:2568)
at async ng (/app/bin/goofcord/resources/app.asar/ts-out/main.js:51:12900) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/Steven/.var/app/io.github.milkshiift.GoofCord/config/goofcord/GoofCord/extensions/shelter/dist/bundle.js'
}
[Mod Loader] Mod loader installed for: shelter
[Mod Loader] Bundles downloaded for: shelter
[0811/154123.957945:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
[2:0811/154123.972000:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=512
[0811/154154.126093:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
[2:0811/154154.141508:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=512

Goofcord already display the settings window at this point.

Goofcord actually runs and display goofcord, but only the startup that takes too long. I think it stuck on the last line for a couple of minutes then the window opens.

Currently, I installed goofcord through AUR and modify the .desktop file through alacarte and remove all parameters (AUR ones only defaults to 2 parameters regarding the startup of Wayland, since that is problematic). It worked like charm, it also appears to system tray with goofcord running in xwayland.

My hypothesis seems to be the problem with initializing the electron apps using the parameters to launch goofcord.

@Ran-Mewo
Copy link

Ran-Mewo commented Aug 14, 2024

Can confirm that goofcord takes wayy too long to startup on wayland
I'd appreciate it if this issue is looked into more in order to implement a fix

@Napoleon-x
Copy link

Napoleon-x commented Aug 18, 2024

I have experienced this issue too on Arch Linux KDE Wayland profile.
I run goofcord from the appimage btw.

Running it like ./GoofCord-1.6.0-linux-x86_64.AppImage ozone-platform-hint=x11 seems to fix this issue. (somehow arguably provides a smoother experience too!?)
There seems to be a major problem with how this application runs under Wayland.

@Milkshiift
Copy link
Owner

I can't reproduce this in any combination of distributions and DEs that I tried.
@Xxdsanctuary's log doesn't provide enough information. If you are experiencing the issue, please open GoofCord from console and note on what log message it gets stuck, preferably with an AppImage. Or better yet, record a video of the logs.

@Xxdsanctuary
Copy link
Author

So I tried to use AppImage and use the wayland parameters and record it :

https://drive.google.com/file/d/1XDzaw017-7E_uy5qzsT7u8AB1vWoMLsy/view?usp=sharing

If I use the X11 parameters, it just instantly opens :

https://drive.google.com/file/d/1eLzSHVZ9JQ1yWZqj-YE5lrCbBq67cQ55/view?usp=sharing

@Milkshiift
Copy link
Owner

It seems that it doesn't really get stuck on anything, but the window itself doesn't initialize on the Electron's side.
Try this build https://github.com/Milkshiift/file-storage/releases/download/goofcord/GoofCord-NoFlagSetting-linux-x86_64.AppImage
It disables flag setting that theoretically could cause the problem.

Also, what happens when clicking "Open GoofCord" in the tray menu while the window is not open?

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

No branches or pull requests

4 participants