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

Flatpak version does not run with OpenGL on native Wayland #3706

Open
VortexAcherontic opened this issue Mar 24, 2024 · 3 comments
Open

Flatpak version does not run with OpenGL on native Wayland #3706

VortexAcherontic opened this issue Mar 24, 2024 · 3 comments

Comments

@VortexAcherontic
Copy link

VortexAcherontic commented Mar 24, 2024

Hello there, I am not sure when it stopped working as it played fine some time ago. But as I wanted to launch the game today it gave me the following errors:

flatpak run net.wz2100.wz2100 
info    |12:08:54: [wzChangeFullscreenDisplayMode:2168] Changing fullscreen mode to [0] 0x0
info    |12:08:54: [wzChangeFullscreenDisplayMode:2207] Getting desktop display mode
info    |12:08:54: [createGLContext:185] Requested OpenGL 3.3 context
fatal   |12:08:54: [createGLContext:192] OpenGL initialization did not give double buffering! (0)
fatal   |12:08:55: [createGLContext:193] Double buffering is required for this game!
error   |12:08:56: [_initialize:3218] Failed to create OpenGL context
fatal   |12:08:56: [wzMainScreenSetup:3251] gfx_api::context::get().initialize failed for backend: opengl

My system specs are as follows:

           .;ldkO0000Okdl;.              vortexacherontic@kleinerpopel 
       .;d00xl:^''''''^:ok00d;.          ----------------------------- 
     .d00l'                'o00d.        OS: openSUSE MicroOS x86_64 
   .d0Kd'  Okxol:;,.          :O0d.      Host: B650 GAMING X AX V2 
  .OKKKK0kOKKKKKKKKKKOxo:,      lKO.     Kernel: 6.8.1-1-default 
 ,0KKKKKKKKKKKKKKKK0P^,,,^dx:    ;00,    Uptime: 2 hours, 5 mins 
.OKKKKKKKKKKKKKKKKk'.oOPPb.'0k.   cKO.   Packages: 1505 (rpm), 241 (flatpak) 
:KKKKKKKKKKKKKKKKK: kKx..dd lKd   'OK:   Shell: bash 5.2.26 
dKKKKKKKKKKKOx0KKKd ^0KKKO' kKKc   dKd   Resolution: 2560x1440 
dKKKKKKKKKKKK;.;oOKx,..^..;kKKK0.  dKd   DE: GNOME 46.0 
:KKKKKKKKKKKK0o;...^cdxxOK0O/^^'  .0K:   WM: Mutter 
 kKKKKKKKKKKKKKKK0x;,,......,;od  lKk    WM Theme: Adwaita 
 '0KKKKKKKKKKKKKKKKKKKKK00KKOo^  c00'    Theme: Adwaita-dark [GTK2/3] 
  'kKKKOxddxkOO00000Okxoc;''   .dKk'     Icons: Adwaita [GTK2/3] 
    l0Ko.                    .c00l'      Terminal: gnome-terminal 
     'l0Kk:.              .;xK0l'        CPU: AMD Ryzen 7 7800X3D (16) @ 5.050GHz 
        'lkK0xl:;,,,,;:ldO0kl'           GPU: NVIDIA GeForce RTX 3080 Lite Hash Rate (Driver: 550.67)
            '^:ldxkkkkxdl:^'             GPU: AMD ATI 10:00.0 Raphael 
                                         Memory: 3754MiB / 15126MiB

Some random ideas I hade is, that since a few weeks I have 2 GPUs in my system which wasn't the case before. My discrete GPU is the nVidia GPU while my CPU also has a Radeon GPU build-in and thus the wrong GPU might be choosen?
Or could be related to me running this game on Wayland and thus it might run with XWayland and this might cause issues?

Thing I tired to solve this issue:

  • Checked if there are any flatpak updates but everything is up-to-date.
  • Wiped the user data of the game at ~/.var/app/net.wz2100.wz2100 to no avail
  • Force the game to use Vulkan using: flatpak run net.wz2100.wz2100 --gfxbackend=vulkan worked so far
  • After launching the game with Vulkan it tried different render backends:
    • OpenGL: Broken
    • OpenGL ES: Works (Reports running on nVidia GPU)
    • Vulkan: Works (Reports running on nVidia GPU)

At this point I am not sure if this is a general issue or just related to my system setup.

@Monsterovich
Copy link
Contributor

Monsterovich commented Mar 24, 2024

GPU: NVIDIA GeForce RTX 3080 Lite Hash Rate (Driver: 550.67)

Post the output of glxinfo here, because it doesn't make any sense.

Or could be related to me running this game on Wayland and thus it might run with XWayland and this might cause issues?

  • Does the game work in X11?
  • Does the game work in non-flatpak environment?

@VortexAcherontic
Copy link
Author

VortexAcherontic commented Mar 24, 2024

Running it in a non-flatpak environment (openSUSE Tumbleweed distrobox which is what MicroOS is based off here) does in fact work with the default OpenGL renderer.

warzone2100 
info    |13:44:56: [wzChangeFullscreenDisplayMode:2168] Changing fullscreen mode to [0] 0x0
info    |13:44:56: [wzChangeFullscreenDisplayMode:2207] Getting desktop display mode
info    |13:44:56: [createGLContext:185] Requested OpenGL 3.3 context
info    |13:44:56: [initGLContext:3422] OpenGL Vendor: NVIDIA Corporation
info    |13:44:56: [initGLContext:3425] OpenGL Renderer: NVIDIA GeForce RTX 3080/PCIe/SSE2
info    |13:44:56: [initGLContext:3428] OpenGL Version: 3.3.0 NVIDIA 550.67
info    |13:44:56: [initGLContext:3641] Success
info    |13:44:56: [_initialize:3232]   * Instanced rendering support was detected
info    |13:44:56: [initTerrainShaderType:2527] Defaulting terrain quality to: High
info    |13:44:56: [rebuildSearchPath:794] Loaded terrain overrides from: /usr/share/warzone2100/

The glxinfo can be found here.
It was captured form within the Tumbleweed distrobox container. As the distrobox shares the driver with the host OS it should be identical.

Is there a way of running glxinfo inside the flatpak environment of WZ2100?

Running it from an X11 session as flatpak does in fact work as well.
Switching back to Wayland after the successful launch using X11 it results again in the reported errors above.

@VortexAcherontic
Copy link
Author

VortexAcherontic commented Mar 24, 2024

Found the issue I think. By default WZ2100 is allowed to run on Wayland or XWayland and will favor native Wayland. Which seems not to work with the default OpenGL renderer. Restricting access to Wayland using flatseal in order to force it to run on XWayland works.

Forced Wayland:

flatpak run net.wz2100.wz2100 
info    |13:57:56: [rebuildSearchPath:836] Failed to load expected terrain quality overrides: terrain_overrides/high
info    |13:57:56: [rebuildSearchPath:794] Loaded terrain overrides from: /app/share/warzone2100/
info    |13:57:57: [wzChangeFullscreenDisplayMode:2168] Changing fullscreen mode to [0] 2560x1440
info    |13:57:57: [createGLContext:185] Requested OpenGL 3.3 context
fatal   |13:57:57: [createGLContext:192] OpenGL initialization did not give double buffering! (0)
fatal   |13:57:58: [createGLContext:193] Double buffering is required for this game!
error   |13:57:58: [_initialize:3218] Failed to create OpenGL context
fatal   |13:57:58: [wzMainScreenSetup:3251] gfx_api::context::get().initialize failed for backend: opengl

Forced XWayland:

flatpak run net.wz2100.wz2100 
info    |13:58:02: [rebuildSearchPath:836] Failed to load expected terrain quality overrides: terrain_overrides/high
info    |13:58:02: [rebuildSearchPath:794] Loaded terrain overrides from: /app/share/warzone2100/
info    |13:58:02: [wzChangeFullscreenDisplayMode:2168] Changing fullscreen mode to [0] 2560x1440
info    |13:58:02: [createGLContext:185] Requested OpenGL 3.3 context
info    |13:58:02: [initGLContext:3422] OpenGL Vendor: NVIDIA Corporation
info    |13:58:02: [initGLContext:3425] OpenGL Renderer: NVIDIA GeForce RTX 3080/PCIe/SSE2
info    |13:58:02: [initGLContext:3428] OpenGL Version: 3.3.0 NVIDIA 550.67
info    |13:58:02: [initGLContext:3641] Success
info    |13:58:02: [_initialize:3232]   * Instanced rendering support was detected
sh: line 1: xdg-mime: command not found

@VortexAcherontic VortexAcherontic changed the title Flatpak version does not run with OpenGL Flatpak version does not run with OpenGL on native Wayland Mar 24, 2024
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

2 participants