Bumblebee-Project / Bumblebee

Bumblebee daemon and client rewritten in C
http://www.bumblebee-project.org/
GNU General Public License v3.0
1.29k stars 142 forks source link

Future of Bumblebee and Prime user space integration #146

Open glyptostroboides opened 12 years ago

glyptostroboides commented 12 years ago

I'm following the coding of prime (but i don't really understand the C code) and as you may know the initial nvidia support will start with 3.5 kernel. Dave Airlie has planned to merge the nouveau and intel 915 support for the next merging windows. So there will then be some things to do, to try to use prime for the Optimus case. And maybe we can get involved in user space integration development.

Can somebody explain how it will be possible to use Prime code that will land on 3.5 ? Did someone try this work on prime ? How will the use of the GPU be started and how will the kernel allow to use this GPU ?

I just wanted to now, if someone has a better understanding of what will happend after the first release candidate of 3.5 kernel.

PS : I've tried Bumblebee on Precise (master and common-dbus branch) and it work nice (and the user experience is really nice, 3.0 is a real stable and well done app, thank you so much)

starks commented 12 years ago

The devs have only begun to speculate about the userspace and I question how useful the Prime-enabled drm drivers will be on their own. I imagine one would be able to transfer data across the GPU buffers, but the core construct of having X recognize a GPU without a screen will be missing. The X and DDX trees for Prime aren't ready.

http://lists.freedesktop.org/archives/dri-devel/2012-March/020183.html http://cgit.freedesktop.org/~airlied/linux/log/?h=drm-dmabuf2

starks commented 12 years ago

I think Airlie and Samsagax have shown great demonstrations of Prime in action. Both intel+nouveau and intel+radeon should be ready for the Fall distro cycle though questions remain if every single piece will be in place.

As far as exposing Prime to the GUI, Airlie said he wants to make a Gnome-Shell extension since the terminal commands aren't straightforward.

Power management will come later: "plan is just to have nouveau turn the gpu off when certain conditions are met after a small timeout. no crtcs active, no recent activity on channels from userspace, then turn it off, any activity from userspace, then block and turn it back on."

The Ubuntu-X team is planning a Prime PPA for the 12.10 cycle to account for any missing bits that don't make the release. GPU offloading is possible for 12.10 and definite for 13.04. On-the-fly GPU switching is probable for 13.04 as well.

Where does Bumblebee fall into the equation for the next few months?

I imagine that the daemon should be branched to have optirun execute the GPU switch to nouveau and power management.

Samsagax commented 12 years ago

We are probably done here. We provided with a dirty hack to give a light of hope over the community. I think the whole project would be deprecated.

The work on prime is almost here and is performing (I was playing 0 A.D. with full graphics over my nvidia card yesterday). Only the switch bits are missing and stabilizing the whole thing. But is for real, we where a temporal workaround until a real solution appears. That solution is almost here.

I'm glad, really. Shows how the free software community works and overcome this kind of thing. BTW: https://github.com/Samsagax/prime-AUR has PKGBUILDs for prime related stuff for testing.

starks commented 12 years ago

I still think there's work to be done in terms of providing a simple user interface with per-app GPU settings once offloading lands.

However, I do agree that the Bumblebee name shouldn't ride on top of David's hard work.

Samsagax commented 12 years ago

Maybe we can just make a little PRIME helper...

starks commented 12 years ago

If I ever finish my thesis, I'll refresh my Python and teach myself Quickly.

glyptostroboides commented 12 years ago

I'm back again in this issue I've opened month ago.

And I'm wondering now about what will happend with PRIME integration. As far as I know, the new version of xrandr as to be released and the full installation of Dave Airlie work will easily be achieved for Ubuntu with xorg-edgers repository and later will be available in Ubuntu Quantal Quetzal and in Fedora 18 (of course the best "supported" distro since Dave work for RedHat).

Is now Nvidia (and ATI) GPU properly shut down when not in use ? Or does the kernel need some existing patch or more work ? Does the Airlie's Xorg commits deal with powermanagement ?

I think the answers are simply NO.

So according to me, one thing seems to be still missing : POWER MANAGEMENT.

What about the integration of some work done here with PRIME work. Especially bbswitch (maybe I should have opened a new issue in this sub-project) and maybe a new "Bumblebee-UI" : Prime-Manager or some name like this. Does anybody have any project to do some work to increase the user experience for frontend users but also simply user who need the power management ?

I've followed the progress of linux user's access to Nvidia Optimus enabled hardware through a temporary use of VGL and by developing bbswitch. We're closed to the proper support for this technology now with Airlie's work but maybe we can start to thing about what else will be needed for the simple click user.

Greetings

ArchangeGabriel commented 12 years ago

David Airlie already started to work on PM within PRIME, it's part of the work not already landed. For now on there is only initial support of PRIME in latest Kernel and X.org+drivers, more is to come with kernel 3.7, particularly PM.

hanynowsky commented 11 years ago

I have been looking forward to see the HDMI issue resolved : https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/904476 And this has been done thanks to reverse prime by Dave Airlie! It's been merged in Ubuntu 13.04. So I was wondering if it is possible to use it along with bumblebee in 13.04? Thanks

ArchangeGabriel commented 11 years ago

Just calm down! :p We will all be happy when this will be solved, but if you read carefully, this is not the case currently, only mirroring is working, under some special condition, and only with nouveau. So, if you want to use this with Bumblebee, you just need to power on your card and modprobe nouveau when pluging the screen.

ArchangeGabriel commented 11 years ago

Some old interesting stuff available here for the record: https://github.com/Bumblebee-Project/Bumblebee/issues/185

starks commented 11 years ago

Nvidia without Bumblebee

ArchangeGabriel commented 11 years ago

I think the place for this picture is more #376.

ArchangeGabriel commented 11 years ago

@Starks: Also, do you have results of vblank_mode=0 glxspheres (and even better, those from primus/vgl on the same setup for comparison)?

starks commented 11 years ago

RANDR eric@gensokyo:~$ vblank_mode=0 glxspheres Polygons in scene: 62464 Visual ID of window: 0x6f Context is Direct OpenGL Renderer: GeForce GT 555M/PCIe/SSE2 240.628184 frames/sec - 268.541053 Mpixels/sec 255.514229 frames/sec - 285.153880 Mpixels/sec 254.978469 frames/sec - 284.555971 Mpixels/sec 234.015015 frames/sec - 261.160756 Mpixels/sec

PRIMUS eric@gensokyo:~$ vblank_mode=0 primusrun glxspheres Polygons in scene: 62464 Visual ID of window: 0x20 Context is Direct OpenGL Renderer: GeForce GT 555M/PCIe/SSE2 166.975935 frames/sec - 186.345143 Mpixels/sec 169.147715 frames/sec - 188.768850 Mpixels/sec 168.329014 frames/sec - 187.855180 Mpixels/sec 167.852190 frames/sec - 187.323044 Mpixels/sec

VIRTUALGL eric@gensokyo:~$ vblank_mode=0 optirun glxspheres Polygons in scene: 62464 Visual ID of window: 0x20 Context is Direct OpenGL Renderer: GeForce GT 555M/PCIe/SSE2 97.377857 frames/sec - 108.673688 Mpixels/sec 98.361743 frames/sec - 109.771705 Mpixels/sec 101.052992 frames/sec - 112.775139 Mpixels/sec 99.608778 frames/sec - 111.163396 Mpixels/sec