hmlendea / gfn-electron

Linux Desktop client for Nvidia's GeForce NOW game streaming service
GNU General Public License v3.0
510 stars 62 forks source link

Wayland? #39

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi, I am using Linux Mint 20.1, and I have input delay/lag in Nvidia Geforce Now with Fortnite, and was told to switch to Wayland. I am still quite new to Linux, and I need help with this. Please help!

sethidden commented 3 years ago

Is it ok to track Wayland support in this issue?

I'm getting this when trying to launch geforcenow-electron

git clone https://github.com/hmlendea/geforcenow-electron.git
cd geforcenow-electron
npx electron . --enable-logging
The futex facility returned an unexpected error code.
[homedir here]/dev/0gitmisc/geforcenow-electron/node_modules/electron/dist/electron exited with signal SIGABRT

Related resources: https://wiki.archlinux.org/index.php/Wayland#Cannot_open_display:_:0_with_Electron-based_applications (tried this)

I'm not familiar with Electron but this issue https://github.com/electron/electron/issues/10915 seems to have been closed after v12 - geforcenow-electron uses v11. Would bumping the electron version help?

hmlendea commented 3 years ago

I'm unable to run Wayland on my current machine unfortunately, but the electron upgrade for this project will come today and we'll take it from there and see if it works.

hmlendea commented 3 years ago

I've released the new update which uses electron v12.0.2

sethidden commented 3 years ago

It works on Wayland now! I just pulled your newest changes, ran npm install then ran npm start and it's starting.

Thank you!

For context: Wayland 1.19.0-1

ghost commented 3 years ago

@3nuc and @hmlendea I am unsure of what Wayland and "npm" is, and how to switch to it. Can someone please elaborate on this topic?

hmlendea commented 3 years ago

@strexgth

In very broad terms, Wayland is a display server that is used by your desktop environment (everything you see on the screen, the GUI of your PC, runs in a desktop environment). There are two display servers on Linux: Wayland (newer, better, but still in development and not quite ready for mass adoption yet), and X11 (archaic, very bloated and slow, but it gets the job done and works for everyone).

npm is a package manager that you need to use if you want to manually compile this application.

hmlendea commented 3 years ago

Closing this as it was fixed in the latest update.

If issues occur again, it can be reopened or a new issue can be created.

chmanie commented 2 years ago

Hey, sorry to hijack this but has anyone tried to run it natively in wayland? The above method runs it in an XWayland server on my machine.

Cloning the repo, npm installing and doing the following gives me an error:

npx electron . --enable-logging --enable-features=UseOzonePlatform --ozone-platform=wayland
[139799:1025/130506.180149:WARNING:wayland_drm.cc(68)] Failed to get drm magic
[139799:1025/130506.291220:WARNING:wayland_surface.cc(63)] Server doesn't support zwp_linux_explicit_synchronization_v1.
[139799:1025/130506.291580:ERROR:cursor_loader.cc(107)] Failed to load a platform cursor of type kNull
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[139833:1025/130506.363175:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[139833:1025/130506.369657:ERROR:gl_surface_egl.cc(1508)] eglCreateWindowSurface failed with error EGL_BAD_NATIVE_WINDOW
[139833:1025/130506.371360:ERROR:x11_software_bitmap_presenter.cc(134)] XGetWindowAttributes failed for window 1
[139833:1025/130506.371526:WARNING:connection.cc(61)] X error received.  Request: CreateGCRequest, Error: DrawableError{.sequence = 36, .bad_value = 1, .minor_opcode = 0, .major_opcode = 55}

Here's what happesn when executing the bin with the wayland flags:

| /opt/geforcenow-electron/geforcenow-electron --enable-features=UseOzonePlatform --ozone-platform=wayland

[1802:0122/155657.215421:ERROR:object_proxy.cc(642)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[1802:0122/155657.274134:ERROR:select_file_dialog_impl_portal.cc(243)] Failed to read portal version property
[1802:0122/155657.282584:ERROR:cursor_loader.cc(115)] Failed to load a platform cursor of type kNull
[1838:0122/155657.319550:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[1838:0122/155657.324728:ERROR:gl_surface_egl.cc(1510)] eglCreateWindowSurface failed with error EGL_BAD_NATIVE_WINDOW
[1838:0122/155657.326714:ERROR:x11_software_bitmap_presenter.cc(140)] XGetWindowAttributes failed for window 1