Source-1-Games
Source-1-Games copied to clipboard
[TF2] Game launches to black screen using Wayland and NVIDIA drivers
Trying to launch TF2 on Wayland only presents the user with a black screen, while X11 does not exhibit the same issues. I've tried loading a newer SDL into the game to see if it was an issue with that, which did not help. Setting SDL_VIDEODRIVER=wayland created a buggy mess with rapidly increasing brightness on the menus.
I am using Arch Linux and GNOME, tried both 41 and the 42 beta to see if there was any difference. NVIDIA driver version is 510.54. Using Steam Native or Runtime makes no difference, along with the container.
Hardware info
Computer Information: Manufacturer: Gigabyte Technology Co., Ltd. Model: Z370M DS3H-CF Form Factor: Desktop No Touch Input DetectedProcessor Information: CPU Vendor: GenuineIntel CPU Brand: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz CPU Family: 0x6 CPU Model: 0x9e CPU Stepping: 0xa CPU Type: 0x0 Speed: 4700 Mhz 12 logical processors 6 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Unsupported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported AVX2: Supported AVX512F: Unsupported AVX512PF: Unsupported AVX512ER: Unsupported AVX512CD: Unsupported AVX512VNNI: Unsupported SHA: Unsupported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported
Operating System Version: "Arch Linux" (64 bit) Kernel Name: Linux Kernel Version: 5.16.13-247-tkg-pds X Server Vendor: The X.Org Foundation X Server Release: 12201000 X Window Manager: GNOME Shell Steam Runtime Version: steam-runtime_0.20220119.0
Video Card: Driver: NVIDIA Corporation NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 Driver Version: 4.6.0 NVIDIA 510.54 OpenGL Version: 4.6 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 143 Hz VendorID: 0x10de DeviceID: 0x1c03 Revision Not Detected Number of Monitors: 2 Number of Logical Video Cards: 1 Primary Display Resolution: 1920 x 1080 Desktop Resolution: 3840 x 1080 Primary Display Size: 20.87" x 11.81" (23.98" diag) 53.0cm x 30.0cm (60.9cm diag) Primary VRAM: 6144 MB
Sound card: Audio device: Loopback Mixer
Memory: RAM: 15947 MB
VR Hardware: VR Headset: None detected
Miscellaneous: UI Language: English LANG: en_US.UTF-8 Total Hard Disk Space Available: 459962 MB Largest Free Hard Disk Block: 21092 MB
Storage: Number of SSDs: 0 Number of HDDs: 0
Same, I tried with both the new open source NVIDIA the proprietary NVIDIA drivers Both have exactly the same results, so it doesn't seem to be just a driver issue.
I have the same problem; Tested this on open source drivers and proprietary drivers with Portal 2, CS:GO and TF2.
CS:GO and TF2 both launch to black screen. Steam overlay also seemed to be screwed up in that rendered elements would linger, creating a mess of text in FPS counter and notification pop ups.
Portal 2 also had this problem, however, switching to Vulkan using -vulkan
fixes all issues, and the game runs perfectly.
My conclusion is that this is either an OpenGL/SDL issue, or a nvidia driver issue.
Somebody once told me that using MangoHUD would fix the problem, but in my experience it does nothing. MangoHUD itself did however render perfectly.
For CS:GO, launching the game with -vulkan
like Portal, Portal 2 and L4D2 fixes all issues.
HOWEVER: TF2 uses ToGL on both Mac and Linux. And ToGL runs poorly in general, especially compared to DXVK.
Portal has the same issue, because it uses ToGL as well. Tho this issue is fixed as we use DXVK.
Basically: The game stops refreshing the screen because of ToGL on wayland. So we need a DXVK implementation in the game like we saw with HL2(+EPs), Portal, Portal 2, CSGO and L4D2 for the game to work properly on Wayland.
Somebody once told me that using MangoHUD would fix the problem, but in my experience it does nothing. MangoHUD itself did however render perfectly.
Well Mangohud is basically a tool that shows information about your system and the window it's displayed on. It doesn't fix things, tho it might help you doing it (that's how i discovered the TF2 issue).
forgot to update his, but i've found a workaround. currently, by using native SDL (as described here) along with SDL_VIDEODRIVER=x11
and disabling anti aliasing, this issue is doesn't reoccur for me and the game plays as expected
forgot to update his, but i've found a workaround. currently, by using native SDL (as described here) along with
SDL_VIDEODRIVER=x11
and disabling anti aliasing, this issue is doesn't reoccur for me and the game plays as expected
Could you share your video config file please ? (videoconfig_linux.cfg
)
forgot to update his, but i've found a workaround. currently, by using native SDL (as described here) along with
SDL_VIDEODRIVER=x11
and disabling anti aliasing, this issue is doesn't reoccur for me and the game plays as expected
This is not working for me. SDL2.26.4 is pinned in pinned_libs_32 and TF2 is started with SDL_VIDEODRIVER=x11
set.
I'm on NixOS unstable (Kernel version 6.1.20 (64-bit))and using KDE Plasma 5.27.3 with Wayland and proprietary Nvidia 525.89.02.
TF2 still just opens to a black screen and closes almost immediately.
The process logs the following to stderr:
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 12581 != 12580, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
SDL video target is 'x11'
SDL video target is 'x11'
Using Breakpad minidump system. Version: 7932396 AppID: 440
Setting breakpad minidump AppID = 440
Using breakpad crash handler
[S_API] SteamAPI_Init(): Loaded '/home/myuser/.local/share/Steam/linux32/steamclient.so' OK.
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Installing breakpad exception handler for appid(440)/version(7932396)/tid(12584)
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
SteamInternal_SetMinidumpSteamID: Caching Steam ID: mysteamid [API loaded yes]
SteamInternal_SetMinidumpSteamID: Setting Steam ID: mysteamid
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
crash_20230323224318_2.dmp[12614]: Uploading dump (out-of-process)
/tmp/dumps/crash_20230323224318_2.dmp
crash_20230323224318_2.dmp[12614]: Finished uploading minidump (out-of-process): success = yes
crash_20230323224318_2.dmp[12614]: response: CrashID=bp-dee318f6-d3c5-45ca-8429-9e1b12230323
crash_20230323224318_2.dmp[12614]: file ''/tmp/dumps/crash_20230323224318_2.dmp'', upload yes: ''CrashID=bp-dee318f6-d3c5-45ca-8429-9e1b12230323''
pid 12614 != 12613, skipping destruction (fork without exec?)
/home/myuser/.local/share/Steam/steamapps/common/Team Fortress 2/hl2.sh: line 72: 12584 Segmentation fault (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
For comparison stderr when starting TF2 on X11:
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 18094 != 18093, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/myuser/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
SDL video target is 'x11'
SDL video target is 'x11'
Using Breakpad minidump system. Version: 7932396 AppID: 440
Setting breakpad minidump AppID = 440
Using breakpad crash handler
[S_API] SteamAPI_Init(): Loaded '/home/myuser/.local/share/Steam/linux32/steamclient.so' OK.
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Installing breakpad exception handler for appid(440)/version(7932396)/tid(18096)
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
SteamInternal_SetMinidumpSteamID: Caching Steam ID: mysteamid [API loaded yes]
SteamInternal_SetMinidumpSteamID: Setting Steam ID: mysteamid
Loaded program cache file "glbaseshaders.cfg", total keyvalues: 2227, total successfully linked: 2227
Loaded program cache file "glshaders.cfg", total keyvalues: 2845, total successfully linked: 2845
Precache: Took 2773 ms, Vertex 214, Pixel 1784
server.so loaded for "Team Fortress"
Installing breakpad exception handler for appid(hl2_linux)/version(1.0)/tid(18200)
Errors regarding gameoverlayrenderer.so seem to be generally harmless, according to this issue. In my case, though, such an error is the first line where the Wayland and X11 logs differ. Still not sure if that is actually the cause of the crash...
proprietary Nvidia 525.89.02
that's your problem. this issue is a bit outdated now, as tf2 with wayland is completely broken on nvidia driver versions >= 525 (see https://github.com/ValveSoftware/Source-1-Games/issues/4553). using a native sdl library or pinning the one in the runtime will only work for driver versions lower than that. the only thing you can do currently is downgrade (i'd recommend pinning this nixpkgs commit if you are) or play on x11
Errors regarding gameoverlayrenderer.so seem to be generally harmless, according to https://github.com/ValveSoftware/steam-for-linux/issues/31.
that issue is correct
Thanks for the tip @getchoo. I didn't get around to downgrading my driver over the week, but luckily upgrading to driver version 530.41.03 today fixed the problem as well, with the caveats that I need to set SDL_VIDEODRIVER and disable anti-aliasing.
can confirm as well, seems like this issue can be closed now 👍🏻
According to https://docs.mastercomfig.com/latest/os/linux/#game-crashes-when-using-a-nvidia-card, the problem was fixed in the driver version 530.41.03.
Current and latest version is 550.67.
Needs to be retested.
Closing as fixed in the video driver.