сряда, 6 юли 2016 г.

Primusrun not working on Sabayon (Gentoo)

Recently I got this odd error when trying to start primusrun:
"primus: fatal: failed to load any of the libraries: /usr/lib64/opengl/nvidia/lib/libGL.so.1:/usr/lib32/opengl/nvidia/lib/libGL.so.1:/usr/lib/opengl/nvidia/lib/libGL.so.1
/usr/lib64/opengl/nvidia/lib/libGL.so.1: wrong ELF class: ELFCLASS64
libGLX.so.0: cannot open shared object file: No such file or directory
/usr/lib/opengl/nvidia/lib/libGL.so.1: wrong ELF class: ELFCLASS64"

Obviously, this is not a critical error, but it prevented me from using my beloved nvidia card so I had to fix it. It turned out, it might be a problem of the nvidia driver in Sabayon being compiled without a -compat flag. I'm not that sure if that's the case, but anyway, Steam wasn't working and that was a pain.
I still don't know how to fix this, but I found a work around it. It is to run:
$ vblank_mode=0 optirun -b primus steam
Oddly enough, I discovered that this make a damaric change in the performance.
For example:
$glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xb4
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile
60.719441 frames/sec - 67.762896 Mpixels/sec

$optirun glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 750M/PCIe/SSE2
270.979545 frames/sec - 302.413172 Mpixels/sec

$ vblank_mode=0 optirun -b primus glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0xb4
Context is Direct
OpenGL Renderer: GeForce GT 750M/PCIe/SSE2
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
317.778206 frames/sec - 354.640478 Mpixels/sec

Surprising, huh? I didn't realize the nvidia makes that much difference. Nice.

P.S. Btw, the packages which I reinstalled were:
bumblebee bumblebee-nvidia virtualgl linux-headers libglw primus
And yeah, another thing, how to restart bumblebee:
systemctl enable bumblebeed.service
systemctl start bumblebeed.service

Няма коментари:

Публикуване на коментар