Skip to content

OpenGL not working in Proton #148483

Closed

Description

@jansol

Describe the bug

CloudBuilt (AppID 262390) fails to launch. It uses OpenGL but does not have a native Linux build so it runs via Proton. I can't remember any other game off the top of my head that I know to use OpenGL 3.2 and not have a Linux build but I imagine they would also be affected.

Some suspicious lines from the journal right before Proton throws an "abort/retry/ignore" dialog and the game dies:

pressure-vessel-wrap[117646]: W: Found more than one possible libdrm data directory from provider
SDL_CreateWindow Error: No matching GL pixel format available
SDL_GetWindowWMInfo Error: Invalid window
Not Windows, this should be handledSDL_GetWindowWMInfo Error: Invalid window
Failed to initialize OpenGL
Initiated OpenGL
Error: OpenGL 3.2 not supported

Additional context

This used to be working just fine, some change in the last 6 months broke it. Also it works with Proton 5.0 so it seems to be specifically changes related to running Proton with the newer Soldier runtime.

Notify maintainers

@jonringer

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.14.21, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(root): `"nixos-22.05pre334855.29d1f6e1f62"`
 - channels(jansol): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: steam
# a list of nixos modules affected by the problem
module:

Activity

  1. added
    0.kind: bug
    6.topic: steam
    on Dec 3, 2021
  2. from-nibly commented on Dec 13, 2021

    @from-nibly

    Also having this same issue specifically with the game freeways.

  3. tfc commented on Dec 28, 2021

    @tfc
    Contributor

    i also get a similar error message where i think it's the same problem with the "unmetal" demo via steam. It says "ChoosePixelFormat failed" and googling that error message hints towards a lack of opengl contexts.

  4. AtilaSaraiva commented on Jan 19, 2022

    @AtilaSaraiva
    Contributor

    I'm having the same problem with the game Move or Die. I started using the flatpak version and it worked fine.

  5. jonringer commented on Apr 19, 2022

    @jonringer
    Contributor

    Is this still relevant? I have made many fixes since this was opened.

  6. AtilaSaraiva commented on Apr 19, 2022

    @AtilaSaraiva
    Contributor

    Oh nice, I will test it out.

  7. jansol commented on Apr 19, 2022

    @jansol
    ContributorAuthor

    This particular problem persists on nixos-unstable as of 1ffba9f2f683

  8. jonringer commented on Apr 19, 2022

    @jonringer
    Contributor

    which video card manufacturer do you have? for nvidia, can you try enabling modeset?

  9. jansol commented on Apr 20, 2022

    @jansol
    ContributorAuthor

    The card is an AMD Radeon RX 6600XT, using the mesa driver.

  10. jansol commented on Jul 4, 2022

    @jansol
    ContributorAuthor

    Still broken, also affects the Cyberpunk 2077 launcher

  11. SuperSamus commented on Jul 10, 2022

    @SuperSamus
    Contributor

    Other than confirming the problem, there is another issue with both Proton and regular Wine: they are unable to use WineD3D (translation layer from Direct3D to OpenGL).
    EDIT: Only Proton, not Wine.

    You can test on Proton with by adding the launch options: PROTON_USE_WINED3D=1 %command%.
    You can test on Wine by... not installing DXVK (which is necessary because of this issue).

    Using an AMG iGPU with Mesa.

  12. halturin commented on Jul 11, 2022

    @halturin

    not sure if its related, but got this error on trying to start Cyberpunk 2077
    image

    ❯❯❯❯ nix-shell -p nix-info --run "nix-info -m"                                 
     - system: `"x86_64-linux"`
     - host os: `Linux 5.18.9, NixOS, 22.11 (Raccoon), 22.11pre390544.b39924fc776`
     - multi-user?: `yes`
     - sandbox: `yes`
     - version: `nix-env (Nix) 2.9.1`
     - channels(root): `"nixos"`
     - channels(taras): `"home-manager"`
     - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
    
    ❯❯❯❯ nix-shell -p glmark2 --run "glmark2"
    =======================================================
        glmark2 2021.12
    =======================================================
        OpenGL Information
        GL_VENDOR:     AMD
        GL_RENDERER:   AMD Radeon RX 6800 XT (sienna_cichlid, LLVM 13.0.1, DRM 3.46, 5.18.9)
        GL_VERSION:    4.6 (Compatibility Profile) Mesa 22.1.1
    =======================================================
    [build] use-vbo=false: FPS: 10010 FrameTime: 0.100 ms
    
  13. plabadens commented on Jul 11, 2022

    @plabadens
    Contributor

    The CDPR launcher requires OpenGL, even though the game itself doesn't. You can work around the launcher crashing by adding --launcher-skip to the Steam command line options, and that should start the game directly.

  14. jansol commented on Jul 11, 2022

    @jansol
    ContributorAuthor

    That does indeed work around the problem for that game, but the launcher is an easy way to reproduce the issue with a decently popular title so it is good to have listed here.

  15. halturin commented on Jul 11, 2022

    @halturin

    I think I know why it can't reach these libs...

    ❯❯❯❯ steam                                                                                                          
    steam.sh[180052]: Running Steam on nixos 22.11 64-bit                                                               
    steam.sh[180052]: STEAM_RUNTIME is enabled automatically                                                            
    setup.sh[180135]: Steam runtime environment up-to-date!                                                             
    run.sh[180147]: Warning: An unexpected error occurred while executing "/sbin/ldconfig -XNv", the exit status was 127
    steam.sh[180052]: Steam client's requirements are satisfied                                                         
    

    run.sh must be patched.

  16. jansol commented on Jul 11, 2022

    @jansol
    ContributorAuthor

    I suspect this is about the ldconfig database again. There was a lot of fiddling with that in the past too.

  17. ashkitten commented on Aug 2, 2022

    @ashkitten
    Contributor

    so, i messed around a bit with this issue today. it turns out, adding /run/opengl-driver{,32}/lib to ld.so.conf seems to work... for 64-bit games (i tested with cs:go)

    running ldconfig from steam-run spews out a bunch of stuff about libraries being truncated:

    Details
    $ ldconfig
    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: Can't link /lib/p11-kit-trust.so to libnssckbi.so
    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /lib32/libGLX.so is truncated
    

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /lib32/libGLX.so.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /lib32/libGLX.so.0.0.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /lib32/libSDL2-2.0.so.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /lib32/libSDL2-2.0.so.0.22.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /lib32/libSDL2.so is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: Can't link /lib32/p11-kit-trust.so to libnssckbi.so
    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libEGL_mesa.so is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libEGL_mesa.so.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libEGL_mesa.so.0.0.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libGLX_mesa.so is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libGLX_mesa.so.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libGLX_mesa.so.0.0.0 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libvulkan_intel.so is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libvulkan_lvp.so is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libvulkan_radeon.so is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libxatracker.so is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libxatracker.so.2 is truncated

    /nix/store/rb2yfmzdciahc6czkh7s4gaj8m56zkbr-glibc-2.34-210-bin/bin/ldconfig: file /run/opengl-driver-32/lib/libxatracker.so.2.5.0 is truncated

    i'm not sure why it's saying this; it seems similar to this issue, but that issue was resolved in glibc 2.31 (we're on 2.34), and this also only seems to affect 32-bit libraries. i tried to run ldconfig under a debugger, but due to optimization i wasn't able to figure out anything useful even with symbols from glibc.debug.

  18. ashkitten commented on Aug 2, 2022

    @ashkitten
    Contributor

    #184842 should fix this issue. please test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug6.topic: steam

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions