LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-20-2014, 11:37 AM   #1
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Bumblebee confusion


Hello,

I have a new laptop with the Optimus technology. I followed a tutorial on the Slackware Documentation Project and it looks like everything went ok. Still I can't seem to switch to the nvidia card. Perhaps I'm missing the point but I thought that if a command is preceded with primusrun, it will activate the nvidia card (see the glxgears output below - it doesn't seem to happen for me). As per the tutorial, I've disabled nouveau and installed the nvidia binary driver as described in the tutorial.

Code:
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0ff6 (rev ff)

Some info:
Code:
root@slackdell:/etc/rc.d# ls /var/log/packages | grep bumblebee
bumblebee-3.2.1-x86_64-1_bbsb
nvidia-bumblebee-337.12-x86_64-1_bbsb
root@slackdell:/etc/rc.d# lsmod | grep bumblebee
root@slackdell:/etc/rc.d# ls /var/log/packages | grep bumblebee
bumblebee-3.2.1-x86_64-1_bbsb
nvidia-bumblebee-337.12-x86_64-1_bbsb
root@slackdell:/etc/rc.d# ls /var/log/packages | grep nvidia
nvidia-bumblebee-337.12-x86_64-1_bbsb
nvidia-kernel-337.12_3.10.17-x86_64-1_bbsb
root@slackdell:/etc/rc.d# ls /var/log/packages | grep nouveau
xf86-video-nouveau-1.0.9-x86_64-2
xf86-video-nouveau-blacklist-noarch-1
root@slackdell:/etc/rc.d# lsmod | grep nvidia
root@slackdell:/etc/rc.d# lsmod | grep bumblebee
root@slackdell:/etc/rc.d# lsmod | grep intel
kvm_intel             126236  0 
kvm                   363491  1 kvm_intel
intel_agp              10864  1 i915
intel_gtt              12600  2 i915,intel_agp
snd_hda_intel          34861  0 
snd_hda_codec         143196  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_pcm                76009  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          7098  2 snd_pcm,snd_hda_intel
snd                    58630  7 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec,snd_hda_intel
crc32c_intel           14113  0 
agpgart                27267  3 drm,intel_agp,intel_gtt
ghash_clmulni_intel     4333  0


Code:
sycamorex@slackdell:~$ optirun
[  704.138302] [ERROR]Missing argument: application to run
Try `optirun --help' for more information.
sycamorex@slackdell:~$ optirun glxgears -info
[  714.092410] [ERROR]No bridge found. Try installing primus or virtualgl.
sycamorex@slackdell:~$ ls /var/log/packages | grep primus
primus-0.1.4-x86_64-1_bbsb
primusrun glxgears -info (looks like the intel card is in operation)

Code:
primusrun glxgears -info
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
GL_RENDERER   = Mesa DRI Intel(R) Haswell Mobile 
GL_VERSION    = 3.0 Mesa 9.1.7
GL_VENDOR     = Intel Open Source Technology Center
GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1 GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_envmap_bumpmap GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_separate_shader_objects GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_ARB_texture_cube_map_array GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_internalformat_query GL_ARB_shading_language_packing GL_ARB_texture_storage GL_EXT_transform_feedback GL_ARB_ES3_compatibility GL_ARB_invalidate_subdata 
296 frames in 5.0 seconds = 59.139 FPS
301 frames in 5.0 seconds = 60.004 FPS
301 frames in 5.0 seconds = 60.005 FPS

Code:
dmesg | grep bbswitch
[   32.343509] bbswitch: version 0.8
[   32.343551] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   32.343594] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[   32.347028] bbswitch: detected an Optimus _DSM function
[   32.347078] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[   32.378231] bbswitch: disabling discrete graphics
Edit: That's Slackware64 14.1

Last edited by sycamorex; 04-20-2014 at 11:48 AM.
 
Old 04-20-2014, 01:23 PM   #2
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
I think it is working. If you run a 3D program without prefixing it with primusrun/optirun, then it will fail. The fact that glxgears worked means that you did it right. You will never see millions of frames per second, as the actual update of the memory buffer (from nvidia) to your display card (intel) will only take place at most about 60 times per second. Which is (I think) faster than your eye can perceive, hence the reason that they can pull off this trick. I still hate the whole concept. When I recently rebuilt my laptop from scratch (new slack 14.1, new hybrid hdd) I scrapped optimus and just setup the intel graphics. I don't play games, so it suits me fine.
 
1 members found this post helpful.
Old 04-20-2014, 01:32 PM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836

Original Poster
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by Mark Pettit View Post
I think it is working. If you run a 3D program without prefixing it with primusrun/optirun, then it will fail. The fact that glxgears worked means that you did it right. You will never see millions of frames per second, as the actual update of the memory buffer (from nvidia) to your display card (intel) will only take place at most about 60 times per second. Which is (I think) faster than your eye can perceive, hence the reason that they can pull off this trick. I still hate the whole concept. When I recently rebuilt my laptop from scratch (new slack 14.1, new hybrid hdd) I scrapped optimus and just setup the intel graphics. I don't play games, so it suits me fine.
Thank you for your reply. Hmmm, I just ran glxgears without prefixing the command and got exactly the same output. ???
 
Old 04-20-2014, 04:07 PM   #4
WhiteWolf1776
Member
 
Registered: Oct 2010
Location: Bowling Green, KY
Distribution: Slackware
Posts: 288

Rep: Reputation: 95
The slackdoc writeup has... well.. issues imho. If you have problems the writeup here may be more useful:
https://github.com/WhiteWolf1776/Bumblebee-SlackBuilds

The output can be confusing tho, but it is I think working properly.

In short, primusrun (which should at this point always be used as the other is just... slow now) renders on the nvidia card, then pushes the image THROUGH your intel to your x screen. Optirun does this as well, but as it was initially built for network streaming it adds some extra network overhead and is therefore slower.
 
1 members found this post helpful.
Old 04-20-2014, 05:31 PM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836

Original Poster
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
OK, thank you. When I install a game, I'll test it again.

If there are any issues, please contribute to SDP to improve the quality of the article.

Your writeup confirmed a typo in the SDP writeup that I spotted while configuring it (s/bumblebee/bumblebeed)
 
Old 04-20-2014, 06:02 PM   #6
WhiteWolf1776
Member
 
Registered: Oct 2010
Location: Bowling Green, KY
Distribution: Slackware
Posts: 288

Rep: Reputation: 95
After spending a month working with folks to improve the article, the author deleted the updates and reverted it, requiring that all future updates be put in as requests into the discussion page.

I really don't have time to deal with such folks as the author, so I just point them to my github page and it's writeup instead. I'm just not going to waste my time and have the page reverted again and again.

Glad it helped.

Last edited by WhiteWolf1776; 04-20-2014 at 06:28 PM.
 
Old 04-20-2014, 06:31 PM   #7
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836

Original Poster
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by WhiteWolf1776 View Post
After spending a month working with folks to improve the article, the author deleted the updates and reverted it, requiring that all future updates be put in as requests into the comments page.

I really don't have time to deal with such folks so I just point them to my github page and it's writeup instead.

Glad it helped.
A general rule on the SDP is that anyone should feel free to make some small changes to articles. If, however, the changes are considerable, it's recommended to discuss it with the author in the discussion tab first. I can understand, however, how frustrating it must have been for you when the author dismissed all your changes.
On the plus side, nothing is lost in dokuwiki so your version is still accessible in the 'old version' sections.

I think the subject of bumblebee is going to be increasingly important as more and more laptops are equipped with such technology so it's essential that Slackware users read correct and up-to-date information. Personally, I think SDP would benefit from your contribution as you maintain the bbsb scripts but I understand that you might be reluctant to get involved again.

In any case, thank you for maintaining the scripts and replying in this thread.

Last edited by sycamorex; 04-20-2014 at 06:32 PM.
 
Old 04-20-2014, 06:58 PM   #8
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 530

Rep: Reputation: Disabled
As the author of the article I feel I should clarify a few points.

1.
Quote:
WhiteWolf1776:
After spending a month working with folks to improve the article, the author deleted the updates and reverted it, requiring that all future updates be put in as requests into the discussion page.
As we discussed over IRC about your changes, I referred you to the StyleGuide for SlackDocs. sycamorex has referenced it for you again in his post:

Quote:
sycamorex:
A general rule on the SDP is that anyone should feel free to make some small changes to articles. If, however, the changes are considerable, it's recommended to discuss it with the author in the discussion tab first.
Typo changes such as the ones sycamorex and the users before him have provided have not been touched by me. As everybody wants, they improve the quality of the article.

2. Another problem that I had to deal with due to being referenced as the article's author is that the changes primarily centered around Slackware(64)-current only (this version of -current would later become Slackware 14.1). Imagine the flurry of questions I received when 13.37 and 14.0 users were pondering why their laptops running Bumblebee could not work due to the fact that mesa was not built with "--enable-shared-glapi" for all Slackware versions up until 14.1. Hence, the changes made would fail for users who were not running -current at the time as well as for users who aren't running 14.1 or newer now. Therefore it added content but did not assist in the quality of the article or users who were and are still using other stable and supported versions of Slackware.

3. I kept WhiteWolf1776's github page for those who were interested in tracking his SlackBuilds (that primarily centered around -current) back when the original creator of the Bumblebee SlackBuilds were still maintaining his scripts for Slackware's stable versions (which also worked on -current).

Later in September, WhiteWolf1776 removed his github repo from the Sources section. Because it was his repo, I felt I had no right to put his repo back in without him agreeing to it:

Quote:
2013/09/20 11:36 ... – [Sources] whitewolf1776
Because the maintainer of the original Bumblebee SlackBuilds no longer maintains them, I changed the github download link on the wiki to WhiteWolf1776's.

Last edited by TommyC7; 04-20-2014 at 07:01 PM.
 
Old 04-20-2014, 07:06 PM   #9
WhiteWolf1776
Member
 
Registered: Oct 2010
Location: Bowling Green, KY
Distribution: Slackware
Posts: 288

Rep: Reputation: 95
The page is yours, do with it as you wish.

I would not tho understand anyone having an optimus video card setup not using at least slackware 14.1 as slackware 13.37 and 14.0's kernels had poor support for this hardware, at best. As such, I do not see it worth anyones time to continue to maintain builds for these systems as the systems would be better supported by a move to slackware 14.1

For these reasons, I have focused on the version of slackware with the best support for the systems with optimus, and left older versions of slackware alone.

I removed references to my repo from your page ealier as I was not the official maintainer of the slackbuilds and found your references to the 'other' repo pointless and confusing to new users.

As I said, do as you will with your page, I have no interest in it.
 
Old 04-20-2014, 07:38 PM   #10
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836

Original Poster
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
I really hope that you guys will eventually come to some sort of agreement. Probably, not here but via private messages / email / SDP discussion tabs, etc.

We need good documentation. Let's not bicker and argue about who killed who.
 
Old 04-20-2014, 07:50 PM   #11
WhiteWolf1776
Member
 
Registered: Oct 2010
Location: Bowling Green, KY
Distribution: Slackware
Posts: 288

Rep: Reputation: 95
Lol

Listen, I'll continue to maintain these slackbuilds for 14.1+ of slackware in the best way I know how and I'll keep the write-up on my github as clear and direct as I can. Anyone that wishes can take from there as they wish and put it where they wish. I simply was giving my opinion and reasons for not adding / updating the SDP article.
 
Old 04-21-2014, 02:01 AM   #12
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
Quote:
Originally Posted by sycamorex View Post
Thank you for your reply. Hmmm, I just ran glxgears without prefixing the command and got exactly the same output. ???
This bit worries me. As I said before, I used to run this setup over a year ago, but no longer do so as I don't game. But my understanding was that your intel card does the actual display. Then, when you run a game (or something that requires opengl), you use opti/primusrun to access the nvidia card. This requires the opengl libraries (mesa ?) that interact with nvidia. Not the ones that interact with intel. Thus a different set of libraries, but with the same name. Hence they can't be mixed or installed simultaneously. So - if your glxgears works without prefixing 'opti/primusrun', then I suspect something is wrong and you're not actually using the nvidia card at all. However, it may well be that the latest versions of bumblebee has got this behavior correct. If so, then I'm super impressed. And thanks to whitewolf too - in the days when I did get it working, I did it all off his work. But in the year that I had the laptop, and before i installed 14.1, I never really played any games and the whole installation became moot. While programs like googleearth do use it, I found I had high temperatures in my laptop. Somehow the fan-control was never right. Now with the intel 3D stack, when I run google-earth, the performance is totally acceptable and no high temperature. I have vowed that I will NEVER buy a laptop again with this cr@ppy solution.
 
Old 04-21-2014, 06:58 AM   #13
WhiteWolf1776
Member
 
Registered: Oct 2010
Location: Bowling Green, KY
Distribution: Slackware
Posts: 288

Rep: Reputation: 95
Hey Mark

Yea, bumblebee / mesa / linux kernel fixed this some time back and I use the intel vid card to play some of the lower requirement / retro games in my steam account. It renders pretty well, just has a limit... i.e. dota 2 won't play at anywhere near native resolution without primus.

Pre 14.1 mesa there were issues, and from the boards newer mesa's also had issues. Looks like again Pat picked the Goldilocks spot for the release. The issues tho are being corrected and I think the latest mesa patch has things working properly again for the other distros.

Time will tell if this solution to power limitations is going to be the only option going forward, but it's gotten pretty tough to find any laptop with a different one.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dualhead with Bumblebee NightStranger Linux - Laptop and Netbook 0 10-17-2013 09:44 PM
[SOLVED] Bumblebee Project geshuni Linux - Newbie 6 02-18-2013 02:44 AM
Problems with Bumblebee 3 a4necromant Linux - Software 2 08-04-2012 07:53 AM
[SOLVED] bumblebee again... ceh383 Slackware 8 07-27-2012 11:07 AM
[SOLVED] BumbleBee ceh383 Slackware 11 05-23-2012 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration