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

OpenGL not working in Proton #148483

Closed
jansol opened this issue Dec 3, 2021 · 17 comments · Fixed by #184842
Closed

OpenGL not working in Proton #148483

jansol opened this issue Dec 3, 2021 · 17 comments · Fixed by #184842
Labels
0.kind: bug Something is broken 6.topic: steam Steam game store/launcher (store.steampowered.com)

Comments

@jansol
Copy link
Contributor

jansol commented Dec 3, 2021

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:
@jansol jansol added 0.kind: bug Something is broken 6.topic: steam Steam game store/launcher (store.steampowered.com) labels Dec 3, 2021
@from-nibly
Copy link

Also having this same issue specifically with the game freeways.

@tfc
Copy link
Contributor

tfc commented Dec 28, 2021

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.

@AtilaSaraiva
Copy link
Contributor

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

@jonringer
Copy link
Contributor

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

@AtilaSaraiva
Copy link
Contributor

Oh nice, I will test it out.

@jansol
Copy link
Contributor Author

jansol commented Apr 19, 2022

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

@jonringer
Copy link
Contributor

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

@jansol
Copy link
Contributor Author

jansol commented Apr 20, 2022

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

@jansol
Copy link
Contributor Author

jansol commented Jul 4, 2022

Still broken, also affects the Cyberpunk 2077 launcher

@SuperSamus
Copy link
Contributor

SuperSamus commented Jul 10, 2022

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.

@halturin
Copy link

halturin commented Jul 11, 2022

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

@plabadens
Copy link
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.

@jansol
Copy link
Contributor Author

jansol commented Jul 11, 2022

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.

@halturin
Copy link

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.

@jansol
Copy link
Contributor Author

jansol commented Jul 11, 2022

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

@ashkitten
Copy link
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:

$ 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.

@ashkitten
Copy link
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
Labels
0.kind: bug Something is broken 6.topic: steam Steam game store/launcher (store.steampowered.com)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants