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

Corey O'Connor coreyoconnor at gmail.com
Sat May 3 18:56:59 CEST 2014


Progress: primus does not interfere with wine. A primusrun and lib can be
built that seamlessly supports both 32 and 64 bit linux programs. Both
glxinfo and glxgears work as expected. According to GL Extension Viewer for
Windows the Nvidia card is being used and all expected extensions are
available.

Unfortunately kwin crashes whenever I try to actually run a game under
steam. I cannot seem to disable KDE opengl compositing to avoid the crash
either. The preferences do not have an effect. Hm.

#5  0x00007f96b7c45f32 in gen7_update_renderbuffer_surface () from
/run/opengl-driver/lib/dri/i965_dri.so
#6  0x00007f96b7c3628d in brw_update_renderbuffer_surfaces () from
/run/opengl-driver/lib/dri/i965_dri.so
#7  0x00007f96b7c05fda in brw_upload_state () from
/run/opengl-driver/lib/dri/i965_dri.so
#8  0x00007f96b7bb9843 in brw_draw_prims () from
/run/opengl-driver/lib/dri/i965_dri.so
#9  0x00007f96b7a59244 in vbo_draw_arrays () from
/run/opengl-driver/lib/dri/i965_dri.so
#10 0x00007f976be86ace in KWin::GLVertexBuffer::draw(QRegion const&,
unsigned int, int, int, bool) () from
/nix/store/rpk0cdfgi8j8fcl2jfcj3baj7z5268lw-kde-workspace-4.11.6/lib/libkwinglutils.so.1

Patches:

*
https://github.com/coreyoconnor/nixpkgs/commit/c5e090b1d38cfd4147e9f53a6bec8e375d997707
*
https://github.com/coreyoconnor/nixpkgs/commit/50115e238d8951dcea3a69c7c2c1a49a18f260ed

Will open pull request once a few things are cleaned up.

Cheers,
Corey

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


On Sat, May 3, 2014 at 7:37 AM, Corey O'Connor <coreyoconnor at gmail.com>wrote:

> 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/a1b72497/attachment-0001.html 


More information about the nix-dev mailing list