amonakov / primus

Low-overhead client-side GPU offloading
ISC License
216 stars 20 forks source link

Applications crash on exit #194

Open rokups opened 7 years ago

rokups commented 7 years ago

Every application i run with primusrun crashes on exit:

% primusrun glxspheres64
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x27
Context is Direct
OpenGL Renderer: GeForce GTX 1080/PCIe/SSE2
61.021098 frames/sec - 68.099545 Mpixels/sec
57.927106 frames/sec - 73.189278 Mpixels/sec
60.087398 frames/sec - 61.198775 Mpixels/sec
59.424591 frames/sec - 60.523708 Mpixels/sec
X Error of failed request:  GLXBadDrawable
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  11 (X_GLXSwapBuffers)
  Serial number of failed request:  57
  Current serial number in output stream:  58
primus: warning: timeout waiting for display worker
terminate called without an active exception
[1]    9165 abort (core dumped)  /usr/bin/primusrun glxspheres64

Bumblebee service log is clear on exit, only log on application start is this:

bumblebeed[31348]: [10330.222075] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
bumblebeed[31348]: [10330.222088] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
bumblebeed[31348]: [10330.222096] [WARN][XORG] (WW) Warning, couldn't open module mouse
bumblebeed[31348]: [10330.222104] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
bumblebeed[31348]: [10330.222110] [ERROR][XORG] (EE) NVIDIA(GPU-1): Failed to acquire modesetting permission.
bumblebeed[31348]: [10330.222115] [WARN][XORG] (WW) Warning, couldn't open module mouse
bumblebeed[31348]: [10330.222119] [ERROR][XORG] (EE) PreInit returned 2 for "<default pointer>"
bumblebeed[31348]: [10330.222123] [ERROR][XORG] (EE) PreInit returned 2 for "<default keyboard>"

One thing i should probably note is that i am using bumblebee/primusrun on a workstation with two discrete nvidia GPUs. I made a small patch to allow me setting correct address of discrete card as autodetection was failing in my case. Other than that commit its vanilla bumblebee 3.2.1. I also have nvidia-libgl installed and using proprietary nvidia driver on both cards. All that works just fine including optirun which does not even crash on exit.

Using: Archlinux with latest packages

amonakov commented 7 years ago

Are you sure it crashes with literally every application? (can you name applications tested so far?)

Does it depend on whether you press the Esc key in the glxspheres window, or use the window manager to close the window?

rokups commented 7 years ago

Hmm ok claiming its all applications was kind of overstatement. I tried glxgears and glxspheres64 and since both crashed... Odd thing is that after testing them now they no longer crash, however X errors are still shown. That happens if Esc is pressed. Pressing ctrl+c does not output that error but error code is 130 in both cases so still not a successful exit. I tried totalwar: warhammer just now and it exits without X errors.