You are not logged in.

#1 2016-04-28 06:56:54

Niarbeht
Member
Registered: 2010-05-24
Posts: 6

Loading nvidia and nouveau on different chips for render offloading

Disclaimer for moderators: This might do better or belong in a different forum.  Just yell at me and move it if that's the case, and I can figure out what happened to the topic.

So, the story is I have a Macbook Pro 5,1 with two Nvidia chips.  Yep, this was from before the days of such wonderfully supported setups as Nvidia Optimus.  In it's native OSX configuration, the user is capable of selecting between the mobile 9400m GPU (256 megs reserved system memory, 16 CUDA cores), and a 9600m GT (256 megs of some kind of graphics memory I think, and 32 CUDA cores).  Changing your selection, though, necessitated the system logging you out and back in.

Enter Linux and Bumblebee.  Years ago, I discovered, through various horrible experiments involving NX server and and an old 8800, that Bumblebee can be made to, quite simply, not care at all what's offloading to where.  This led me to setting my laptop up with Bumblebee configured so that the 9400m would drive the desktop, and I could use Optirun (and later Primusrun) to offload rendering to the 9600m.  Sometimes game performance was better, sometimes it was worse.  Overall it was about the same, but the thermal load definitely went up, which tells me it was doing SOMETHING fun!

Bumblebee and Primus, however, have gotten increasingly annoying to maintain as the years have passed, especially since the Arch packages make such silly (read "actually sensible") assumptions about what drivers you should have installed.  No, pacman, for the last time, I don't want lib32-mesa-libgl to replace lib32-nvidia-libgl.

I have, however, hatched a new, and hopefully more Fun (in the Dwarf Fortress sense, most likely...) plan.  I intend to poke around and see if it's at all possible to run the nouveau driver on the 9400m with modesetting and the nvidia driver on the 9600m, which should, in horrible theory, allow me to use Nvidia's built-in driver offloading to replace Bumblebee.

I need help, though, because documentation is, as always, elusive, and my Google-fu is too weak to figure out what's necessary to pull this off.

So, I suspect I'll need to know:

1) How to force nouveau and nvidia to only load on specified devices, supposing that's even possible.

2) How to set up the Xorg.conf file appropriately (I suspect the Nvidia docs will help).

3) I'm sure there's something else I'm forgetting.

4) Oh, right, how to test that it's working.

So, if you want to help with this truly terrible idea, I'd appreciate it.  The main issue, as you can see, is answering #1.

Oh, also, "use nvidia>=364.16" is a no-go since the 9600 and 9400 fall into the nvidia-340xx bucket.  If that weren't the case, I might be able to try using modesetting plus render offloading with purely the binary blob and this madcap adventure might be easier...

EDIT: Also, a nouveau->offload->nouveau solution might be acceptable, but I'd want to wait for power management to be more or less correct in nouveau first, if only from a performance and reclocking standpoint.  Unless that's already happened and I just couldn't figure it out from the feature matrix?

Last edited by Niarbeht (2016-04-28 07:35:32)


"He says the best way out is always through.   
And I agree to that, or in so far   
As that I can see no way out but through—   
Leastways for me" -Robert Frost

Offline

#2 2016-05-16 11:25:07

Niarbeht
Member
Registered: 2010-05-24
Posts: 6

Re: Loading nvidia and nouveau on different chips for render offloading

It seems I'm able to load the nvidia module at the same time as the nouveau module by unbinding nouveau from the discrete card.  Getting into X in that configuration works, but running a modified version of https://wiki.archlinux.org/index.php/PR … rimary_GPU that X config such that the "Inactive" screen is the nvidia one results in nasty, nasty X crashes.

Both devices running nouveau doesn't seem to help, either.  Most distressing.

The search continues.  I might use a version of that config file with both devices running nvidia blob.

Why does black magic always have to be so difficult to figure out?  tongue

EDIT: An update to the both-nouveau route:
So, when running both via nouveau, I _CAN_ get multiple providers to show up via xrandr --listproviders by setting the integrated card's driver to "modesetting" and the discrete card's driver to "nouveau" in xorg.conf, but unfortunately, they both have the same name in xrandr --listproviders, "modesetting"!  More than that, trickery like using that name for both provider and sink results in complaints from xrandr (that I really should figure out who to send to), and using, say, the numbers 0 and 1 in place of the names seems to produce the same complaint!

Well, that's the closest I've gotten, so unless someone has a better idea, I guess it's back to bumblebee and pain.

Last edited by Niarbeht (2016-05-16 12:27:29)


"He says the best way out is always through.   
And I agree to that, or in so far   
As that I can see no way out but through—   
Leastways for me" -Robert Frost

Offline

Board footer

Powered by FluxBB