Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Steam and Primusrun/Optirun
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 875
Location: Greece

PostPosted: Sun Jan 24, 2016 6:04 pm    Post subject: Steam and Primusrun/Optirun Reply with quote

So, I got my new laptop and I was kinda excited to play old games at higher resolution, but then NVidia Optimus came to punch my nose.
I took a look in Gentoo's Wiki and I am super confused. There is no mention to Primusrun or Optirun there. Do I even need those packages with current kernel/driver? I am using gentoo-sources-4.4 and nvidia-drivers-361.
What do I do with eselect opengl? Leave xorg-x11 or change it to nvidia? If I change it to nvidia glxgears fails with
Code:
◢ sleipnir ◣ ~ $  glxgears
Error: couldn't get an RGB, Double-buffered visual
◢ sleipnir ◣ ~ $ 


Optirun glxgears works (with either opengl backend). primusrun only works when nvidia is the selected backend.
Running some of the games manually (without Steam) work perfectly with primusrun and optirun, but the same games fail to run in steam with "opti/primusrun %command%". They just fail and exit without a notice. Calling "optirun steam" works for most games, and they do seem to be using NVidia card properly then.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 260
Location: London, UK

PostPosted: Tue Jan 26, 2016 12:01 pm    Post subject: Reply with quote

Have a look at this bug. Are you in the steam client beta? VirtualGL is one of those things that links against /usr/lib/libcrypto.so.1.0.0 so will crash steam games using optirun. I've not looked into primus as a workaround yet. Both also need to be built with USE=abi_x86_32 (which isn't covered in the wiki).

I recently found that I was using the wrong driver for my integrated Intel card (I have an optimus laptop too). Using the correct driver gave me playable framerates in most of my games so I have less need for the nVidia card to work with steam using optirun, and I can still use the increased performance of the nVidia card for steam on an external display. I haven't tried to get it working with VirtualGL since Valve fixed the OpenSSL bug (time constraints), and from using VirtualGL with other games I've found it really sucks the performance out of the dedicated card, hence my intention to look at primus as a replacement.

EDIT:

I've found that running the games externally from the steam client (which loads the steamclient.so above which exports the erroneous openssl symbols) works with games that don't require steam integration (Half-Life series), however, those that do (BattleBlock Theatre) won't work as the LD_LIBRARY_PATH is not set up correctly when not run from the client. To do this run:
Code:
.local/share/steam/ubuntu12_32/steam-runtime/run.sh optirun .local/share/steam/steamapps/Common/path/to/your/game.sh


This runs optirun within the steam runtime without loading the steam client (which in turn loads steamclient.so) so optirun is able to find the correct, system, openssl. If the game requires the steamclient.so or openssl itself, then it won't work using this method.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 875
Location: Greece

PostPosted: Fri Jan 29, 2016 1:18 pm    Post subject: Reply with quote

[n00b@localhost] wrote:
Have a look at this bug. Are you in the steam client beta? VirtualGL is one of those things that links against /usr/lib/libcrypto.so.1.0.0 so will crash steam games using optirun. I've not looked into primus as a workaround yet. Both also need to be built with USE=abi_x86_32 (which isn't covered in the wiki).

I recently found that I was using the wrong driver for my integrated Intel card (I have an optimus laptop too). Using the correct driver gave me playable framerates in most of my games so I have less need for the nVidia card to work with steam using optirun, and I can still use the increased performance of the nVidia card for steam on an external display. I haven't tried to get it working with VirtualGL since Valve fixed the OpenSSL bug (time constraints), and from using VirtualGL with other games I've found it really sucks the performance out of the dedicated card, hence my intention to look at primus as a replacement.

EDIT:

I've found that running the games externally from the steam client (which loads the steamclient.so above which exports the erroneous openssl symbols) works with games that don't require steam integration (Half-Life series), however, those that do (BattleBlock Theatre) won't work as the LD_LIBRARY_PATH is not set up correctly when not run from the client. To do this run:
Code:
.local/share/steam/ubuntu12_32/steam-runtime/run.sh optirun .local/share/steam/steamapps/Common/path/to/your/game.sh


This runs optirun within the steam runtime without loading the steam client (which in turn loads steamclient.so) so optirun is able to find the correct, system, openssl. If the game requires the steamclient.so or openssl itself, then it won't work using this method.

So, I do need to install primus or optirun packages, in order to use the nVidia card, correct? In that case, Gentoo Wiki is really misleading, as it lets that hanging in the air. It doesn't mention that by following the guide, you will be using only the Intel card, and the nVidia one will be sitting there doing nothing. Also, it never clarifies what should be done concerning OpenGL backend.

So far I have been running the whole steam client with primusrun from the overlay, and things are working well. Most things fail to run with the Intel card only, with some funny openGL error, some texture features not supported and so on. With the whole client on primusrun, every game detects naturally the nVidia card. I've left it running without any game for a long time and I didn't notice any significant temperature increase, even while gaming the fan is barely ever on.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 260
Location: London, UK

PostPosted: Fri Jan 29, 2016 1:52 pm    Post subject: Reply with quote

The primusrun command is available from the primus package (in the bumblebee overlay), the optirun command comes from the bumblebee package which, by default, uses virtualGL (both bumblebee and virtualGL are in the main portage repo). There is no Gentoo Wiki page about bumblebee but the one from the Arch Wiki works for Gentoo too.

You don't need bumblebee, virtualGL or primusrun to use the nVidia card. You can set up your laptop to use the nVidia card all the time, or the Intel card all the time. This is what the Gentoo Wiki covers mostly. What bumblebee allows you to do is switch the nVidia GPU on and off without rebooting, thereby saving power by having the Intel card run all the day-to-day stuff and switch on the nVidia card when running high performance 3D stuff, all without having to reboot and change BIOS settings.

To do this, bumblebee requires an "OpenGL bridge" which is provided by either primusrun or virtualGL. You can have more than one bridge installed and instruct bumblebee to use the one you want. The optirun command basically turns the nVidia card on, loads the kernel module (nouveau or nvidia), starts an X server on it without a screen attached and instructs the program being run to use the secondary X server. The primus or virtualGL then copy the programs output to the primary X server running on the Intel card. When the program exits, optirun stops the secondary X server, unloads the kernel modules, then switches the nVidia card off again to save power.

If you want to run the steam client with the Intel card but launch games using the nVidia card (with bumblebee installed), right-click on each game in your library, choose "Properties", click the "Launch Options" button and enter "optirun %command%". This is what I have and it works quite well now that Valve have fixed the OpenSSL bug. It is slower than rebooting my laptop into "nVidia only" mode though, as I'm using the virtualGL bridge and it adds significant overhead copying the output from one X server to the other.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 875
Location: Greece

PostPosted: Fri Jan 29, 2016 4:40 pm    Post subject: Reply with quote

[n00b@localhost] wrote:
The primusrun command is available from the primus package (in the bumblebee overlay), the optirun command comes from the bumblebee package which, by default, uses virtualGL (both bumblebee and virtualGL are in the main portage repo). There is no Gentoo Wiki page about bumblebee but the one from the Arch Wiki works for Gentoo too.

You don't need bumblebee, virtualGL or primusrun to use the nVidia card. You can set up your laptop to use the nVidia card all the time, or the Intel card all the time. This is what the Gentoo Wiki covers mostly. What bumblebee allows you to do is switch the nVidia GPU on and off without rebooting, thereby saving power by having the Intel card run all the day-to-day stuff and switch on the nVidia card when running high performance 3D stuff, all without having to reboot and change BIOS settings.

To do this, bumblebee requires an "OpenGL bridge" which is provided by either primusrun or virtualGL. You can have more than one bridge installed and instruct bumblebee to use the one you want. The optirun command basically turns the nVidia card on, loads the kernel module (nouveau or nvidia), starts an X server on it without a screen attached and instructs the program being run to use the secondary X server. The primus or virtualGL then copy the programs output to the primary X server running on the Intel card. When the program exits, optirun stops the secondary X server, unloads the kernel modules, then switches the nVidia card off again to save power.

If you want to run the steam client with the Intel card but launch games using the nVidia card (with bumblebee installed), right-click on each game in your library, choose "Properties", click the "Launch Options" button and enter "optirun %command%". This is what I have and it works quite well now that Valve have fixed the OpenSSL bug. It is slower than rebooting my laptop into "nVidia only" mode though, as I'm using the virtualGL bridge and it adds significant overhead copying the output from one X server to the other.

Thank you for clarifying, but that doesn't really tackle my point.

This comes from the wiki (https://wiki.gentoo.org/wiki/NVIDIA/Optimus):
Quote:
Laptops with Nvidia graphics cards using Nvidia Optimus can be configured to render scenes on the discrete Nvidia GPU (Graphics Processing Unit) card using x11-drivers/nvidia-drivers and copy the rendered scenes to the Intel GPU using XRandR.


Is this **actually** being done without the bumblebee overlay, without optimus or primus packages? Is my nVidia card being used in any sense after I follow this guide **without** primus or optimus? If so, how can I test it to make sure things are in order?
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
[n00b@localhost]
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 260
Location: London, UK

PostPosted: Fri Jan 29, 2016 5:21 pm    Post subject: Reply with quote

Holysword wrote:

Thank you for clarifying, but that doesn't really tackle my point.

This comes from the wiki (https://wiki.gentoo.org/wiki/NVIDIA/Optimus):
Quote:
Laptops with Nvidia graphics cards using Nvidia Optimus can be configured to render scenes on the discrete Nvidia GPU (Graphics Processing Unit) card using x11-drivers/nvidia-drivers and copy the rendered scenes to the Intel GPU using XRandR.


Is this **actually** being done without the bumblebee overlay, without optimus or primus packages? Is my nVidia card being used in any sense after I follow this guide **without** primus or optimus? If so, how can I test it to make sure things are in order?


nVidia only officially supports using xrandr as a kind of bridge for optimus laptops. This is what is covered in the Gentoo Wiki. This only offloads the rendering though and does not perform any on-demand power management of the card, switching it on and off when needed to save power (which is one of the main motivations for optimus, IMO). The nVidia card is therefore on all the time.

To answer your questions: yes, this is possible without using bumblebee and primus/virtualGL but you won't get any power management; the nVidia card is being used for ALL rendering and the Intel card just displays it. If you run glxinfo and look at the "renderer" strings it should say nVidia for one or more of them (depending on the setting of eselect opengl). Also, glxgears/glxspheres64 should give higher framerates than using the Intel card alone.

Hope this helps.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 875
Location: Greece

PostPosted: Sat Jan 30, 2016 9:53 am    Post subject: Reply with quote

[n00b@localhost] wrote:
nVidia only officially supports using xrandr as a kind of bridge for optimus laptops. This is what is covered in the Gentoo Wiki. This only offloads the rendering though and does not perform any on-demand power management of the card, switching it on and off when needed to save power (which is one of the main motivations for optimus, IMO). The nVidia card is therefore on all the time.

I am not really concerned about power management at this point, as long as things work ***without primus or optimus***. What I don't get is how to use xrandr to do the aforementioned, and the wiki doesn't explain it at all (or I did not understand). I've followed the whole instructions and this is what I get when opengl backend is nvidia:

Code:
◢ sleipnir ◣ ~ $  eselect opengl list
Available OpenGL implementations:
  [1]   nvidia *
  [2]   xorg-x11
◢ sleipnir ◣ ~ $  glxspheres64
Polygons in scene: 62464
ERROR (603): Could not obtain RGB visual with requested properties
◢ sleipnir ◣ ~ $  glxspheres
Polygons in scene: 62464
ERROR (603): Could not obtain RGB visual with requested properties
◢ sleipnir ◣ ~ $  glxgears                                                                           
Error: couldn't get an RGB, Double-buffered visual
◢ sleipnir ◣ ~ $  glxinfo                                                                                                                                               
name of display: :3.0
Error: couldn't find RGB GLX visual or fbconfig


If I switch to xorg-x11 the result is different, though it is clearly using Intel's card, and not nVidia's whatsoever:
Code:
◢ sleipnir ◣ ~ $  eselect opengl set 2
Switching to xorg-x11 OpenGL interface... done
◢ sleipnir ◣ ~ $  glxspheres
Polygons in scene: 62464
Visual ID of window: 0x94
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Skylake Halo GT2 x86/MMX/SSE2
60.985991 frames/sec - 68.060366 Mpixels/sec
59.940462 frames/sec - 66.893555 Mpixels/sec
^C
◢ sleipnir ◣ ~ $  glxspheres64
Polygons in scene: 62464
Visual ID of window: 0x94
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Skylake Halo GT2
60.815819 frames/sec - 67.870454 Mpixels/sec
^C
◢ sleipnir ◣ ~ $  glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
305 frames in 5.0 seconds = 60.989 FPS
301 frames in 5.0 seconds = 60.003 FPS
301 frames in 5.0 seconds = 60.001 FPS
^C
◢ sleipnir ◣ ~ $  glxinfo
name of display: :3.0
display: :3  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer,
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Skylake Halo GT2
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth,
    GL_AMD_draw_buffers_blend, GL_AMD_seamless_cubemap_per_texture,
    GL_AMD_shader_trinary_minmax, GL_AMD_vertex_shader_layer,
    GL_AMD_vertex_shader_viewport_index, GL_ANGLE_texture_compression_dxt3,
    GL_ANGLE_texture_compression_dxt5, GL_APPLE_object_purgeable,
    GL_ARB_ES2_compatibility, GL_ARB_ES3_compatibility, GL_ARB_base_instance,
    GL_ARB_blend_func_extended, GL_ARB_buffer_storage,
    GL_ARB_clear_buffer_object, GL_ARB_clear_texture, GL_ARB_clip_control,
    GL_ARB_compressed_texture_pixel_storage,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_debug_output,
    GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, GL_ARB_derivative_control,
    GL_ARB_direct_state_access, GL_ARB_draw_buffers,
    GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex,
    GL_ARB_draw_indirect, GL_ARB_draw_instanced,
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_shader,
    GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object,
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary,
    GL_ARB_get_texture_sub_image, GL_ARB_gpu_shader5, GL_ARB_half_float_pixel,
    GL_ARB_half_float_vertex, GL_ARB_instanced_arrays,
    GL_ARB_internalformat_query, GL_ARB_invalidate_subdata,
    GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, GL_ARB_multi_bind,
    GL_ARB_multi_draw_indirect, GL_ARB_occlusion_query2,
    GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object,
    GL_ARB_point_sprite, GL_ARB_program_interface_query,
    GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sample_shading,
    GL_ARB_sampler_objects, GL_ARB_seamless_cube_map,
    GL_ARB_seamless_cubemap_per_texture, GL_ARB_separate_shader_objects,
    GL_ARB_shader_atomic_counters, GL_ARB_shader_bit_encoding,
    GL_ARB_shader_image_load_store, GL_ARB_shader_image_size,
    GL_ARB_shader_objects, GL_ARB_shader_subroutine,
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_420pack,
    GL_ARB_shading_language_packing, GL_ARB_stencil_texturing, GL_ARB_sync,
    GL_ARB_texture_buffer_object, GL_ARB_texture_buffer_object_rgb32,
    GL_ARB_texture_buffer_range, GL_ARB_texture_compression_bptc,
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map_array,
    GL_ARB_texture_float, GL_ARB_texture_gather,
    GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_multisample,
    GL_ARB_texture_non_power_of_two, GL_ARB_texture_query_levels,
    GL_ARB_texture_query_lod, GL_ARB_texture_rectangle, GL_ARB_texture_rg,
    GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_storage,
    GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle,
    GL_ARB_texture_view, GL_ARB_timer_query, GL_ARB_transform_feedback2,
    GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced,
    GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra,
    GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_binding,
    GL_ARB_vertex_shader, GL_ARB_vertex_type_10f_11f_11f_rev,
    GL_ARB_vertex_type_2_10_10_10_rev, GL_ARB_viewport_array,
    GL_ATI_blend_equation_separate, GL_ATI_texture_float, GL_EXT_abgr,
    GL_EXT_blend_equation_separate, GL_EXT_draw_buffers2,
    GL_EXT_draw_instanced, GL_EXT_framebuffer_blit,
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled,
    GL_EXT_framebuffer_sRGB, GL_EXT_packed_depth_stencil, GL_EXT_packed_float,
    GL_EXT_pixel_buffer_object, GL_EXT_polygon_offset_clamp,
    GL_EXT_provoking_vertex, GL_EXT_shader_integer_mix, GL_EXT_texture_array,
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_integer,
    GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode,
    GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm,
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback,
    GL_EXT_vertex_array_bgra, GL_IBM_multimode_draw_arrays,
    GL_KHR_context_flush_control, GL_KHR_debug, GL_MESA_pack_invert,
    GL_MESA_texture_signed_rgba, GL_NV_conditional_render, GL_NV_depth_clamp,
    GL_NV_packed_depth_stencil, GL_OES_EGL_image, GL_OES_read_format,
    GL_S3_s3tc
OpenGL version string: 3.0 Mesa 11.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth,
    GL_AMD_draw_buffers_blend, GL_AMD_seamless_cubemap_per_texture,
    GL_AMD_shader_trinary_minmax, GL_ANGLE_texture_compression_dxt3,
    GL_ANGLE_texture_compression_dxt5, GL_APPLE_object_purgeable,
    GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object,
    GL_ARB_ES2_compatibility, GL_ARB_ES3_compatibility,
    GL_ARB_blend_func_extended, GL_ARB_buffer_storage,
    GL_ARB_clear_buffer_object, GL_ARB_clear_texture, GL_ARB_clip_control,
    GL_ARB_color_buffer_float, GL_ARB_compressed_texture_pixel_storage,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_debug_output,
    GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, GL_ARB_depth_texture,
    GL_ARB_derivative_control, GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend,
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced,
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_program,
    GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader,
    GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object,
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary,
    GL_ARB_get_texture_sub_image, GL_ARB_half_float_pixel,
    GL_ARB_half_float_vertex, GL_ARB_instanced_arrays,
    GL_ARB_internalformat_query, GL_ARB_invalidate_subdata,
    GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, GL_ARB_multi_bind,
    GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query,
    GL_ARB_occlusion_query2, GL_ARB_pipeline_statistics_query,
    GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite,
    GL_ARB_program_interface_query, GL_ARB_provoking_vertex,
    GL_ARB_robustness, GL_ARB_sample_shading, GL_ARB_sampler_objects,
    GL_ARB_seamless_cube_map, GL_ARB_seamless_cubemap_per_texture,
    GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counters,
    GL_ARB_shader_bit_encoding, GL_ARB_shader_image_load_store,
    GL_ARB_shader_image_size, GL_ARB_shader_objects,
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_100,
    GL_ARB_shading_language_420pack, GL_ARB_shading_language_packing,
    GL_ARB_shadow, GL_ARB_stencil_texturing, GL_ARB_sync,
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
    GL_ARB_texture_compression_bptc, GL_ARB_texture_compression_rgtc,
    GL_ARB_texture_cube_map, GL_ARB_texture_cube_map_array,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
    GL_ARB_texture_float, GL_ARB_texture_gather,
    GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_mirrored_repeat,
    GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two,
    GL_ARB_texture_query_levels, GL_ARB_texture_query_lod,
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui,
    GL_ARB_texture_storage, GL_ARB_texture_storage_multisample,
    GL_ARB_texture_swizzle, GL_ARB_texture_view, GL_ARB_timer_query,
    GL_ARB_transform_feedback2, GL_ARB_transform_feedback3,
    GL_ARB_transform_feedback_instanced, GL_ARB_transpose_matrix,
    GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra,
    GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_binding,
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev,
    GL_ARB_window_pos, GL_ATI_blend_equation_separate, GL_ATI_draw_buffers,
    GL_ATI_separate_stencil, GL_ATI_texture_env_combine3,
    GL_ATI_texture_float, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_compiled_vertex_array,
    GL_EXT_copy_texture, GL_EXT_draw_buffers2, GL_EXT_draw_instanced,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit,
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled,
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB,
    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_packed_pixels,
    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters,
    GL_EXT_polygon_offset, GL_EXT_polygon_offset_clamp,
    GL_EXT_provoking_vertex, GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shader_integer_mix,
    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap,
    GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D,
    GL_EXT_texture_array, GL_EXT_texture_compression_dxt1,
    GL_EXT_texture_compression_rgtc, GL_EXT_texture_cube_map,
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_integer,
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle,
    GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode,
    GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm,
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback,
    GL_EXT_vertex_array, GL_EXT_vertex_array_bgra,
    GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip,
    GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate,
    GL_KHR_context_flush_control, GL_KHR_debug, GL_MESA_pack_invert,
    GL_MESA_texture_signed_rgba, GL_MESA_window_pos, GL_NV_blend_square,
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_light_max_exponent,
    GL_NV_packed_depth_stencil, GL_NV_primitive_restart,
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
    GL_NV_texture_rectangle, GL_OES_EGL_image, GL_OES_read_format,
    GL_S3_s3tc, GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp,
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5,
    GL_APPLE_texture_max_level, GL_EXT_blend_minmax,
    GL_EXT_color_buffer_float, GL_EXT_discard_framebuffer,
    GL_EXT_draw_buffers, GL_EXT_map_buffer_range, GL_EXT_multi_draw_arrays,
    GL_EXT_read_format_bgra, GL_EXT_separate_shader_objects,
    GL_EXT_shader_integer_mix, GL_EXT_texture_compression_dxt1,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_format_BGRA8888,
    GL_EXT_texture_rg, GL_EXT_texture_type_2_10_10_10_REV,
    GL_EXT_unpack_subimage, GL_KHR_context_flush_control, GL_NV_draw_buffers,
    GL_NV_fbo_color_attachments, GL_NV_read_buffer, GL_NV_read_depth,
    GL_NV_read_depth_stencil, GL_NV_read_stencil, GL_OES_EGL_image,
    GL_OES_EGL_image_external, GL_OES_EGL_sync,
    GL_OES_compressed_ETC1_RGB8_texture, GL_OES_depth24, GL_OES_depth_texture,
    GL_OES_depth_texture_cube_map, GL_OES_element_index_uint,
    GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,
    GL_OES_packed_depth_stencil, GL_OES_rgb8_rgba8,
    GL_OES_standard_derivatives, GL_OES_stencil8, GL_OES_surfaceless_context,
    GL_OES_texture_3D, GL_OES_texture_float, GL_OES_texture_float_linear,
    GL_OES_texture_half_float, GL_OES_texture_half_float_linear,
    GL_OES_texture_npot, GL_OES_vertex_array_object
40 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x020 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x021 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x08f 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x090 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x091 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x092 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x093 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x094 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x095 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x096 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x097 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x098 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x099 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  4 1 None
0x09a 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  8 1 None
0x09b 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  4 1 None
0x09c 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  8 1 None
0x09d 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  4 1 None
0x09e 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  8 1 None
0x09f 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  4 1 None
0x0a0 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  8 1 None
0x0a1 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x0a2 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x0a3 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0a4 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0a5 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0a6 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0a7 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0a8 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0a9 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x0aa 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0ab 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x0ac 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  4 1 None
0x0ad 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  8 1 None
0x0ae 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  4 1 None
0x0af 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  8 1 None
0x0b0 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  4 1 None
0x0b1 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  8 1 None
0x0b2 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  4 1 None
0x0b3 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  8 1 None
0x04e 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
64 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x04f  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x050  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x051  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x052  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x053  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x054  0 tc  0  16  0 r  . .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x055 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x056 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x057 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x058 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x059 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x05a 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x05b 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x05c 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x05d  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x05e  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x05f 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x060 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x061 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x062 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x063  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  4 1 None
0x064  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  8 1 None
0x065  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  4 1 None
0x066  0 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  8 1 None
0x067 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  4 1 None
0x068 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  8 1 None
0x069 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  4 1 None
0x06a 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  8 1 None
0x06b 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  4 1 None
0x06c 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  8 1 None
0x06d 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  4 1 None
0x06e 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  8 1 None
0x06f  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x070  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x071  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x072  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x073  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x074  0 dc  0  16  0 r  . .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x075 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x076 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x077 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x078 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x079 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x07a 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x07b 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x07c 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x07d  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x07e  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x07f 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x080 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x081 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x082 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x083  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  4 1 None
0x084  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  8 1 None
0x085  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  4 1 None
0x086  0 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  8 1 None
0x087 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  4 1 None
0x088 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  8 1 None
0x089 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  4 1 None
0x08a 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  8 1 None
0x08b 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  4 1 None
0x08c 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  8 1 None
0x08d 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  4 1 None
0x08e 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  8 1 None

◢ sleipnir ◣ ~ $


I've tried reading the documentation of the nVidia driver (as "suggested" by the wiki) but didn't get much. What is the trick to get it done? (other than the 2 commands in .xinitrc)

EDIT#1: I am almost giving up Gentoo at this point. Now primusrun returns the same error ERROR (603), and I merely rebooted the computer. optirun still works, but some games won't really run with it, or will show funny behaviour/glitches with textures.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1356
Location: /mnt/Gentoo/Europe

PostPosted: Wed Feb 17, 2016 7:33 pm    Post subject: Reply with quote

Hi,

As my Nvidia Optimus on Gentoo doesn't work last 2 weeks with nvidia drivers, are you successful with primus? I used to use primus for over a year, but I have a problem now (optirun works). Bumblebee Wiki for Gentoo does not exist anymore and I forgot about primus configuration.

this works
Code:
$ optirun glxgears


this does not - but I need this for steam games :(
Code:
$ primusrun glxgears
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
libGLX.so.0: cannot open shared object file: No such file or directory
/usr/lib32/opengl/nvidia/lib/libGL.so.1: wrong ELF class: ELFCLASS32
libGLX.so.0: cannot open shared object file: No such file or directory
Back to top
View user's profile Send private message
Yamakuzure
Veteran
Veteran


Joined: 21 Jun 2006
Posts: 1885
Location: Bardowick, Germany

PostPosted: Thu Feb 18, 2016 10:44 am    Post subject: Reply with quote

Which nvidia drivers have you installed with which USE flags? (Did you deactivate the multilib USE flag?)

In your bumblebee.conf it should look like:
Code:
 $ grep Library /etc/bumblebee/bumblebee.conf
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus
LibraryPath=/usr/$LIB/opengl/nvidia/lib
And there you should have:
Code:
 $ l /usr/lib*/{primus,opengl/nvidia/lib}/libGL.so.1
lrwxrwxrwx 1 root root   15  3. Feb 17:34 /usr/lib32/opengl/nvidia/lib/libGL.so.1 -> libGL.so.358.16
-rw-r--r-- 1 root root 262K 20. Jan 15:59 /usr/lib32/primus/libGL.so.1
lrwxrwxrwx 1 root root   15  3. Feb 17:34 /usr/lib64/opengl/nvidia/lib/libGL.so.1 -> libGL.so.358.16
-rwSr-Sr-- 1 root root 263K 20. Jan 15:59 /usr/lib64/primus/libGL.so.1
lrwxrwxrwx 1 root root   15  3. Feb 17:34 /usr/lib/opengl/nvidia/lib/libGL.so.1 -> libGL.so.358.16
-rwSr-Sr-- 1 root root 263K 20. Jan 15:59 /usr/lib/primus/libGL.so.1
which belong to x11-drivers/nvidia-drivers and x11-misc/primus.

glxgears should show something like:
Code:
 $ primusrun glxgears -info
GL_RENDERER   = Quadro K2100M/PCIe/SSE2
GL_VERSION    = 4.5.0 NVIDIA 358.16
GL_VENDOR     = NVIDIA Corporation
GL_EXTENSIONS = (...)
Then in Steam you can right-click your game, select "properties", click on "launch Options" and enter "primusrun %command%". There is no need to hack away with obscure shell script paths.
_________________
systemd - The biggest fallacies
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 875
Location: Greece

PostPosted: Thu Feb 18, 2016 1:25 pm    Post subject: Reply with quote

Xywa wrote:
Hi,

As my Nvidia Optimus on Gentoo doesn't work last 2 weeks with nvidia drivers, are you successful with primus? I used to use primus for over a year, but I have a problem now (optirun works). Bumblebee Wiki for Gentoo does not exist anymore and I forgot about primus configuration.

this works
Code:
$ optirun glxgears


this does not - but I need this for steam games :(
Code:
$ primusrun glxgears
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
libGLX.so.0: cannot open shared object file: No such file or directory
/usr/lib32/opengl/nvidia/lib/libGL.so.1: wrong ELF class: ELFCLASS32
libGLX.so.0: cannot open shared object file: No such file or directory

Sorry for taking so long to reply.

I was having the very same problem as you. It worked sometimes, I never figured out what was the reason. Uninstall, restart, install again, enable systemd service, then it works? Something like that.
Right now I cannot start X if bumblebee service has started. So I keep it disabled, start X, and THEN I start the service.

I've workarounded by adding
Code:
export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}:/usr/lib64/opengl/nvidia/lib/:/usr/lib32/opengl/nvidia/lib/

right before "exec $@" inside of /usr/bin/primusrun. With that, "primusrun steam" works flawlessly.


Yamakuzure wrote:
Which nvidia drivers have you installed with which USE flags? (Did you deactivate the multilib USE flag?)

Code:
[ebuild     U ~] x11-drivers/nvidia-drivers-361.28-r2:0/361::gentoo [361.18-r1:0/361::gentoo] USE="X acpi driver gtk3 kms multilib tools uvm -compat% -pax_kernel -static-libs% (-gtk2%)" 86,815 KiB


Yamakuzure wrote:
In your bumblebee.conf it should look like:
Code:
 $ grep Library /etc/bumblebee/bumblebee.conf
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus
LibraryPath=/usr/$LIB/opengl/nvidia/lib

I've never touched my bumblebee.conf. It contains both those lines and many others more.

Yamakuzure wrote:
And there you should have:
Code:
 $ l /usr/lib*/{primus,opengl/nvidia/lib}/libGL.so.1
lrwxrwxrwx 1 root root   15  3. Feb 17:34 /usr/lib32/opengl/nvidia/lib/libGL.so.1 -> libGL.so.358.16
-rw-r--r-- 1 root root 262K 20. Jan 15:59 /usr/lib32/primus/libGL.so.1
lrwxrwxrwx 1 root root   15  3. Feb 17:34 /usr/lib64/opengl/nvidia/lib/libGL.so.1 -> libGL.so.358.16
-rwSr-Sr-- 1 root root 263K 20. Jan 15:59 /usr/lib64/primus/libGL.so.1
lrwxrwxrwx 1 root root   15  3. Feb 17:34 /usr/lib/opengl/nvidia/lib/libGL.so.1 -> libGL.so.358.16
-rwSr-Sr-- 1 root root 263K 20. Jan 15:59 /usr/lib/primus/libGL.so.1
which belong to x11-drivers/nvidia-drivers and x11-misc/primus.

Code:
◢ sleipnir ◣ ~ $  ls /usr/lib*/{primus,opengl/nvidia/lib}/libGL.so.1                                                   
-rwxr-xr-x 1 root root 430K Jan 31 21:36 /usr/lib32/opengl/nvidia/lib/libGL.so.1
-rw-r--r-- 1 root root 270K Jan 31 21:39 /usr/lib32/primus/libGL.so.1
-rwxr-xr-x 1 root root 719K Jan 31 21:36 /usr/lib64/opengl/nvidia/lib/libGL.so.1
-rw-r--r-- 1 root root 267K Jan 31 21:39 /usr/lib64/primus/libGL.so.1
-rwxr-xr-x 1 root root 719K Jan 31 21:36 /usr/lib/opengl/nvidia/lib/libGL.so.1
-rw-r--r-- 1 root root 267K Jan 31 21:39 /usr/lib/primus/libGL.so.1


Yamakuzure wrote:
Then in Steam you can right-click your game, select "properties", click on "launch Options" and enter "primusrun %command%".

Doesn't work for me. Games start and exit without any error.

Yamakuzure wrote:
There is no need to hack away with obscure shell script paths.

That's silly, people only hack obscure shell script paths when the alternatives don't work :P :P :P
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Yamakuzure
Veteran
Veteran


Joined: 21 Jun 2006
Posts: 1885
Location: Bardowick, Germany

PostPosted: Fri Feb 19, 2016 10:05 am    Post subject: Reply with quote

No, it is not silly. If the default way does not work, something is wrong. Hacking around is is no fix. It just hides the symptoms.

There are a few other things you might want to check. Your unability to start X when bumblebee runs is a strong hint. It certainly must not be this way.
  • Your system must *NOT* preload any nvidia drivers. That's what the bumblebee daemon does using bbswitch.
    So your kernel command line should have something like
    Code:
    modprobe.blacklist=nvidia-modeset,nvidia-uvm,nvidia,nouveau
    in it.
  • Your xorg.conf must not be configured to see your nvidia card. Not even the BUS ID. That's what /etc/bumblebee/xorg.conf.nvidia is for.
    On my system it looks like this: (without comments)
    Code:
     ~ $ grep -v "#" /etc/bumblebee/xorg.conf.nvidia
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection

    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"

       BusID "PCI:01:00:0"

        Option "ProbeAllGpus" "false"

        Option "NoLogo" "true"


        Option "AllowEmptyInitialConfiguration"
    EndSection

    Section "Screen"
        Identifier "Default Screen"
        Device "DiscreteNvidia"
    EndSection

  • Once your system is up and running, yes, with bumblebee started and your X running, you must not have any nvidia module loaded.
    My system, Plasma 5, from Konsole:
    Code:
    ~ $ lsmod | grep -P "(nvidia|bbswitch)"
    bbswitch                4960  0
    See? No nvidia, only bbswitch.
  • You need a file /etc/modprobe.d/nvidia-rmmod.conf with the following content, or bbswitch will not be able to unload the nvidia driver properly:
    Code:
    # Nvidia UVM support

    remove nvidia modprobe -r --ignore-remove nvidia-modeset nvidia-uvm nvidia

  • And finally you should install
    sys-power/bbswitch-9999 and
    x11-misc/primus-9999 from the bumblebee overlay and
    x11-misc/bumblebee-9999-r2 from the seden overlay.
    The reason is, that the last release is over two years old, and a lot of problems with module loading/unloading have been fixed in git but have not yet been released.
    bumblebee-9999 from the bumblebee overlay uses the wrong branch, that's why I am using the one from the "seden" overlay.
I hope this helps.

Oh, I am using 358.16-r1 of the nvidia drivers. I haven't tried out newer ones.
_________________
systemd - The biggest fallacies
Back to top
View user's profile Send private message
Yamakuzure
Veteran
Veteran


Joined: 21 Jun 2006
Posts: 1885
Location: Bardowick, Germany

PostPosted: Fri Feb 19, 2016 12:02 pm    Post subject: Reply with quote

Holysword wrote:
Yamakuzure wrote:
Then in Steam you can right-click your game, select "properties", click on "launch Options" and enter "primusrun %command%".

Doesn't work for me. Games start and exit without any error.P
Sorry, forgot that one.

If you look at the steam output, you might discover a line like:
Code:
(...)ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib64/primus/libGL.so.1)
Which simply means that you have updated your gcc.

To fix that do (Paths and Versions may be different on your machine!):
Code:
 $ cd ~/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu
 $ rm libstdc++.so.6
 $ ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/32/libstdc++.so.6
 $ cd ~/.steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu
 $ rm libstdc++.so.6
 $ ln -s /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6

_________________
systemd - The biggest fallacies
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 875
Location: Greece

PostPosted: Fri Feb 19, 2016 12:57 pm    Post subject: Reply with quote

Yamakuzure wrote:
No, it is not silly. If the default way does not work, something is wrong. Hacking around is is no fix. It just hides the symptoms.

Are you suggesting that I should not "hide the symptoms" and keep an unusable system while looking for a solution? If I'd do that, I'd be living on LiveCDs for about a month now. Of course I'll hack (read "workaround") it until a proper solution appears, half a solution is better than none!

All in all, thanks for all of your suggestions. I have not seen any of this information anywhere, so this might solve my problem - I will try this as soon as I have time and then report here, specially the packages from seden overlay. I have been using only bumblebee overlay.

Perhaps when you have some time you could create an entry in the wiki for that? That kind of information is really missing, and as I mentioned earlier in this topic here, it is not even clear if (or why) one would need bumblebee at all, as the current entry in the wiki leads one to believe that xRandR does all the magic by itself without any need for further shenanigans (with no clarification, merely telling you to read nvidia-driver's man page). I am honestly still confused as to what we can achieve with only xRandR.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Yamakuzure
Veteran
Veteran


Joined: 21 Jun 2006
Posts: 1885
Location: Bardowick, Germany

PostPosted: Mon Feb 22, 2016 12:08 pm    Post subject: Reply with quote

The Wiki page is about using the proprietary nvidia drivers and letting them handle everything. Unfortunately this means, that the card is always up and running.

This means, that unless you do not care about battery life, bumblebee is still the only way to go to not have your nvidia card eating away your battery all the time. Further, on (some) muxless systems the "XRandR"-method might not work. Like on mine:
Code:
 # xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x48 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 5 associated providers: 0 name:Intel
That's it. I can not set the nvidia card as an output source provider. I am stuck with either loading the nvidia drivers and run X over them, or using bumblebee. (*)

To clarify the battery argument:
Setting up your system like described in the wiki will make your system use your nvidia card to render everything and copy the result to the intel gpu. The integrated intel gpu is then nothing more than a proxy that puts what the nvidia chip delivers through to the monitor.

(*) : Weird enough, if I do load the nvidia driver and use it to run X directly on the card, the output from "xrandr --listproviders" stays the same. I guess it has something to do with how my laptop was built.
_________________
systemd - The biggest fallacies
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 875
Location: Greece

PostPosted: Mon Feb 22, 2016 1:53 pm    Post subject: Reply with quote

Yamakuzure wrote:
The Wiki page is about using the proprietary nvidia drivers and letting them handle everything. Unfortunately this means, that the card is always up and running.

This means, that unless you do not care about battery life, bumblebee is still the only way to go to not have your nvidia card eating away your battery all the time. Further, on (some) muxless systems the "XRandR"-method might not work. Like on mine:
Code:
 # xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x48 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 5 associated providers: 0 name:Intel
That's it. I can not set the nvidia card as an output source provider. I am stuck with either loading the nvidia drivers and run X over them, or using bumblebee. (*)

To clarify the battery argument:
Setting up your system like described in the wiki will make your system use your nvidia card to render everything and copy the result to the intel gpu. The integrated intel gpu is then nothing more than a proxy that puts what the nvidia chip delivers through to the monitor.

(*) : Weird enough, if I do load the nvidia driver and use it to run X directly on the card, the output from "xrandr --listproviders" stays the same. I guess it has something to do with how my laptop was built.

When I got my first optimus laptop, I solved the problem by merely blacklisting Intel's Card module and forcing X to use nvidia's card in xorg.conf. Is it not possible to do that anymore? If it is, then I see no advantage of using the xrandr shenanigans.

Still haven't had the chance to play around with your solution, systemd was haunting me this weekend, Maybe next weekend.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
vilehost
n00b
n00b


Joined: 07 Jan 2016
Posts: 22

PostPosted: Wed Apr 06, 2016 4:42 pm    Post subject: Reply with quote

in all honesty anyone with an optimus laptop should be using bumblebee anyway, otherwise your looking at replacing your GPU's fan and goo every 1-2 years or so, those fans come with an EOL date dont they, and i think it's partially based on rotations, the fan will be running at constant high velocity with no bumblebee even if your not running any programs because it's temp will still be pushing 75c i.e no bumblebee to tell it to shut off...

or get a desktop, i could be wrong but 5-6 years in.. i doubt bumblebee will be replaced by a fully functional native driver
Back to top
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 411

PostPosted: Wed Apr 27, 2016 2:42 pm    Post subject: Reply with quote

EDIT: Solved it. Primus wasn't built with 32bit support. Will leave post intact in case others run into this.

I got bumblebee working (almost) properly after reading this thread but it's a bit hit and miss for me with steam.
War thunder for example works flawlessly but portal doesn't load any textures, portal 2 won't load, basically stops doing anything after the valve video (man with tap in head). I've the demo of trine 2 which renders correctly but I'm getting lower framerates than I had just running the nvidia chip for everything.

EDIT: Portal 2 does load but again, no textures, no loading screens. and frame rate is lower than it should be.

Proprietory nvidia drivers.

Code:
vblank_mode=0 primusrun glxspheres64


gives me 230 odd frames per second and 203 Mpixels/sec.

Much lower numbers without vblank_mode=0.

Code:
vblank_mode=0 primusrun glxgears


returns over 2000 frames per second.

xorg.conf has nothing in it other than a couple of xrandr lines (otherwise I only get 1 resolution that is too high for me which fits the screen).
All the bumble related files yamakuzure mentioned are the same. Same versions of bumblebee etc.

So it does work...ish. 3D is being done on the nvidia chip but with a few games I don't get textures or loading screens. So 2D rendering doesn't seem to be happening.

Any ideas?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum