protonscr

Steam client crashes when using Bumblebee

steamopen reviewedbumblebee
ValveSoftware/steam-for-linux#4529 · opened 2016-07-02 by rosmanov · updated 2019-06-07 · 5 comments · github
Rrosmanov 2016-07-02 github

System information

    00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
    04:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940M] (rev a2)

Installed packages:

  • x11-drivers/nvidia-drivers-361.28(X acpi driver kms multilib tools uvm -gtk3 -pax_kernel -static-libs KERNEL="linux -FreeBSD")
  • x11-misc/bumblebee-3.2.1(bbswitch VIDEO_CARDS="nvidia -nouveau") (from
    bumblebee overlay)
  • x11-base/xorg-server-1.17.4(glamor ipv6 nptl suid systemd udev xorg xvfb -dmx -doc -kdrive -libressl -minimal -selinux -static-libs -tslib -unwind -wayland -xephyr -xnest)

X11 configuration:
The only X11 configuration file is /etc/X11/xorg.conf.d/20opengl.conf:

Section "Files"
    ModulePath "/usr/lib64/xorg/modules"
EndSection

Description:

It's an Asus laptop with integrated Intel video card and discrete(Optimus) nVidia video card. Both cards are capable of running OpenGL applications. However, the steam client fails to run on nVidia card through bumblebee.

Steps for reproducing this issue:

  1. Run optirun steam command in terminal.
  2. Look at the output.

The steam client crashed with segmentation fault. Reproduced at 100%.

Note, the steam client has been crashing after an upgrade about 1-2 months ago. The upgrade included everything, including the steam client (which is upgrading itself automatically on startup). So I don't know exactly which software upgrade caused this issue.

TTele42 2016-07-02 github

This is probably the long standing steam runtime compatibility issue with mesa 10.5 and newer. You can either try the arch workaround or disable the steam runtime with USE="-steamruntime". NOTE: Disabling the steam runtime makes it your responsibility to manage library dependencies and dependency issues should be reported to the package maintainer.

=x11-drivers/nvidia-drivers-361.28 ships a known defective version of libglvnd, either use a different version or update to x11-drivers/nvidia-drivers-361.28-r2 and use the compat use flag, which removes libglvnd from the render path.

Another potential snafu is the virtualgl bridge that is used by default with optirun, which is known to misbehave with some applications and in general suffers a greater performance penalty than the primus bridge.

Rrosmanov 2016-07-02 github

@Tele42, thanks for reply. I have mesa-11.0.6 installed.

The arch workarounds didn't work, unfortunately.

update to x11-drivers/nvidia-drivers-362.28-r2

You probably meant x11-drivers/nvidia-drivers-361.28-r2. Upgraded to this version.

Primus, unfortunately, has never worked well for me. Actually, it simply didn't work most of the time. But this time it works! Even primusrun steam works. primusrun glxinfo | grep render outputs OpenGL renderer string: GeForce 940M/PCIe/SSE2. Although, primusrun glxgears shows only 50 fps (the Intel card performs 16 times better. Well, the steam client is running on nVidia card, at least. That's something.

The only thing I didn't try is USE="-steamruntime". I doubt it's worth it. But I'll try.

Still, is it a mesa bug, or something else? The strange thing is that primusrun steam successfully launches the steam client, while "steamruntime" and mesa-11.0.6 are still on their places. I mean I'm not sure whether this ticket should be closed, or not.

Thanks.

TTele42 2016-07-02 github

@rosmanov sorry about the typo, I corrected it to 361.28-r2 above.

Since primusrun works, then the issue most likely is coming from the virtualgl bridge in optirun. 50 fps sounds like a forced vsync issue and as long as it's steady and smooth, you probably actually want it in place to help manage the laptop's temperature. You could also give optirun -b primus a try, but I don't know if it'll behave any different from primusrun.

Rrosmanov 2016-07-03 github

The issue is somewhat fixed for me, - the steam client works on primus. Performance seems not as good as it used to be a couple of months ago, however.

I've also tried to disable "steamruntime". After installing some packages I've managed to launch it successfully. Some games require extra packages.

So I'll leave the ticket status to your discretion. Maybe there is something to fix on the steam side.

Rrosmanov 2016-07-31 github

Although it somehow works with primus, performance is pretty bad. I tried to launch steam on another laptop where I know exactly how it performed before the crashes. Now even primus fails to launch it.

Configuration
Laptop: HP Pavilion dv7
Distribution: Gentoo, amd64
Opted into Steam client beta?: Yes
Have checked for system updates?: Yes

lspci | grep VGA

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 630M] (rev ff)

Installed packages

  • x11-drivers/nvidia-drivers-361.28-r2 (X acpi compat driver kms multilib tools)
  • x11-base/xorg-server-1.16.4 (doc glamor ipv6 kdrive nptl suid udev xorg)
  • media-libs/mesa-10.3.7-r1
  • dev-libs/nettle-3.2 (gmp)
  • dev-libs/openssl-0.9.8z_p8(slot 0.9.8)
  • dev-libs/openssl-1.0.2h-r2(slot 0)

Note, I've downgraded mesa by masking the following packages:

  • =sys-devel/llvm-3.7.1-r3
  • =media-libs/mesa-11.0.6
  • =app-eselect/eselect-opengl-1.3.1-r4
  • =x11-base/xorg-server-1.17.4
  • =x11-base/xorg-server-1.16.4-r5
  • =x11-proto/glproto-1.4.17-r1

Upgraded @world, removed ~/.steam and ~/.local/share/Steam, then tried to run with LC_ALL=C LANG=C optirun steam. To my surprise, the steam client launched successfully. But after 10-20 seconds crashed with the same segmentation fault at line 713. I haven't saved the log, unfortunately. After the crash, all attempts to launch it with or without LC_ALL=C failed.

eselect locale show
en_US.utf8

gdb backtrace (steam runtime enabled)

https://gist.github.com/2f9a6688dc22ee938233997c0780cd5f
Probably the most important part:

#1  0xf6eb5f5c in ENGINE_finish () from /home/ruslan/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libcrypto.so.1.0.0
#2  0xf6ea3a6e in RSA_free () from /home/ruslan/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libcrypto.so.1.0.0

gdb backtrace (steam runtime disabled)

https://gist.github.com/ffbf48f1de8f6313b61df4a65727cc3c

(gdb) bt
#0  0xf6e9ee55 in OPENSSL_ia32_cpuid () from /usr/lib32/libcrypto.so.1.0.0
#1  0xf098e801 in OPENSSL_cpuid_setup () from /home/ruslan/.local/share/Steam/ubuntu12_32/libvideo.so
#2  0xf771affd in _dl_relocate_object () from /lib/ld-linux.so.2

So libvideo.so is pulled from steam. I don't know if this library is available through the portage.

gdb backtrace (steam runtime disabled, LD_PRELOAD='libcrypto.so.0.9.8'

(gdb) bt
#0  0xf711bc37 in __strcmp_sse4_2 () from /lib32/libc.so.6
#1  0xf7517256 in obj_name_cmp () from /usr/lib32/libcrypto.so.0.9.8
#2  0xf757b63a in getrn () from /usr/lib32/libcrypto.so.0.9.8
#3  0xf757b8e6 in lh_insert () from /usr/lib32/libcrypto.so.0.9.8
#4  0xf75175ad in OBJ_NAME_add () from /usr/lib32/libcrypto.so.0.9.8
#5  0xf7583516 in EVP_add_cipher () from /usr/lib32/libcrypto.so.0.9.8
#6  0xf6e134a9 in SSL_library_init () from /usr/lib32/libssl.so.1.0.0
#7  0xee00970b in ?? () from /home/ruslan/.local/share/Steam/ubuntu12_32/steamclient.so

https://gist.github.com/8d8c482ddf9a0dd97792ed52c0a29e23

Nothing extracted yet.