Bug 10218 - Bumblebee backport request for mga4
Summary: Bumblebee backport request for mga4
Status: RESOLVED WONTFIX
Alias: None
Product: Mageia
Classification: Unclassified
Component: Backports (show other bugs)
Version: 4
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Rémi Verschelde
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 12766
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-22 12:13 CEST by Pavel Kreuzt
Modified: 2015-07-12 00:23 CEST (History)
6 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
spec file for bumblebee 3.2.1 (3.87 KB, text/x-rpm-spec)
2013-05-22 21:21 CEST, Pavel Kreuzt
Details

Description Pavel Kreuzt 2013-05-22 12:13:26 CEST
Hi, I'm using now the new Mageia 3, a good work, but I was hoping to use bumblebee since installation in my Optimus laptop. I know it was discussed here, but I don't find the package in the repos. So, am I supposed to use the xrandr solution? Energy management is much better with bumblebee and/or primus.

Reproducible: 

Steps to Reproduce:
Comment 1 Manuel Hiebel 2013-05-22 12:17:33 CEST
it was removed from the repo but I don't remember why
Comment 2 Manuel Hiebel 2013-05-22 12:27:49 CEST
I found in my irc logs
"it uses a Randr "hack" instead :) as you loose the real intel hw support instead..."
Comment 3 Pavel Kreuzt 2013-05-22 12:39:46 CEST
But the associated packages (bbswitch and libbsd) are still in the repos. . . Maybe I can help: old Mageia 2 suffered the same problem, I had to configure only the intel integrated graphics and let optirun run the nvidia. Nvidia card was disconnected all the time except when optirun called it, then bbswitch activated it and loaded the driver from /usr/lib64/nvidia-current (without "installing" the opengl to /usr/lib) When optirun closed at program exit, bbswitch unloaded the driver again. So the solution was to leave the nvidia unconfigured from the X server, and use only the intel one. The X config optirun used was in /etc/bumblebee.
Manuel Hiebel 2013-05-22 13:13:10 CEST

CC: (none) => tmb

Comment 4 Sander Lepik 2013-05-22 14:39:00 CEST
AFAIK kernel 3.9+ and new NVIDIA driver should solve this problem. So we can have this support in Mageia 4.

CC: (none) => sander.lepik

Comment 5 Pavel Kreuzt 2013-05-22 15:42:28 CEST
It was supposed Mageia 3 will come with support for this. And that solution doesn't help with power management, which is critical on a laptop. Bumblebee stands the best alternative for this problem, and the most practical one for it doesn't require a driver or kernel change to work. I'm going to test my old bumblebee spec file in Mageia 3 and tell you if it works correctly.
Comment 6 Pavel Kreuzt 2013-05-22 21:21:05 CEST
Created attachment 4034 [details]
spec file for bumblebee 3.2.1
Comment 7 Pavel Kreuzt 2013-05-22 21:23:16 CEST
Well, I have bumblebee installed and running in my Mageia 3, and it works perfectly. I made rpm packages for my girlfriend using your spec files as base, but with newer versions of dkms-bbswitch (now 0.6) and bumblebee (now 3.2.1) and they work, just needed a pair of tweaks: first, nouveau driver must be blacklisted; second, /etc/bumblebee/bumblebee,conf must be configured with nvidia and nvidia-current as driver to use; and third, and most important, this line:

/usr/sbin/update-alternatives --set gl_conf % _sysconfdir}/ld.so.conf.d/GL/standard.conf


must be erased. The spec file I used is not perfect, but it's the attachment I made. Hope this can be used to bring bumblebee for Mageia 3, now I'm trying to make primus run too.
Comment 8 Jérôme Hénin 2013-05-23 15:12:09 CEST
Sorry, I must be dense, but I didn't get the reason for removing bumblebee from the repo. The snippet from IRC
"it uses a Randr "hack" instead :) as you loose the real intel hw support instead..."
is less than clear to me.

And even if it isn't perfect, there is no alternative at this point, is there?

Without this package, what is the recommended behavior for users with optimus hardware?

CC: (none) => heninj

Comment 9 Oleg Bosis 2013-05-23 19:56:30 CEST
bumblebee package with all other ones it requires to run (including primus) is available currently for Mageia 2 from Mageia Russian Community repository. And now I do repackage (and update) it for Mageia 3 so it should be available in several days (hopefully).

The links to the repo for Mageia 2:

32-bit
urpmi.addmedia --wget --distrib MageiaLinux.ru-i586 http://packages.mageialinux.ru/mageia2/i586/

64-bit
urpmi.addmedia --wget --distrib MageiaLinux.ru-x86_64 http://packages.mageialinux.ru/mageia2/x86_64/

If you want to repackage it for some other community repo or for official one you can find src.rpm packages here:

http://packages.mageialinux.ru/mageia2/SRPMS/

Please notice that if you're using x86_64 system and wish to run 32-bit apps with optirun (steam or wine for instance) then you need to manually install additional 32-bit packages 'libvirtualgl' and 'libprimus0' (if you would like to use primus).

CC: (none) => olegbosis

Marcello Anni 2013-06-01 16:03:21 CEST

CC: (none) => marcello.anni

Comment 10 Rémi Verschelde 2013-09-11 01:30:36 CEST
CC'ing Shlomi who imported package bumblebee. What the status on this topic?

It seems bumblebee 3.0.1 is in the packages svn/git, but not on the repos. Is there a hope to see the latest version of bumblebee included in Mageia 4?

CC: (none) => remi, shlomif

Comment 11 Rémi Verschelde 2013-09-11 01:31:45 CEST
BTW, it would be nice to update the feature page for Optimus with a proper status (malo put it to 100% when bumblebee was packaged, but since it's no longer the case, I guess it should be adjusted):

https://wiki.mageia.org/en/Feature:NvidiaOptimusSupport
Comment 12 Sander Lepik 2013-09-11 08:09:49 CEST
I don't know the background too well but is this package still needed? Shouldn't the current kernel and new NVIDIA's latest driver already provide the functionality?
Comment 13 Pavel Kreuzt 2013-09-13 19:34:20 CEST
AFAIK latest driver and kernel supports a mode for graphic offloading within the X server, but it doesn't help with power management for the Nvidia card on Optimus systems.
Comment 14 Shlomi Fish 2013-09-14 07:38:06 CEST
(In reply to Rémi Verschelde from comment #10)
> CC'ing Shlomi who imported package bumblebee. What the status on this topic?
> 
> It seems bumblebee 3.0.1 is in the packages svn/git, but not on the repos.
> Is there a hope to see the latest version of bumblebee included in Mageia 4?

That package was built by an apprentice of mine (whom I believe has since become inactive). Can I reimport it into the repository? Why was it removed?

Regards,

-- Shlomi Fish
Comment 15 Pavel Kreuzt 2013-09-19 22:37:57 CEST
Only to mention, bumblebee requires bbswitch to be packaged (which has to be done with dkms support), and it would be great to have primus also packaged.
Comment 16 Morgan Leijström 2014-01-09 03:17:20 CET
*** Bug 1748 has been marked as a duplicate of this bug. ***

CC: (none) => dglent

Comment 17 Rémi Verschelde 2014-02-16 18:03:38 CET
Bumblebee, primus and bbswitch have been packaged for Cauldron. This bug report will be used for their mga4 backport.

You will already find the packages in Mageia 4's core and nonfree backports_testing repos (but I don't intend to do an official backport request until QA has gotten more help testing the recent swarm of updates).

-- 

Packages in core/backports_testing:
===================================
bumblebee-3.2.1-5.mga4
bumblebee-nouveau-3.2.1-5.mga4
dkms-bbswitch-0.8-1.mga4
lib(64)primus-0.1-0.20131127.3.mga4
primus-0.1-0.20131127.3.mga4
primus-nouveau-0.1-0.20131127.3.mga4

Packages in nonfree/backports_testing:
======================================
bumblebee-nvidia-3.2.1-5.mga4.nonfree
primus-nvidia-0.1-0.20131127.3.mga4.nonfree

From SRPMs:
===========
bumblebee-3.2.1-5.mga4{,.nonfree}
dkms-bbswitch-0.8-1.mga4
primus-0.1-0.20131127.3.mga4{,.nonfree}

Hardware: x86_64 => All
Version: 3 => 4
Assignee: bugsquad => remi
Summary: Bumblebee package request => Bumblebee backport request for mga4

Comment 18 Pavel Kreuzt 2014-02-16 18:59:29 CET
Tested the backports-nonfree with proprietary Nvidia driver (325.15 version) and got strange results when running glxspheres. With integrated Intel card got about 50 frames/sec, running with primusrun or optirun got only about 22 or 23 frames/sec. Should I test with 331 driver version? Or does it need some extra config?
Comment 19 Rémi Verschelde 2014-02-16 21:00:19 CET
Extra config should not be needed, can you post the output of both
"vblank_mode=0 optirun -vv glxspheres" and "glxspheres"?
Comment 20 Pavel Kreuzt 2014-02-16 22:42:14 CET
[pavel@localhost ~]$ vblank_mode=0 optirun -vv glxspheres
[  559.850886] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[  559.851375] [INFO]Configured driver: nvidia
[  559.851653] [DEBUG]optirun version 3.2.1 starting...
[  559.851674] [DEBUG]Active configuration:
[  559.851682] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  559.851690] [DEBUG] X display: :8
[  559.851697] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/nvidia-current:/usr/lib/nvidia-current
[  559.851705] [DEBUG] Socket path: /var/run/bumblebee.socket
[  559.851712] [DEBUG] Accel/display bridge: primus
[  559.851719] [DEBUG] VGL Compression: proxy
[  559.851726] [DEBUG] VGLrun extra options: 
[  559.851734] [DEBUG] Primus LD Path: /usr/lib64/primus:/usr/lib/primus
[  563.137546] [INFO]Response: Yes. X is active.

[  563.137582] [INFO]Running application using primus.
[  563.137906] [DEBUG]Process glxspheres started, PID 10058.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Polygons in scene: 62464
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 310M/PCIe/SSE2
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
22.984026 frames/sec - 20.235137 Mpixels/sec
23.249496 frames/sec - 20.468856 Mpixels/sec
23.343597 frames/sec - 20.551703 Mpixels/sec
23.350504 frames/sec - 20.557784 Mpixels/sec
23.290979 frames/sec - 20.505378 Mpixels/sec


and

[pavel@localhost ~]$ glxspheres 
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Ironlake Mobile 
52.687029 frames/sec - 46.385660 Mpixels/sec
47.373938 frames/sec - 41.708015 Mpixels/sec
46.574970 frames/sec - 41.004604 Mpixels/sec
46.871610 frames/sec - 41.265765 Mpixels/sec
46.977409 frames/sec - 41.358911 Mpixels/sec
Comment 21 Oleg Bosis 2014-02-17 16:55:08 CET
Try to use pure primusrun.

If it would give you some reasonable number of FPS than there's a problem with bumblebee 3.2. When I packaged bumblebee for Mageia Russian Community repo I encountered some problems with this version of bumblebee and had to remain with version 3.1.
Jérôme Hénin 2014-02-17 17:45:33 CET

CC: heninj => (none)

Comment 22 Pavel Kreuzt 2014-02-17 18:07:06 CET
I'm also having some strange issues with Nvidia proprietary driver, version 325.15. Installed this through XFdrake, but doesn't seem to make sense to have both dkms-nvidia-current and nvidia-current-kernel-desktop module. Also temperature peaks (>80º with normal desktop). x11-driver-video-nvidia-current is missing from drakrpm list but installed through XFdrake. And trying to install these from console sometimes gets version 331, even having backports disabled. Anyone else with similar issues?
Comment 23 Pavel Kreuzt 2014-02-19 01:57:04 CET
Tryed to run nvidia-settings through primusrun to lower quality settings and got the following error:


[pavel@localhost ~]$ primusrun /usr/lib64/nvidia-current/bin/nvidia-settings -c :8
Fontconfig warning: "/etc/fonts/conf.d/65-4-sazanami-gothic.conf", line 8: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/65-4-sazanami-mincho.conf", line 8: Having multiple values in <test> isn't supported and may not work as expected
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
Segmentation fault
Comment 24 Pavel Kreuzt 2014-02-25 02:44:15 CET
Using pure primusrun or optirun with virtualgl transport gives exactly the same results. Half the FPS (22-25) given by glxspheres alone with Intel driver (about 48-50), even with vblank_mode=0. In Mga3 with same version of bumblebee and primus got near 250FPS with vblank_mode=0. Maybe some regresion in Mesa?
Comment 25 Oleg Bosis 2014-02-25 06:45:27 CET
(In reply to Pavel Kreuzt from comment #24)
> Using pure primusrun or optirun with virtualgl transport gives exactly the
> same results. Half the FPS (22-25) given by glxspheres alone with Intel
> driver (about 48-50), even with vblank_mode=0. In Mga3 with same version of
> bumblebee and primus got near 250FPS with vblank_mode=0. Maybe some
> regresion in Mesa?

Are you sure about 250FPS? I do have GeForce GT 650M and always see about 195-210FPS with glxspheres and any version of nvidia driver (on mageia 2 and mageia 3) and your video card (GeForce 310M) should have lower performance than mine.

BTW I've found interesting effect. There is a program 'fgl_glxgears' (a rotating cube with classical gears on each side) that comes with AMD's Catalyst driver. I've extracted it and ran on my laptop with nVidia graphics (mageia 3). The results are curious:

$ vblank_mode=0 primusrun fgl_glxgears 
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Using GLX_SGIX_pbuffer
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
2788 frames in 5.0 seconds = 557.600 FPS
2863 frames in 5.0 seconds = 572.600 FPS
2867 frames in 5.0 seconds = 573.400 FPS

$ vblank_mode=0 fgl_glxgears 
Using GLX_SGIX_pbuffer
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
10449 frames in 5.0 seconds = 2089.800 FPS
12627 frames in 5.0 seconds = 2525.400 FPS

So I think performance is hardly dependent on bumblebee, primus, mesa, nvidia driver versions and application-specific optimizations and could vary in very high ranges.

And you can also try to test your configuration with, for example, GpuTest: http://www.geeks3d.com/20131028/gputest-0-6-0-opengl-benchmark-for-windows-mac-os-x-and-linux-downloads/
Comment 26 Pavel Kreuzt 2014-02-25 20:16:18 CET
(In reply to Oleg Bosis from comment #25)
> (In reply to Pavel Kreuzt from comment #24)
> > Using pure primusrun or optirun with virtualgl transport gives exactly the
> > same results. Half the FPS (22-25) given by glxspheres alone with Intel
> > driver (about 48-50), even with vblank_mode=0. In Mga3 with same version of
> > bumblebee and primus got near 250FPS with vblank_mode=0. Maybe some
> > regresion in Mesa?
> 
> Are you sure about 250FPS? I do have GeForce GT 650M and always see about
> 195-210FPS with glxspheres and any version of nvidia driver (on mageia 2 and
> mageia 3) and your video card (GeForce 310M) should have lower performance
> than mine.
> 
> BTW I've found interesting effect. There is a program 'fgl_glxgears' (a
> rotating cube with classical gears on each side) that comes with AMD's
> Catalyst driver. I've extracted it and ran on my laptop with nVidia graphics
> (mageia 3). The results are curious:
> 
> $ vblank_mode=0 primusrun fgl_glxgears 
> ATTENTION: default value of option vblank_mode overridden by environment.
> ATTENTION: default value of option vblank_mode overridden by environment.
> Using GLX_SGIX_pbuffer
> ATTENTION: default value of option vblank_mode overridden by environment.
> ATTENTION: default value of option vblank_mode overridden by environment.
> ATTENTION: default value of option vblank_mode overridden by environment.
> ATTENTION: default value of option vblank_mode overridden by environment.
> 2788 frames in 5.0 seconds = 557.600 FPS
> 2863 frames in 5.0 seconds = 572.600 FPS
> 2867 frames in 5.0 seconds = 573.400 FPS
> 
> $ vblank_mode=0 fgl_glxgears 
> Using GLX_SGIX_pbuffer
> ATTENTION: default value of option vblank_mode overridden by environment.
> ATTENTION: default value of option vblank_mode overridden by environment.
> 10449 frames in 5.0 seconds = 2089.800 FPS
> 12627 frames in 5.0 seconds = 2525.400 FPS
> 
> So I think performance is hardly dependent on bumblebee, primus, mesa,
> nvidia driver versions and application-specific optimizations and could vary
> in very high ranges.
> 
> And you can also try to test your configuration with, for example, GpuTest:
> http://www.geeks3d.com/20131028/gputest-0-6-0-opengl-benchmark-for-windows-
> mac-os-x-and-linux-downloads/

My config is the default as it comes with bumblebee/primus. About the 250FPS I got in Mga3, it was a bit weird cause another laptop with more powerful GPU (GT540M) gave 220FPS and mine was a GT310M only, so I blamed on glxspheres particularities. But now I cannot achieve more than 25FPS anyway, in glxspheres or in games, with bumblebee. But the animation is smoother, it's like some kind of lag between the rendering and the "showing"
Comment 27 Pavel Kreuzt 2014-02-26 02:44:36 CET
Still testing different possibilities. Changed default bridge from primus to auto, optirun autoselects virtualgl and gives different performance levels depending on the selected transport method:

[pavel@localhost ~]$ optirun -c xv glxspheres 
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 310M/PCIe/SSE2
35.435968 frames/sec - 31.197826 Mpixels/sec
35.364769 frames/sec - 31.135143 Mpixels/sec


[pavel@localhost ~]$ optirun -c yuv glxspheres 
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 310M/PCIe/SSE2
123.635649 frames/sec - 108.848825 Mpixels/sec
121.402977 frames/sec - 106.883181 Mpixels/sec


[pavel@localhost ~]$ optirun -c rgb glxspheres 
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 310M/PCIe/SSE2
[VGL] NOTICE: RGB encoding requires RGB pixel readback, which does not match
[VGL]    the pixel format of the Pbuffer.  Disabling PBO readback.
95.316437 frames/sec - 83.916591 Mpixels/sec
98.127195 frames/sec - 86.391183 Mpixels/sec


[pavel@localhost ~]$ optirun -c jpeg glxspheres 
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 310M/PCIe/SSE2
126.587940 frames/sec - 111.448022 Mpixels/sec
126.182701 frames/sec - 111.091250 Mpixels/sec


[pavel@localhost ~]$ optirun -c proxy glxspheres 
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 310M/PCIe/SSE2
24.235083 frames/sec - 21.336567 Mpixels/sec
26.475258 frames/sec - 23.308817 Mpixels/sec


Default proxy method is the slowest, this isn't a surprise, but using it in Mga3 gave about 55-60FPS and now only about 25. Faster methods show a "jumpy" behaviour except yuv, which is smooth. I wonder why the performance in virtualgl and proxy method is exactly the same as in primus bridge or with primusrun.
Comment 28 Martin Volf 2014-03-09 19:39:01 CET
Hi,

I would like to provide for you some tests from my notebook and different effects of frames or FPS of nvidia drivers from MRC repositories or MGA4 backports repos. Please note if KWin is enabled or disabled or is used different command, then I have large differences, for information see bellow:

[yullaw@localhost ~]$ uname -a
Linux localhost.localdomain 3.12.13-desktop-2.mga4 #1 SMP Sat Feb 22 23:45:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost yullaw]# lspci -nn |grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] [10de:1140] (rev a1)

[yullaw@localhost ~]$ rpm -qa |grep nvidia-current
x11-driver-video-nvidia-current-331.49-1.mga4.nonfree
nvidia-current-doc-html-331.49-1.mga4.nonfree
nvidia-current-kernel-desktop-latest-331.49-2.mga4.nonfree
nvidia-current-kernel-3.12.13-desktop-2.mga4-331.49-2.mga4.nonfree
dkms-nvidia-current-331.49-1.mga4.nonfree

== bumblebee-3.1-0.1.mga4.mrc.x86_64.rpm
= without KWin efects:

[yullaw@localhost ~]$ optirun glxgears
2471 frames in 5.0 seconds = 494.098 FPS
2673 frames in 5.0 seconds = 534.497 FPS
2316 frames in 5.0 seconds = 463.052 FPS
2467 frames in 5.0 seconds = 493.384 FPS
2662 frames in 5.0 seconds = 532.052 FPS
[VGL] ERROR: in readback--
[VGL]    246: Window has been deleted by window manager

[yullaw@localhost ~]$ optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
66.378694 frames/sec - 58.604422 Mpixels/sec
67.709640 frames/sec - 59.779487 Mpixels/sec
66.589908 frames/sec - 58.790898 Mpixels/sec
66.960256 frames/sec - 59.117871 Mpixels/sec
66.912600 frames/sec - 59.075797 Mpixels/sec
66.244612 frames/sec - 58.486043 Mpixels/sec
69.714133 frames/sec - 61.549214 Mpixels/sec

[yullaw@localhost ~]$ vblank_mode=0 optirun glxgears
1998 frames in 5.0 seconds = 399.562 FPS
1824 frames in 5.0 seconds = 364.737 FPS
2202 frames in 5.0 seconds = 440.326 FPS
2375 frames in 5.0 seconds = 474.969 FPS
[VGL] ERROR: in readback--
[VGL]    246: Window has been deleted by window manager

[yullaw@localhost ~]$ vblank_mode=0 optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
66.226791 frames/sec - 58.470309 Mpixels/sec
66.190856 frames/sec - 58.438583 Mpixels/sec
65.715426 frames/sec - 58.018835 Mpixels/sec
62.883036 frames/sec - 55.518175 Mpixels/sec
67.081395 frames/sec - 59.224822 Mpixels/sec

=with KWin efects:

[yullaw@localhost ~]$ optirun glxgears
4494 frames in 5.0 seconds = 898.751 FPS
4660 frames in 5.0 seconds = 931.933 FPS
4624 frames in 5.0 seconds = 924.772 FPS
4560 frames in 5.0 seconds = 911.913 FPS
4590 frames in 5.0 seconds = 917.883 FPS
[VGL] ERROR: in readback--
[VGL]    246: Window has been deleted by window manager

[yullaw@localhost ~]$ optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
116.444016 frames/sec - 102.806093 Mpixels/sec
115.350583 frames/sec - 101.840723 Mpixels/sec
116.778682 frames/sec - 103.101563 Mpixels/sec
114.182143 frames/sec - 100.809130 Mpixels/sec
117.050391 frames/sec - 103.341449 Mpixels/sec
114.369129 frames/sec - 100.974216 Mpixels/sec

[yullaw@localhost ~]$ vblank_mode=0 optirun glxgears
5240 frames in 5.0 seconds = 1047.923 FPS
5366 frames in 5.0 seconds = 1073.186 FPS
5298 frames in 5.0 seconds = 1059.421 FPS
5335 frames in 5.0 seconds = 1066.801 FPS
[VGL] ERROR: in readback--
[VGL]    246: Window has been deleted by window manager

[yullaw@localhost ~]$ vblank_mode=0 optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
118.338855 frames/sec - 104.479008 Mpixels/sec
120.661961 frames/sec - 106.530032 Mpixels/sec
123.892436 frames/sec - 109.382154 Mpixels/sec
122.969531 frames/sec - 108.567339 Mpixels/sec
121.352487 frames/sec - 107.139683 Mpixels/sec
122.342926 frames/sec - 108.014122 Mpixels/sec
121.946678 frames/sec - 107.664283 Mpixels/sec

== bumblebee-3.2.1-5.mga4, bumblebee-nvidia-3.2.1-5.mga4.nonfree
= without KWin efects:

[yullaw@localhost ~]$ optirun glxgears
292 frames in 5.0 seconds = 58.208 FPS
300 frames in 5.0 seconds = 59.842 FPS
300 frames in 5.0 seconds = 59.867 FPS
300 frames in 5.0 seconds = 59.860 FPS
300 frames in 5.0 seconds = 59.855 FPS
primus: warning: dropping a frame to avoid deadlock
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 29 requests (29 known processed) with 3 events remaining.
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker

[yullaw@localhost ~]$ optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
62.036285 frames/sec - 54.770595 Mpixels/sec
59.863960 frames/sec - 52.852693 Mpixels/sec
59.861112 frames/sec - 52.850179 Mpixels/sec
59.862600 frames/sec - 52.851492 Mpixels/sec
59.863974 frames/sec - 52.852706 Mpixels/sec

[yullaw@localhost ~]$ vblank_mode=0 optirun glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
7606 frames in 5.0 seconds = 1521.182 FPS
8291 frames in 5.0 seconds = 1658.016 FPS
8269 frames in 5.0 seconds = 1653.762 FPS
8146 frames in 5.0 seconds = 1629.056 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 29 requests (29 known processed) with 0 events remaining.
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  153 (DRI2)
  Minor opcode of failed request:  8 (DRI2SwapBuffers           )
  Resource id in failed request:  0x6e00002
  Serial number of failed request:  66540
  Current serial number in output stream:  66541

[yullaw@localhost ~]$ vblank_mode=0 optirun glxspheres
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Polygons in scene: 62464
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
159.496144 frames/sec - 140.815956 Mpixels/sec
162.897662 frames/sec - 143.819088 Mpixels/sec
161.365711 frames/sec - 142.466559 Mpixels/sec
164.901239 frames/sec - 145.588006 Mpixels/sec
163.041891 frames/sec - 143.946425 Mpixels/sec
[yullaw@localhost ~]$

=without KWin:

[yullaw@localhost ~]$ optirun glxgears
279 frames in 5.0 seconds = 55.730 FPS
300 frames in 5.0 seconds = 59.857 FPS
300 frames in 5.0 seconds = 59.856 FPS
300 frames in 5.0 seconds = 59.856 FPS
primus: warning: dropping a frame to avoid deadlock
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 29 requests (29 known processed) with 0 events remaining.
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker

[yullaw@localhost ~]$ optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
61.814100 frames/sec - 54.574432 Mpixels/sec
59.855239 frames/sec - 52.844993 Mpixels/sec
59.812547 frames/sec - 52.807301 Mpixels/sec
59.911953 frames/sec - 52.895065 Mpixels/sec
59.861347 frames/sec - 52.850386 Mpixels/sec
59.865562 frames/sec - 52.854107 Mpixels/sec

[yullaw@localhost ~]$ vblank_mode=0 optirun glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
7353 frames in 5.0 seconds = 1470.554 FPS
8295 frames in 5.0 seconds = 1658.870 FPS
8326 frames in 5.0 seconds = 1665.066 FPS
8316 frames in 5.0 seconds = 1663.153 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 29 requests (29 known processed) with 0 events remaining.
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  153 (DRI2)
  Minor opcode of failed request:  8 (DRI2SwapBuffers           )
  Resource id in failed request:  0x7400002
  Serial number of failed request:  72054
  Current serial number in output stream:  72055

[yullaw@localhost ~]$ vblank_mode=0 optirun glxspheres
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Polygons in scene: 62464
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce 710M/PCIe/SSE2
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
146.663789 frames/sec - 129.486526 Mpixels/sec
149.659829 frames/sec - 132.131670 Mpixels/sec
147.461713 frames/sec - 130.190997 Mpixels/sec
149.444880 frames/sec - 131.941895 Mpixels/sec
146.160465 frames/sec - 129.042151 Mpixels/sec


Hope it helps you somehow...

CC: (none) => chipo

Comment 29 Rémi Verschelde 2014-03-09 19:47:32 CET
Thanks for this report Martin, it seems to show that the bumblebee package from the backports_testing repo works quite great on your hardware.

The difference you can see in performance with regard to the MRC package is due to the fact that Mageia's package currently uses primus as default backend, whereas the MRC package uses virtualgl. Primus proves to be more efficient on most hardware, and virtualgl can't manage Steam games, so I use it as default bridge. The virtualgl bridge can still be used with "optirun -b virtualgl".
Comment 30 Martin Volf 2014-03-09 20:16:02 CET
(In reply to Rémi Verschelde from comment #29)
> Thanks for this report Martin, it seems to show that the bumblebee package
> from the backports_testing repo works quite great on your hardware.
> 
> The difference you can see in performance with regard to the MRC package is
> due to the fact that Mageia's package currently uses primus as default
> backend, whereas the MRC package uses virtualgl. Primus proves to be more
> efficient on most hardware, and virtualgl can't manage Steam games, so I use
> it as default bridge. The virtualgl bridge can still be used with "optirun
> -b virtualgl".

May I ask you, why is so different if I use KWin and not?
Thanks
Comment 31 Rémi Verschelde 2014-03-09 20:24:51 CET
(In reply to Martin Volf from comment #30)
> (In reply to Rémi Verschelde from comment #29) 
> > The difference you can see in performance with regard to the MRC package is
> > due to the fact that Mageia's package currently uses primus as default
> > backend, whereas the MRC package uses virtualgl. Primus proves to be more
> > efficient on most hardware, and virtualgl can't manage Steam games, so I use
> > it as default bridge. The virtualgl bridge can still be used with "optirun
> > -b virtualgl".
> 
> May I ask you, why is so different if I use KWin and not?
> Thanks

I can say precisely, I hardly understand how bumblebee or its bridges work. The Kwin effects are resource-demanding, so it does not seem unrealistic that you see a performance gain when de-activating them. The performance gap seems to be quite huge with the virtualgl bridge (i.e. in your tests of the MRC package), it's probably related to the way virtualgl works. Quoting the description from virtualgl's homepage: "VirtualGL redirects 3D commands from a Unix/Linux OpenGL application onto a server-side 3D graphics card and converts the rendered 3D images into a video stream with which remote clients can interact to view and control the 3D application in real time." That's hardly an explanation, but I can't really do better :)
Comment 32 Rémi Verschelde 2014-03-09 20:27:55 CET
(In reply to Rémi Verschelde from comment #31)
> I can say precisely, I hardly understand how bumblebee or its bridges work.
s/can say/can't say/
Comment 33 Rémi Verschelde 2014-03-10 11:12:09 CET
This can't be pushed for now because of bug 12766. Mageia 4 users who do not use the backports_testing repo are currently unable to find dkms-bbswitch in rpmdrake because of the backport candidate.

Depends on: (none) => 12766

Comment 34 Shlomi Fish 2014-03-10 11:14:59 CET
Removing myself from the CC. Hangvidia can go f**k themselves.
Shlomi Fish 2014-03-10 11:15:19 CET

CC: shlomif => (none)

Comment 35 Dimitrios Glentadakis 2014-03-10 12:57:19 CET
Same as Shlomi

CC: dglent => (none)

Comment 36 Martin Volf 2014-03-12 16:45:43 CET
(In reply to Rémi Verschelde from comment #29)
> Thanks for this report Martin, it seems to show that the bumblebee package
> from the backports_testing repo works quite great on your hardware.
> 
> The difference you can see in performance with regard to the MRC package is
> due to the fact that Mageia's package currently uses primus as default
> backend, whereas the MRC package uses virtualgl. Primus proves to be more
> efficient on most hardware, and virtualgl can't manage Steam games, so I use
> it as default bridge. The virtualgl bridge can still be used with "optirun
> -b virtualgl".

Hi,

I am interest how works Steam under Bumblebee. When bumblebee-nvidia is installed and Steam is started by command optirun steam (or primusrun steam, optirun -b virtualgl steam), then I am getting a window http://img850.imageshack.us/img850/4550/snapshot1ct.png and fault in the console:

"Error: OpenGL GLX context is not using direct rendering, which may cause performance problems."

=== Software info: ===
[root@localhost yullaw]# uname -a
Linux localhost.localdomain 3.12.13-desktop-2.mga4 #1 SMP Sat Feb 22 23:45:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost yullaw]# urpmq --list-media active
Core Release
Core Updates
Core Backports Testing
Nonfree Release
Nonfree Updates
Nonfree Backports Testing
Tainted Release
Tainted Updates
Core 32bit Release
Core 32bit Updates
Nonfree 32bit Release
Nonfree 32bit Updates
Tainted 32bit Release
Tainted 32bit Updates

[root@localhost yullaw]# rpm -qa |grep bumblebee && rpm -qa |grep nvidia && rpm -qa |grep primus && rpm -qa |grep steam
bumblebee-3.2.1-6.mga4
bumblebee-nvidia-3.2.1-6.mga4.nonfree
x11-driver-video-nvidia-current-331.49-1.mga4.nonfree
primus-nvidia-0.1-0.20131127.4.mga4.nonfree
nvidia-current-kernel-3.12.13-desktop-2.mga4-331.49-2.mga4.nonfree
nvidia-current-doc-html-331.49-1.mga4.nonfree
dkms-nvidia-current-331.49-1.mga4.nonfree
nvidia-current-kernel-desktop-latest-331.49-2.mga4.nonfree
bumblebee-nvidia-3.2.1-6.mga4.nonfree
primus-nvidia-0.1-0.20131127.4.mga4.nonfree
lib64primus-0.1-0.20131127.4.mga4
primus-0.1-0.20131127.4.mga4
steam-1.0.0.36-3.mga4.nonfree

[yullaw@localhost ~]$ optirun steam
Couldn't find dpkg, please update steamdeps for your distribution.
Running Steam on mageia 4 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1393366296_client)
Installing breakpad exception handler for appid(steam)/version(1393366296_client)

(steam:15515): Gtk-WARNING **: Nelze nalézt systém motivů v module_path: "oxygen-gtk",

(steam:15515): Gtk-WARNING **: Nelze nalézt systém motivů v module_path: "oxygen-gtk",
Installing breakpad exception handler for appid(steam)/version(1393366296_client)
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
[0312/160437:ERROR:object_proxy.cc(239)] Failed to call method: org.freedesktop.systemd1.LoadFailed: Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory.
[0312/160437:WARNING:proxy_service.cc(958)] PAC support disabled because there is no system implementation
Error: OpenGL GLX context is not using direct rendering, which may cause performance problems.

For more information visit https://support.steampowered.com/kb_article.php?ref=9938-EYZB-7457.
Installing breakpad exception handler for appid(steam)/version(1393366296_client)
Installing breakpad exception handler for appid(steam)/version(1393366296_client)

** (steam:15515): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory.

** (steam:15515): WARNING **: _nm_remote_settings_ensure_inited: (NMRemoteSettings) error initializing: Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory.

Installing breakpad exception handler for appid(steam)/version(1393366296_client)
Installing breakpad exception handler for appid(steam)/version(1393366296_client)
Installing breakpad exception handler for appid(steam)/version(1393366296_client)
Generating new string page texture 7: 256x256, total string texture memory is 262,14 KB
Generating new string page texture 8: 64x256, total string texture memory is 327,68 KB
Generating new string page texture 9: 128x256, total string texture memory is 458,75 KB
Generating new string page texture 10: 48x256, total string texture memory is 507,90 KB

** (steam:15515): WARNING **: fetch_connections_done: error fetching connections: (32) Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory..
[2014-03-12 16:04:36] Startup - updater built Feb 25 2014 13:44:43
[2014-03-12 16:04:37] OvÄÅování instalace...
[2014-03-12 16:04:37] Verification complete
[2014-03-12 16:04:46] Shutdown

=== What works ===
As our Mageia user has the same issue and he found that Steam works without this warning if are installed:

[root@localhost yullaw]# rpm -qa |grep bumblebee && rpm -qa |grep nvidia && rpm -qa |grep primus && rpm -qa |grep steam
bumblebee-nouveau-3.2.1-5.mga4
bumblebee-3.2.1-5.mga4
x11-driver-video-nvidia-current-331.49-1.mga4.nonfree
nvidia-current-kernel-3.12.13-desktop-2.mga4-331.49-2.mga4.nonfree
nvidia-current-doc-html-331.49-1.mga4.nonfree
dkms-nvidia-current-331.49-1.mga4.nonfree
nvidia-current-kernel-desktop-latest-331.49-2.mga4.nonfree
lib64primus-0.1-0.20131127.3.mga4
primus-nouveau-0.1-0.20131127.3.mga4
primus-0.1-0.20131127.3.mga4
steam-1.0.0.36-3.mga4.nonfree

only this does not work:
[yullaw@localhost ~]$ optirun steam
[15648.946499] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "mouse" (module does not exist, 0)

[15648.946530] [ERROR]Aborting because fallback start is disabled.

but works:
[yullaw@localhost ~]$ primusrun steam
then a warning is gone ! No pop-up warning.

Please remove this report to separate bug, if needed.

Thank you in advance for your reply...
Comment 37 Rémi Verschelde 2014-03-12 17:11:48 CET
(In reply to Martin Volf from comment #36) 
> Hi,
> 
> I am interest how works Steam under Bumblebee. When bumblebee-nvidia is
> installed and Steam is started by command optirun steam (or primusrun steam,
> optirun -b virtualgl steam), then I am getting a window
> http://img850.imageshack.us/img850/4550/snapshot1ct.png and fault in the
> console:
> 
> "Error: OpenGL GLX context is not using direct rendering, which may cause
> performance problems."

First of all, you'd better not start Steam directly with your nvidia GPU. Start it normally, and set "primusrun %command%" (or any other flavour) the your 3D games' launch settings (this way you can continue to use the Intel driver for the games that run fine with it).

Here "primusrun steam" works, but "optirun -b virtualgl steam" just stalls and Steam never starts. I remember I got the same warning as you when I was using a home-made package for bumblebee on mga4's development version, but I can't say exactly how I fixed it. Maybe installing the 32 bit libs for primus and virtualgl solved the warning, but made that Steam doesn't start anymore with virtualgl... Either way, just start Steam without bumblebee.

Then for your games as far as I know it won't work with virtualgl, so just use primus.

> === What works ===
> As our Mageia user has the same issue and he found that Steam works without
> this warning if are installed:
> 
> [root@localhost yullaw]# rpm -qa |grep bumblebee && rpm -qa |grep nvidia &&
> rpm -qa |grep primus && rpm -qa |grep steam
> bumblebee-nouveau-3.2.1-5.mga4
> bumblebee-3.2.1-5.mga4
> lib64primus-0.1-0.20131127.3.mga4
> primus-nouveau-0.1-0.20131127.3.mga4
> primus-0.1-0.20131127.3.mga4
> 

The difference here is that you are using the nouveau driver with bumblebee, so the results may differ.

Either way, you know that bumblebee is just a hardly maintained hack, so it won't work in every situation. Just find the situation in which is works, and use it :)
Comment 38 Marcello Anni 2014-07-08 20:07:40 CEST
is it really fixed with the closure of bug #12766?

Status: NEW => REOPENED

Comment 39 Rémi Verschelde 2014-07-08 21:23:11 CEST
Only bug 12766 was fixed, you changed this bug's status from NEW to REOPENED :-)
Comment 40 Rémi Verschelde 2014-07-08 21:23:52 CEST
This backport has been well tested already by the way, I'll prepare an advisory (not sure yet if one is needed, there are ongoing discussions on this matter).
Comment 41 Marcello Anni 2014-07-12 13:47:49 CEST
i'm sorry -.-'' ok remy, i'm looking forward to test my nvidia graphic card on mageia ;-)


cheers,
marcello
Samuel Verschelde 2015-05-02 20:36:42 CEST

Component: New RPM package request => Backports

Comment 42 Rémi Verschelde 2015-06-08 15:47:46 CEST
Just an update on this: I've not assigned it to the QA team because our process for validating backports is still not ready, so there have been almost no backports pushed to Mageia 4.

Bumblebee is included in the Mageia 5 repos though, and since Mageia 5 is going to be released very soon, this backport request is no longer of high priority for me. Most likely it'll stay like that until Mageia 4's EOL.
Comment 43 Rémi Verschelde 2015-07-12 00:23:01 CEST
So I'm officially giving up on this one since Mageia 4's EOL is in two months, and I'm more focusing on supporting Mageia 5. Bumblebee stays available in backports_testing, and I'll try to fix issues if some are reported before the EOL.

Status: REOPENED => RESOLVED
Resolution: (none) => WONTFIX


Note You need to log in before you can comment on or make changes to this bug.