hmlendea / gfn-electron

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

[BUG] [FEATURE] Identifying a possible stable 'use-gl' implementation across systems #226

Closed markuskreukniet closed 8 months ago

markuskreukniet commented 9 months ago

Describe the bug

The 'use-gl' switch with the 'egl' implementation does not work on every system (for example, it does not work on my system). I think it would be better to identify a stable 'use-gl' implementation, if possible, for that system.

One solution I found is to use the 'use-gl' switch with the 'angle' implementation. If the app crashes, the app will restart using the 'egl' implementation. If the app crashes again, it will restart without hardware acceleration.

How and Why?

To identify a potentially stable 'use-gl' switch implementation for the application, we can utilize a configuration file that stores the number of crashes. A suitable location for this file is the 'userData' directory. On Linux, the crash count is in that case likely stored here: /home/[username]/.config/GeForce NOW/config.json. To reset the crash count, we can delete this file.

When I attempt to use the 'use-gl' switch with 'desktop' or 'swiftshader', I encounter an error indicating that these options are not among the permitted implementations. Future versions of Electron might introduce support for 'desktop' and 'swiftshader' implementations. Therefore, we should probably exclude these two implementations for now.

Based on my current understanding (which may be incorrect), the 'angle' implementation is preferred because it uses 'OpenGL ES', ensuring consistent behavior across different systems, such as Windows and Linux. Additionally, 'angle' includes an extra abstraction layer that could potentially mitigate bugs or circumvent limitations inherent in direct implementations.

To Reproduce

  1. Start the app with npm start on a system without the 'egl' implementation for the 'use-gl' switch.

Screenshots

Screenshot from 2024-02-03 13-41-56 EGL error

Operating System

Fedora Linux 39 (Workstation Edition)

Desktop Environment

GNOME 45.3

Display Server

X11

Installation method

git clone the source code

Version

2.0.1

Is this a fresh install of the app or an update from a past version?

fresh install

Did this issue appear right away upon installation/updating, or spontaneously?

right away upon installation

Additional context

No response