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

[TF2][Linux] Failed to create SDL window: Couldn't find matching GLX visual #3455

Closed
callec opened this issue Dec 8, 2020 · 11 comments
Closed

Comments

@callec
Copy link

callec commented Dec 8, 2020

TF2 crashes on launch with the message Failed to create SDL window: Couldn't find matching GLX visual. Counter Strike Source does the same. This started happening after a steam client update today, it worked fine yesterday. I have tried #2866 (comment) to fix but it did not work.

uname -a:

Linux nixos 5.8.18 #1-NixOS SMP Sun Nov 1 11:45:43 UTC 2020 x86_64 GNU/Linux
strace steam gives this on launch of tf2
GameAction [AppID 440, ActionID 2] : LaunchApp changed task to ProcessingInstallScript with ""
GameAction [AppID 440, ActionID 2] : LaunchApp changed task to SynchronizingCloud with ""
GameAction [AppID 440, ActionID 2] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 440, ActionID 2] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 440, ActionID 2] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 440, ActionID 2] : LaunchApp continues with user response "CreatingProcess"
Game update: AppID 440 "", ProcID 467, IP 0.0.0.0:0
ERROR: ld.so: object '/home/carl/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carl/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Starting app 440
>>> Adding process 467 for game ID 440
GameAction [AppID 440, ActionID 2] : LaunchApp changed task to WaitingGameWindow with ""
pid 469 != 468, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/carl/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/carl/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
GameAction [AppID 440, ActionID 2] : LaunchApp changed task to Completed with ""
>>> Adding process 468 for game ID 440
SDL video target is 'x11'
SDL video target is 'x11'
Failed to create SDL window: Couldn't find matching GLX visual>>> Adding process 470 for game ID 440
>>> Adding process 471 for game ID 440
system information
Computer Information:
    Manufacturer:  Unknown
    Model:  Unknown
    Form Factor: Desktop
    No Touch Input Detected

Processor Information:
    CPU Vendor:  AuthenticAMD
    CPU Brand:  AMD Ryzen 5 2600X Six-Core Processor           
    CPU Family:  0x17
    CPU Model:  0x8
    CPU Stepping:  0x2
    CPU Type:  0x0
    Speed:  3600 Mhz
    12 logical processors
    6 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Supported
    SSE41:  Supported
    SSE42:  Supported
    AES:  Supported
    AVX:  Supported
    AVX2:  Unsupported
    AVX512F:  Unsupported
    AVX512PF:  Unsupported
    AVX512ER:  Unsupported
    AVX512CD:  Unsupported
    AVX512VNNI:  Unsupported
    SHA:  Unsupported
    CMPXCHG16B:  Supported
    LAHF/SAHF:  Supported
    PrefetchW:  Unsupported

Operating System Version:
    "NixOS 20.09 (Nightingale)" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  5.8.18
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12008000
    X Window Manager:  KWin
    Steam Runtime Version:  <Runtime enabled>

Video Card:
    Driver:  X.Org Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)
    Driver Version:  4.6 (Compatibility Profile) Mesa 20.1.7
    OpenGL Version: 4.6
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 144 Hz
    VendorID:  0x1002
    DeviceID:  0x67df
    Revision Not Detected
    Number of Monitors:  1
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 1920 x 1080
    Primary Display Size: 20.91" x 11.77" (23.98" diag)
                                            53.1cm x 29.9cm (60.9cm diag)
    Primary VRAM: 4096 MB

Sound card:
    Audio device: ATI R6xx HDMI

Memory:
    RAM:  16032 Mb

VR Hardware:
    VR Headset: None detected

Miscellaneous:
    UI Language:  English
    LANG:  en_US.UTF-8
    Total Hard Disk Space Available:  193829 Mb
    Largest Free Hard Disk Block:  72921 Mb

"LD_* scout runtime" information:
{
  "can-write-uinput" : false,
  "steam-installation" : {
    "path" : "/home/carl/.local/share/Steam",
    "data_path" : "/home/carl/.local/share/Steam",
    "bin32_path" : "/home/carl/.local/share/Steam/ubuntu12_32",
    "steamscript_path" : "/usr/bin/steam",
    "steamscript_version" : "100061",
    "issues" : [
      "unexpected-steam-uri-handler"
    ]
  },
  "runtime" : {
    "path" : "/steamrt",
    "version" : null,
    "issues" : [
      "not-runtime",
      "unexpected-location",
      "not-in-path",
      "not-using-newer-host-libraries"
    ],
    "pinned_libs_32" : {
      "messages" : [
        "find: ‘pinned_libs_32’: No such file or directory"
      ]
    },
    "pinned_libs_64" : {
      "messages" : [
        "find: ‘pinned_libs_64’: No such file or directory"
      ]
    }
  },
  "os-release" : {
    "id" : "nixos",
    "name" : "NixOS",
    "pretty_name" : "NixOS 20.09 (Nightingale)",
    "version_id" : "20.09.1819.f41c0fc7d8e",
    "version_codename" : "nightingale"
  },
  "container" : {
    "type" : "none"
  },
  "driver_environment" : [
  ],
  "architectures" : {
    "i386-linux-gnu" : {
      "can-run" : true,
      "library-issues-summary" : [
        "unknown-expectations"
      ],
      "graphics-details" : {
        "x11/vulkan" : {
          "messages" : "ERROR: [Loader Message] Code 0 : /nix/store/ls942qvx2b63n583yg635nkgr68l456q-amdvlk-2020.Q3.4/lib/amdvlk64.so: wrong ELF class: ELFCLASS64\nERROR: [Loader Message] Code 0 : /home/carl/.local/share/Steam/ubuntu12_64/steamoverlayvulkanlayer.so: wrong ELF class: ELFCLASS64\nCannot create Vulkan instance.\nThis problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.\nERROR at /usr/src/packages/BUILD/vulkaninfo/vulkaninfo.h:642:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER\nfailed to create instance!\n",
          "renderer" : null,
          "version" : null,
          "issues" : [
            "cannot-load",
            "cannot-draw"
          ],
          "exit-status" : 1
        },
        "x11/vdpau" : {
          "renderer" : "G3DVL VDPAU Driver Shared Library version 1.0\n",
          "version" : null
        },
        "x11/vaapi" : {
          "messages" : "libva info: VA-API version 1.8.0\nlibva info: Trying to open /run/opengl-driver-32/lib/dri/radeonsi_drv_video.so\nlibva info: Found init function __vaDriverInit_1_8\nlibva info: va_openDriver() returns 0\n",
          "renderer" : "Mesa Gallium driver 20.1.7 for Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)\n",
          "version" : null
        },
        "glx/gl" : {
          "renderer" : "Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)",
          "version" : "4.6 (Compatibility Profile) Mesa 20.1.7",
          "library-vendor" : "glvnd"
        },
        "egl_x11/gl" : {
          "renderer" : "Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)",
          "version" : "4.6 (Compatibility Profile) Mesa 20.1.7",
          "library-vendor" : "glvnd"
        },
        "egl_x11/glesv2" : {
          "renderer" : "Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)",
          "version" : "OpenGL ES 3.2 Mesa 20.1.7",
          "library-vendor" : "glvnd"
        }
      },
      "dri_drivers" : [
      ],
      "va-api_drivers" : [
        {
          "library_path" : "/nix/store/zi4p40ig91n6v01wk07n9wyijqbn4m04-libva-1.7.3/lib/dri/dummy_drv_video.so"
        }
      ],
      "vdpau_drivers" : [
      ],
      "glx_drivers" : [
      ]
    },
    "x86_64-linux-gnu" : {
      "can-run" : true,
      "library-issues-summary" : [
        "unknown-expectations"
      ],
      "graphics-details" : {
        "x11/vulkan" : {
          "messages" : "ERROR: [Loader Message] Code 0 : /home/carl/.local/share/Steam/ubuntu12_32/steamoverlayvulkanlayer.so: wrong ELF class: ELFCLASS32\n",
          "renderer" : "Radeon RX 570 Series",
          "version" : "1.2.150 (device 1002:67df) (driver 2.0.155)"
        },
        "x11/vdpau" : {
          "renderer" : "G3DVL VDPAU Driver Shared Library version 1.0\n",
          "version" : null
        },
        "x11/vaapi" : {
          "messages" : "libva info: VA-API version 1.8.0\nlibva info: Trying to open /run/opengl-driver/lib/dri/radeonsi_drv_video.so\nlibva info: Found init function __vaDriverInit_1_8\nlibva info: va_openDriver() returns 0\n",
          "renderer" : "Mesa Gallium driver 20.1.7 for Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)\n",
          "version" : null
        },
        "glx/gl" : {
          "renderer" : "Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)",
          "version" : "4.6 (Compatibility Profile) Mesa 20.1.7",
          "library-vendor" : "glvnd"
        },
        "egl_x11/gl" : {
          "renderer" : "Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)",
          "version" : "4.6 (Compatibility Profile) Mesa 20.1.7",
          "library-vendor" : "glvnd"
        },
        "egl_x11/glesv2" : {
          "renderer" : "Radeon RX 570 Series (POLARIS10, DRM 3.38.0, 5.8.18, LLVM 9.0.1)",
          "version" : "OpenGL ES 3.2 Mesa 20.1.7",
          "library-vendor" : "glvnd"
        }
      },
      "dri_drivers" : [
      ],
      "va-api_drivers" : [
        {
          "library_path" : "/nix/store/gd9rpglwghz0ypg1www9i59jpwwlk2d8-libva-1.7.3/lib/dri/dummy_drv_video.so"
        }
      ],
      "vdpau_drivers" : [
      ],
      "glx_drivers" : [
      ]
    }
  },
  "locale-issues" : [
    "i18n-supported-missing",
    "i18n-locales-en-us-missing"
  ],
  "locales" : {
    "<default>" : {
      "resulting-name" : "en_US.UTF-8",
      "charset" : "UTF-8",
      "is_utf8" : true
    },
    "C" : {
      "resulting-name" : "C",
      "charset" : "ANSI_X3.4-1968",
      "is_utf8" : false
    },
    "C.UTF-8" : {
      "resulting-name" : "C.UTF-8",
      "charset" : "UTF-8",
      "is_utf8" : true
    },
    "en_US.UTF-8" : {
      "resulting-name" : "en_US.UTF-8",
      "charset" : "UTF-8",
      "is_utf8" : true
    }
  },
  "egl" : {
    "icds" : [
    ]
  },
  "vulkan" : {
    "icds" : [
      {
        "json_path" : "/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json",
        "library_path" : "/nix/store/ls942qvx2b63n583yg635nkgr68l456q-amdvlk-2020.Q3.4/lib/amdvlk64.so",
        "api_version" : "1.2.150"
      }
    ]
  },
  "desktop-entries" : [
    {
      "id" : "steam.desktop",
      "commandline" : "steam %U",
      "filename" : "/run/current-system/sw/share/applications/steam.desktop",
      "default_steam_uri_handler" : true,
      "steam_uri_handler" : true
    }
  ],
  "cpu-features" : {
    "x86-64" : true,
    "sse3" : true,
    "cmpxchg16b" : true
  }
}

"scout runtime container" is not installed.

"soldier runtime container" is not installed.

@eglaysher
Copy link

This started happening to me too. Also on nixos, exact same kernel. Also worked fine yesterday.

@carassius1014
Copy link

Sorry to mention it here but I've got a similar issue trying to start Counter-Strike Condition Zero since the last Steam client update.
My error message just says "Fatal Error: Failed to create SDL Window".

λ uname -a
Linux nixos 5.4.72 #1-NixOS SMP Sat Oct 17 08:11:24 UTC 2020 x86_64 GNU/Linux

Since it's not the Source engine so I guess the keywords here are "latest Steam update", "SDL", "NixOS".

PS: csgo works just fine.

@kisak-valve
Copy link
Member

Hello, please also bring this issue to the attention of the Steam package maintainer(s) for NixOS if it hasn't been already and link the issue report here.

@jasonwhite
Copy link

I wrote a comment at NixOS/nixpkgs#106503 (comment) describing the problem.

TLDR: Source Engine games (or at least TF2) seem to be missing an important library search path: /run/opengl-driver-32/lib. This is where libGLX_nvidia.so gets loaded from, hence the error message.

@lunyaUwU
Copy link

lunyaUwU commented Jan 31, 2023

i fixed it on my end by installing lib32-nvidia-utils
nvm

@kisak-valve
Copy link
Member

Hello, is anyone on NixOS still experiencing this issue?

@kisak-valve
Copy link
Member

Closing pending feedback.

@kisak-valve kisak-valve closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2023
@hughobrien
Copy link

hughobrien commented May 29, 2023

Looks like there's some disconnect between the steam-fhs / proton linking and nixos (which doesn't ship 32bit libs). I've hacked it to work but hopefully someone can do it properly.

cd ~/.local/share/Steam/steamapps/common/Half-Life
./hl_linux
bash: ./hl_linux: cannot execute: required file not found
file ./hl_linux
./hl_linux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.34, with debug_info, not stripped

nix-shell -p patchelf
cp hl_linux hl_linux.old
patchelf --print-interpreter hl_linux
/lib/ld-linux.so.2 # This isn't Nix-ey

# I'm sure there's a smarter way of finding the correct nix store path
find /nix/store | grep steam-fhs | grep ld-linux.so.2 | grep lib32
/nix/store/0sy4x7l94yxd59aqc4360hl37fncqi88-steam-fhs/usr/lib32/ld-linux.so.2
/nix/store/qadmzry4nm2baxd47lr0s3pnpab8lin4-steam-fhs/usr/lib32/ld-linux.so.2 # I chose this one
/nix/store/gnvpvrv7j16nqpylqbm14dk1qn6h90l4-steam-fhs/usr/lib32/ld-linux.so.2


patchelf  --set-interpreter /nix/store/qadmzry4nm2baxd47lr0s3pnpab8lin4-steam-fhs/usr/lib32/ld-linux.so.2  hl_linux
LD_LIBRARY_PATH=/nix/store/qadmzry4nm2baxd47lr0s3pnpab8lin4-steam-fhs/usr/lib32:~/.local/share/Steam/ubuntu12_32/steam-runtime/lib/i386-linux-gnu:. ./hl_linux
Using breakpad crash handler
Setting breakpad minidump AppID = 70
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Installing breakpad exception handler for appid(70)/version(8684)/tid(2568588)
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561197985962090 [API loaded yes]
Steam_SetMinidumpSteamID:  Setting Steam ID:  76561197985962090
GL_SIZES:  r:8 g:8 b:8 a:0 depth:24

@kisak-valve

@hughobrien
Copy link

Actually this also works (presumably steam-run does the patching at runtime).

LD_LIBRARY_PATH=~/.local/share/Steam/ubuntu12_32/steam-runtime/lib/i386-linux-gnu:. steam-run ./hl_linux

@hughobrien
Copy link

hughobrien commented May 29, 2023

And also, just for completeness, we can skip all of this by reminding ourselves that we use wayland and some things don't like that.

Set the game launcher to this in the steam ui and forget the other stuff.

SDL_VIDEODRIVER=x11 %command%

@kisak-valve
Copy link
Member

Hello @hughobrien, please report your findings to the Steam package maintainer(s) for NixOS.

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

No branches or pull requests

7 participants