Failure to open libpangoft2 causes crash on SDL_VIDEODRIVER=wayland
Due to the current update of cs2 dropping mouse inputs for me in xwayland I have opted to edit the cs2.sh file and make it run in wayland natively. After the edit, the game would randomly crash when opening the buy menu. After some investigation I was getting this error when the crash would occur in the shell:
wp_linux_drm_syncobj_surface_v1#63: error 3: Missing buffer
ERROR: Wayland display connection closed by server (fatal)
zenity: symbol lookup error: /lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: pango_font_family_get_face
After closer look there seemed to be two libraries failing to load in when the game boots up: libpangoft2 and renderdoc. I looked in the .local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/ directory for libpangoft2-1.0.so as it was named in the logs. I only found libpangoft2-1.0.so.0. I tried copying the file to libpangoft2-1.0.so and the library load error went away. The crashes have not happened since. There are new errors that are appearing: Pango-CRITICAL **: 17:19:11.365: pango_layout_line_get_x_ranges: assertion 'start_index <= end_index' failed. I believe these are in place of the zenity: symbol lookup error: /lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: pango_font_family_get_face which at least does something with the buffer the font was meant to go into so that the graphics stack doesn't explode.
I would appreciate it if this issue was fixed so that others may also run the game natively in wayland.
Thanks, Russell Hynes
Hello @atomicf32,
Unfortunately I don't think there is anything here that clearly indicates an issue with CS2. I would suggest investigating the cause for your wayland compositor crash directly. Depending on your system configuration you may be saving core dumps that should be reported upstream (coredumpctl).
After a couple days of no crashes I finally crashed again. I was able to see that I am saving coredumps. Is there any particular tool I should use to inspect these?
That's very dependent on your distribution and system setup. In a developer friendly environment coredumpctl debug <id> should be enable to get a backtrace. You may have a variety of things that are crashing, the compositor may be the most upstream thing that would need figuring out.
Here is my output from backtrace full in gdb:
(gdb) backtrace full
#0 0x0000742c2218bdbe in ?? ()
from /home/atomicptr/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libtier0.so
No symbol table info available.
#1 0x0000742c15177dee in ?? ()
from /home/atomicptr/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/librendersystemvulkan.so
No symbol table info available.
#2 0x00007ffdda8513a0 in ?? ()
No symbol table info available.
#3 0x00007ffdda8513d0 in ?? ()
No symbol table info available.
#4 0x00000000000009fd in ?? ()
No symbol table info available.
#5 0x00007ffdda851460 in ?? ()
No symbol table info available.
#6 0x0000742c2218e68f in ?? ()
from /home/atomicptr/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libtier0.so
No symbol table info available.
#7 0x00007ffdda850810 in ?? ()
No symbol table info available.
#8 0x0000742c227a2cdc in ?? ()
No symbol table info available.
#9 0x7753657461657243 in ?? ()
No symbol table info available.
#10 0x286e696168437061 in ?? ()
No symbol table info available.
#11 0x73206568540a3a29 in ?? ()
No symbol table info available.
#12 0x2064657463656c65 in ?? ()
No symbol table info available.
#13 0x7363696870617267 in ?? ()
No symbol table info available.
#14 0x6420657565757120 in ?? ()
No symbol table info available.
#15 0x20746f6e2073656f in ?? ()
No symbol table info available.
#16 0x2074726f70707573 in ?? ()
No symbol table info available.
#17 0x69746e6573657270 in ?? ()
No symbol table info available.
#18 0x617773206120676e in ?? ()
No symbol table info available.
#19 0x69206e6961686370 in ?? ()
No symbol table info available.
#20 0x00000a2e6567616d in ?? ()
No symbol table info available.
#21 0x0000000000000000 in ?? ()
No symbol table info available.
Could librendersystemvulkan.so be related to my compositor?
I would assume this is simply CS2's fatal error after your wayland compositor has given up, assuming you are still seeing wp_linux_drm_syncobj_surface_v1#63: error 3: Missing buffer and ERROR: Wayland display connection closed by server (fatal).
You haven't provided any information on your distribution and environment. We recommend KDE Plasma and the kwin compositor. If you are looking for a good distribution for gaming, EndeavourOS may be a good pick. There's always Ubuntu of course.
I am running Hyprland. Is this a known problematic compositor?
Yes, there are several issues with Hyprland. We do not recommend it.
I had the same issue, and in addition to libpangoit complained about not being able to load librenderdoc.so. I'm on fedora42, using sway, running flatpak steam. I installed renderdoc and copied the lib to the game folder and haven't seen a crash since. I'm not sure why these missing libraries would lead to cs2 crashing though, but it seemed to have helped.