[Nix-dev] bumblebee and 32bit OpenGL on 64bit

Corey O'Connor coreyoconnor at gmail.com
Sat May 3 16:37:06 CEST 2014


This is partially resolved with:

*
https://github.com/coreyoconnor/nixpkgs/commit/a16e0763bc619948fba3351286c1e59cc5e953ee

That patch builds bumblebee with both the 32bit and 64bit libraries
provided. Using the resulting optirun 64bit opengl programs will use the
nvidia card. Using optirun32 32bit opengl programs will use the nvidia
card. A single optirun that supports both could be made by changing
virtualgl's build: The vglrun script needs to have both the 32bit and 64bit
library paths included.

That patch is not suitable to include upstream yet: The patch assumes a
64bit system. Resolvable.

However, none of this resolves using optirun with wine. The rpath that is
added to the wine programs appears to be ignored by the dlopen virtualgl
injects. AFAICT. This results in wine failing to load, well, most every
library it needs. This is not something I know how to resolve.

Instead I am going to try using primus. Which uses a slightly different
method for overriding OpenGL. Hopefully this will work with wine. If not,
well, then at least we'll have primus as an option for non wine programs.

Cheers,
Corey


-Corey O'Connor
coreyoconnor at gmail.com
http://corebotllc.com/


On Thu, May 1, 2014 at 10:30 AM, Corey O'Connor <coreyoconnor at gmail.com>wrote:

> Hello all,
> How to get the 64bit version of optirun/bumblebee to locate the 32bit
> libraries when required?
>
> I'm unable to run 32bit software (wine) using optirun. The 32bit virtualgl
> libraries cannot be loaded:
>
> ERROR: ld.so: object
> '/nix/store/z0xqj8ilkpvk1lhy43jn53hslzq7sy48-virtualgl-2.3.2/lib/libdlfaker.so'
> from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
> ERROR: ld.so: object
> '/nix/store/z0xqj8ilkpvk1lhy43jn53hslzq7sy48-virtualgl-2.3.2/lib/librrfaker.so'
> from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
>
> If I use optirun built for i686 but bumblebeed built for 64bit I can get
> glxinfo to work as expected. However, I cannot get wine to run as expected.
> Wine, even with started with the 32bit optirun seems to switch back to the
> system optirun. Or just bypasses optirun entirely.
>
> Installing the 32bit bumblebee system wide results in bumblebeed failing
> to initialize the nvidia driver:
> May 01 00:07:25 flop bumblebeed[16192]: [XORG] (EE) NVIDIA(0): Failed to
> initiate mode change.
> May 01 00:07:25 flop bumblebeed[16192]: [XORG] (EE) NVIDIA(0): Failed to
> complete mode change
>
> I have tried to enable the 64bit bumblebeed with a 32bit optirun installed
> system wide. This, oddly, results in optirun unable to LD_PRELOAD the 32bit
> or 64bit libraries.
>
> According to the Arch documentation the 64bit optirun/bumblebeed should
> also work for 32bit software so long as both 32/64 libraries are installed.
> I'm not sure how this is done.
>
> Anybody have experience with this?
>
> -Corey O'Connor
> coreyoconnor at gmail.com
> http://corebotllc.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140503/4afc99af/attachment.html 


More information about the nix-dev mailing list