You are not logged in.

#1 2022-05-23 21:56:10

LxMaD
Member
Registered: 2022-05-23
Posts: 5

[Solved] black login-screen and CSGO crashing for nvidia prime

Hey everyone,

I recently changed to arch with my gaming notebook and I'm slowly getting everything to work. I followed the wiki guide for the standard installation. Since my notebook uses a nvidia GTX 860m I tried getting nvidia prime to run according to the wiki:  Prime article. I have an Intel iGPU. I ran pacman -Syu.

The first game that gave me some problems was CSGO. I realized that this will only work with X11 instead of wayland and got it running consistently on my notebook screen. Now I want to get it working on the main screen I use which is connected via HDMI (only the only display output on this device). Just running "prime-run" only works sometimes, sometimes the game opens with a black screen and closes after a few seconds. I hoped the solution to be the "Discrete card as primary GPU" section of the linked wiki as the Intel iGPU probably causes problems on this setup (as far as I understood the nvidia-GPU outputs over HDMI). How ever the game opening is still inconsistent.

So I really have two problems: I need to find out what causes CSGO close (presumably crash) on startup. I don't know how to log the steam launch of CSGO to find potential problems. Are there system logs that would catch such a behavior? I searched for steam logs but couldn't really find decent resources. There is a proton-log command but CSGO doesn't run through proton. Is there any other logging I can run as a start parameter of CSGO?

I now also have the problem that my KDE Plasma login screen has both the internal screen on my notebook and the external HDMI screen completely disabled. Once I enter the password and hit enter everything loads and works as expected. I couldn't find any fixes, most problems other users had started after the login screen... I assume this is caused by the modified "/etc/X11/xorg.conf.d/10-gpu.conf" that the article called for. Is there a way to only load it after the login screen? I tried adding "nomodeset" to my grub config but that resulted in arch not booting at all. Are there any components missing that makes this fail and where would I load the components? I could maybe try and revert back the xorg config but understand what went wrong would probably be a lot more helpful.

If you need any additional information please let me know.

My xorg config in

/etc/X11/xorg.conf.d/10-gpu.conf
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier  "nvidia"
    Driver      "nvidia"
    BusID       "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
    Identifier  "intel"
    Driver      "modesetting"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

And the xinitrc according to the nvidia guide:

.xinitrc
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

There seems to be a pattern to CSGO crashing (if that helps): If the game doesn't open there are two outcomes: 1) It closes fast and I can click "play" right away. If that happens it seems like the game will launch successfully next time I try (directly after the last attempt). 2) It takes a little bit longer to close and will need a manual "interrupt" with the steam UI. The next time I tried to launch the game it wouldn't work.

Last edited by LxMaD (2022-05-31 15:52:25)

Offline

#2 2022-05-24 00:43:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,714

Re: [Solved] black login-screen and CSGO crashing for nvidia prime

For the first problem and for potential analysis of what's happening with CSGO run steam in a terminal, produce the crash, post the output

For the second problem, your .xinitrc adjustment is not read by the majority of display managers, assuming you're using SDDM see the relevant section in https://wiki.archlinux.org/title/NVIDIA … y_managers for loading startup scripts for SDDM

Offline

#3 2022-05-25 15:07:38

LxMaD
Member
Registered: 2022-05-23
Posts: 5

Re: [Solved] black login-screen and CSGO crashing for nvidia prime

Thank you so much for the helpful hints! I was able to fix the login problem easily - I just didn't read far enough...

The CSGO issue turned out to be more complicated. I wrote down the steps I took in order to a) maybe troubleshoot and b) more importantly others might stumble upon this thread and might just have the "CSGO not starting" issue. The new problem is marked in bold further down.
Running steam by console did help in searching. The logs are fairly identical until the point where a crash occurs:

Fontconfig warning: "/home/username/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/panorama/fonts/conf.d/41-repl-os-win.conf", line 160: Having multiple values in <test> isn't supported and may not work as expected
ERROR: ld.so: object '/home/username/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
crash_20220524191231_2.dmp[2039]: Uploading dump (out-of-process)
/tmp/dumps/crash_20220524191231_2.dmp
/home/username/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo.sh: line 88:  1982 Bus error               (core dumped) ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

(process:1989): GLib-GObject-CRITICAL **: 19:12:43.659: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
src/steamexe/main.cpp (253) : Assertion Failed: reaping pid: 1989 -- gameoverlayui

src/steamexe/main.cpp (253) : Assertion Failed: reaping pid: 1989 -- gameoverlayui

assert_20220524191039_35.dmp[1941]: Finished uploading minidump (out-of-process): success = no
assert_20220524191039_35.dmp[1941]: error: HTTP response code said error
assert_20220524191039_35.dmp[1941]: file ''/tmp/dumps/assert_20220524191039_35.dmp'', upload no: ''HTTP response code said error''
Game process removed: AppID 730 "/home/username/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=730 -- '/home/username/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo.sh' -steam", ProcID 1982

The only difference I could spot from another successful log was the "ELFCLASS32" message instead of "ELFCLASS64". The wiki however states that this warning could be ignored altogether.

Based on other searches I found people using "ldd csgo_linux64" in ".steam/steam/steamapps/common/Counter-Strike Global Offensive/":

$ ldd csgo_linux64
        linux-vdso.so.1 (0x00007ffee05e6000)
        libtcmalloc_minimal.so.0 => not found
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f0a87fec000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f0a87ddf000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f0a8802b000)

Plenty of other people seem to have had problems with the libtcmalloc library and CSGO. Just installing the gpertools package didn't solve the issue for me, trying to link it in "/etc/environment" as "libtcmalloc_minimal.so.0=/usr/lib/libtcmalloc_minimal.so" didn't seem to help either. I also tried running CSGO with the steam start parameter "env libtcmalloc_minimal.so.0=/usr/lib/libtcmalloc_minimal.so %command%" just to see what sticks but none of those seemed to change the behavior (forgive me for the weird attempts of linking the library, I've never had to do that and I didn't find a guide that I was able to follow). I installed the "steam-native-runtime"-package and ran steam-native instead of steam-runtime but that didn't change the behavior for me.
I stumbled upon this post and applied it to my system like this:

cd ~/.steam/steam/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64/
mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.bak
cp /usr/lib64/libtcmalloc_minimal.so.4.5.9 libtcmalloc_minimal.so.0

The kernel message of the missing library seemed to disappear after that and the game launches every time so far. I got a warning in dmesg concerning panorama which people fixed by using renaming "~/.steam/steam/steamapps/common/Counter-Strike\ Global\ Offensive/csgo/panorama/videos/" to "videos.bak" and running the launch option "-novid". I reenabled it today because of another problem I now have but it doesn't seem to cause any further problems for some reason.

The problem I am now facing: I get great fps and responsiveness in menu, but once I join a server or practice with bots my fps goes down to below 10 (usually I get around 100) and it feels like I also have insane input lag. Weirdly this doesn't happen everytime I join some server. It might also not happen the first time I join one but can happen after one or multiple games. Once I return to main menu the fps and responsiveness is back until I join back into a game. It hasn't "healed" itself once the bad fps occurred but I can't rule it out completely (maybe after x times rejoining a server, only ever tried 5 times before restart I think). I already searched quite a bit but haven't found the solution yet. Maybe one of you heard about this problem before or has an idea how to diagnose (since apparently something happens well after the start of the application).
The console-ran steam doesn't output anything I could identify as useful to when this does or does not happen. I basically get this repeating whenever I join a server (online or with bots)

[S_API] SteamAPI_Init(): Loaded '/home/username/.local/share/Steam/linux64/steamclient.so' OK.
CAppInfoCacheReadFromDiskThread took 12 milliseconds to initialize
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  MyID [API loaded yes]
SteamInternal_SetMinidumpSteamID:  Setting Steam ID:  MyID
Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)
[S_API] SteamAPI_Init(): Loaded '/home/username/.local/share/Steam/linux64/steamclient.so' OK.
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  MyID [API loaded yes]
SteamInternal_SetMinidumpSteamID:  Setting Steam ID:  MyID
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit

This time my game crashed after I clicked close, maybe this is kind of a lead:

ERROR: ld.so: object '/home/username/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
crash_20220525163417_21.dmp[5188]: Uploading dump (out-of-process)
/tmp/dumps/crash_20220525163417_21.dmp
/home/username/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo.sh: line 88:  4805 Segmentation fault      (core dumped) ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

(process:4812): GLib-GObject-CRITICAL **: 16:35:06.617: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
src/steamexe/main.cpp (253) : Assertion Failed: reaping pid: 4812 -- gameoverlayui

src/steamexe/main.cpp (253) : Assertion Failed: reaping pid: 4812 -- gameoverlayui

Installing breakpad exception handler for appid(steam)/version(1653101165)
assert_20220525163516_32.dmp[5227]: Uploading dump (out-of-process)
/tmp/dumps/assert_20220525163516_32.dmp
assert_20220525163516_32.dmp[5227]: Finished uploading minidump (out-of-process): success = yes
assert_20220525163516_32.dmp[5227]: response: CrashID=ID
assert_20220525163516_32.dmp[5227]: file ''/tmp/dumps/assert_20220525163516_32.dmp'', upload yes: ''CrashID=ID''
$ sudo dmesg | grep csgo
[10066.031760] traps: csgo_linux64[4805] general protection fault ip:7f2ed7527032 sp:7ffea2980ff0 error:0 in libc.so.6[7f2ed74c1000+17a000]
[10066.031804] audit: type=1701 audit(1653489257.817:150): auid=1001 uid=1001 gid=1001 ses=2 pid=4805 comm="csgo_linux64" exe=longstringofnumbersandlettersIshortened sig=11 res=1

Offline

#4 2022-05-31 15:50:46

LxMaD
Member
Registered: 2022-05-23
Posts: 5

Re: [Solved] black login-screen and CSGO crashing for nvidia prime

I think I managed to fix the issue. Here is what I did:

I ended up rolling back the xorg changes that I did. While everything ran on the nvidia GPU some wine games wouldn't start for some reason. There probably was some kind of missconfiguration on my part but the fact that the intel-GPU was pretty much doing nothing except outputting the images didn't feel great. Now I don't have any manual xorg changes, when I did "nvidia-xconfig" after having removed all previous configs my plasma didn't open so I deleted the config once again: I went to another terminal with Ctrl+Alt+F2, logged in and did

sudo rm -i /etc/X11/xorg.conf

Through some long searches I found that the "xf86-video-intel" package isn't generally recommended. There was advice on which drivers to install as well, so I ended up removing "xf86-video-intel" and adding "lib32-mesa" and "vulkan-intel" (my iGPU barely supports it). I think I installed it based on the prime render offload guide mentioning it without further mentioning the linked intel graphics article above. If you are having issues maybe take a look at what nvidia and intel drivers you have installed and if there are any possible incompatibilities that your guide didn't mention.

The game doesn't feel as responsive as on windows, I attempted to enable DRM and thus activate prime sync but while the module seems to be loaded I don't see any noticeable difference in gaming. I'll dig a little further and maybe open another thread if I get stuck. Some helpful resources if you need to check the DRM situation:A thread on the nvidia forums and the kernel module article. If you are wondering why your nvidia-settings is missing some options apparently this is due to the prime render offload mode (saw this in some nvidia forum thread). Maybe this is the clue that these changes have to be changed in the intel driver but I haven't had time to read up on that.

Now the problem seems to be solved most of the time. Sometimes CSGO still will take an additional attempt to open and sometimes it crashes when closing it. The performance also isn't on par with windows (about 10-20 fps less on my system) but that would bloat this thread even more than I've already done. Lutris currently seems to have a bug (already known) where the prime-run option doesn't work but you can work around the by opening lutris in terminal, starting your game and then copying the wine-command from there to add the "prime-run". Hope all of this will help someone.

Offline

Board footer

Powered by FluxBB