Bumblebee-Project / Bumblebee

Bumblebee daemon and client rewritten in C
http://www.bumblebee-project.org/
GNU General Public License v3.0
1.29k stars 142 forks source link

Segmentation fault while running apps using optirun and primus #980

Open parithy opened 6 years ago

parithy commented 6 years ago

Unable to run any apps on optirun and primus which can't fallback on its own to intel igpu

System info: parithy@debian-acer ~/Downloads> glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel Open Source Technology Center (0x8086) Device: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) (0x3e9b) Version: 18.1.5 Accelerated: yes Video memory: 3072MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.5 Max compat profile version: 3.0 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.5 OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 18.1.5 OpenGL shading language version string: 1.30 OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.1.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

parithy@debian-acer ~/Downloads> optirun glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 4096 MB Total available memory: 4096 MB Currently available dedicated video memory: 4030 MB OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 1050 Ti/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 390.77 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 390.77 OpenGL shading language version string: 4.60 NVIDIA OpenGL context flags: (none) OpenGL profile mask: (none)

Sample: parithy@debian-acer ~/Downloads> optirun --debug glxgears [ 7231.208137] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf [ 7231.208649] [DEBUG]optirun version 3.2.1 starting... [ 7231.208666] [DEBUG]Active configuration: [ 7231.208671] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf [ 7231.208676] [DEBUG] X display: :8 [ 7231.208680] [DEBUG] LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia [ 7231.208685] [DEBUG] Socket path: /var/run/bumblebee.socket [ 7231.208689] [DEBUG] Accel/display bridge: auto [ 7231.208694] [DEBUG] VGL Compression: proxy [ 7231.208698] [DEBUG] VGLrun extra options: [ 7231.208704] [DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus [ 7231.208777] [DEBUG]Using auto-detected bridge primus [ 7232.075832] [INFO]Response: Yes. X is active.

[ 7232.075843] [INFO]Running application using primus. [ 7232.075946] [DEBUG]Process glxgears started, PID 28014. [ 7232.153244] [DEBUG]SIGCHILD received, but wait failed with No child processes [ 7232.153259] [DEBUG]Socket closed. [ 7232.153274] [DEBUG]Killing all remaining processes.


Systemout log

Aug 9 14:10:03 debian-acer kernel: [ 7230.912820] bbswitch: enabling discrete graphics Aug 9 14:10:03 debian-acer kernel: [ 7231.151286] nvidia-nvlink: Nvlink Core is being initialized, major device number 243 Aug 9 14:10:03 debian-acer kernel: [ 7231.151550] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none Aug 9 14:10:03 debian-acer kernel: [ 7231.151650] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 390.77 Tue Jul 10 18:28:52 PDT 2018 (using threaded interrupts) Aug 9 14:10:04 debian-acer kernel: [ 7231.719455] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 390.77 Tue Jul 10 22:10:46 PDT 2018 Aug 9 14:10:04 debian-acer acpid: client connected from 27998[0:996] Aug 9 14:10:04 debian-acer acpid: 1 client rule loaded Aug 9 14:10:04 debian-acer bumblebeed[25610]: [ 7232.075688] [WARN][XORG] (WW) Warning, couldn't open module mouse Aug 9 14:10:04 debian-acer bumblebeed[25610]: [ 7232.075699] [ERROR][XORG] (EE) Failed to load module "mouse" (module does not exist, 0) Aug 9 14:10:04 debian-acer bumblebeed[25610]: [ 7232.075705] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation. Aug 9 14:10:04 debian-acer bumblebeed[25610]: [ 7232.075710] [WARN][XORG] (WW) Warning, couldn't open module mouse Aug 9 14:10:04 debian-acer bumblebeed[25610]: [ 7232.075712] [ERROR][XORG] (EE) Failed to load module "mouse" (module does not exist, 0) Aug 9 14:10:04 debian-acer bumblebeed[25610]: [ 7232.075716] [ERROR][XORG] (EE) PreInit returned 2 for "" Aug 9 14:10:04 debian-acer bumblebeed[25610]: [ 7232.075719] [ERROR][XORG] (EE) PreInit returned 2 for "" Aug 9 14:10:04 debian-acer kernel: [ 7231.849754] glxgears[28017]: segfault at 74 ip 00007f613d5fc2ef sp 00007f613b8c4b30 error 4 in i965_dri.so[7f613d1fc000+6a7000] Aug 9 14:10:04 debian-acer kernel: [ 7231.897919] nvidia-modeset: Unloading Aug 9 14:10:04 debian-acer kernel: [ 7231.920313] nvidia-nvlink: Unregistered the Nvlink Core, major device number 243 Aug 9 14:10:04 debian-acer kernel: [ 7231.957551] bbswitch: disabling discrete graphics Aug 9 14:10:04 debian-acer kernel: [ 7231.976020] pci 0000:01:00.0: Refused to change power state, currently in D0 Aug 9 14:10:20 debian-acer acpid: client 27998[0:996] has disconnected

Gunman1982 commented 6 years ago

Try running it with "PRIMUS_UPLOAD=1" and see if that helps i.e. "PRIMUS_UPLOAD=1 primusrun glxgears"

ghost commented 6 years ago

update Mesa to 18.1.6 will solve this

parithy commented 6 years ago

mesa updated to 18.1.6 getting a different error:

parithy@debian-acer:~$ PRIMUS_UPLOAD=1 parithy@debian-acer:~$ primusrun glxgears bash: primusrun: command not found parithy@debian-acer:~$ optirun -b primus glxgears primus: fatal: failed to load any of the libraries: /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1:/usr/lib/i386-linux-gnu/nvidia/libGL.so.1:/usr/lib/nvidia/libGL.so.1 /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1: cannot open shared object file: No such file or directory /usr/lib/i386-linux-gnu/nvidia/libGL.so.1: cannot open shared object file: No such file or directory /usr/lib/nvidia/libGL.so.1: cannot open shared object file: No such file or directory

Gunman1982 commented 6 years ago

I get the feeling you are not running Debian stable but either Testing or SID.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876033

ghost commented 6 years ago

https://github.com/Bumblebee-Project/Bumblebee/issues/926#issuecomment-349329570