[SOLVED] NVidia Optimus can't run 32-bit apps (multiarch)

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[SOLVED] NVidia Optimus can't run 32-bit apps (multiarch)

Postby xman1 » 2018-03-06 18:23

Newb here - Maybe someone can help me but I am probably just overlooking something simple. Let me see if I can be as detailed as possible:

System: Laptop
Debian Stretch
intel i7-7700HQ
NVidia 1060GTX
16GB RAM

I have been fighting for days trying to get Primusrun or VIrtualGL to use the NVidia card in 32-bit applications. 64-bit applications run perfectly fine. I can run glxgears and the -info shows NVidia running and glxpheres64 also run perfectly fine also showing the NVidia GPU running. If I try and run glxspheres (32-bit) however it errors out. Steam errors out and defaults to the integrated intel. The uengine Tropics (also 32-bit) benchmark also fails to run when issued through primusrun or virtualgl but works fine if you invoke it using the integrated intel.

dpkg -add-architecture i386 was given at the start of the system, so i386 apps should be installing.

Installation for for this system was done following these guides:

https://wiki.debian.org/NvidiaGraphicsD ... figuration
https://wiki.debian.org/Bumblebee (nvidia-driver installation)

i386 was included for Primus and Virtualgl32 was also installed (as an attempted workaround) via dpkg (not in the debian repositories)

Test examples:
1. Intel runs fine:
Code: Select all
./glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xc2
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Kabylake GT2 x86/MMX/SSE2
60.813859 frames/sec - 67.868267 Mpixels/sec
59.930044 frames/sec - 66.881929 Mpixels/sec


2. Primus fails at 32-bit:
Code: Select all
primusrun ./glxspheres
/usr/bin/primusrun: line 41: warning: command substitution: ignored null byte in input
primus: fatal: failed to load any of the libraries: /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1:/usr/lib/i386-linux-gnu/nvidia/libGL.so.1:/usr/lib/nvidia/libGL.so.1
/usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1: wrong ELF class: ELFCLASS64
/usr/lib/i386-linux-gnu/nvidia/libGL.so.1: cannot open shared object file: No such file or directory                                                                                                                                                                           
/usr/lib/nvidia/libGL.so.1: cannot open shared object file: No such file or directory


3. Virtualgl fails with a different error on 32-bit:
Code: Select all
optirun -b virtualgl ./glxspheres
./glxspheres: error while loading shared libraries: libXv.so.1: cannot open shared object file: No such file or directory


4. Example of primusrun working fine with the 64-bit binary:
Code: Select all
primusrun ./glxspheres64
/usr/bin/primusrun: line 41: warning: command substitution: ignored null byte in input
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xc2
Context is Direct
OpenGL Renderer: GeForce GTX 1060/PCIe/SSE2
64.845535 frames/sec - 72.367617 Mpixels/sec
59.984805 frames/sec - 66.943042 Mpixels/sec


Things I have tried include symlinking the libGL.so.1 to the nvidia directories listed above without success.

Searching the web is of little help either. I have also completely reloaded the system and started from scratch twice now and that has not helped. I am only posting here because I have run out of ideas and hope someone else has solved this.
Last edited by xman1 on 2018-03-10 17:01, edited 1 time in total.
xman1
 
Posts: 9
Joined: 2018-03-06 17:32

Re: NVidia Optimus can't run 32-bit apps (multiarch)

Postby xman1 » 2018-03-06 20:02

While still investigating and while I would prefer the default route of using primus for dealing with optimus, I decided to try and make virtualgl work.

To fix the error, I added the i386 libraries for virtualgl for libxv:
Code: Select all
sudo apt-get install libxv1:i386


Upon trying to run a virtualgl instance, now I get the following new error:
Code: Select all
optirun -b virtualgl ./glxspheres                                                                                                                                                                                                       
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)                                                                                                                                                                                                                     
libGL error: No matching fbConfigs or visuals found                                                                                                                                                                                                                           
libGL error: failed to load driver: swrast                                                                                                                                                                                                                                     
Visual ID of window: 0x21                                                                                                                                                                                                                                                     
X Error of failed request:  GLXBadContext                                                                                                                                                                                                                                     
  Major opcode of failed request:  154 (GLX)                                                                                                                                                                                                                                   
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  30
  Current serial number in output stream:  29


I can't win on this one.
xman1
 
Posts: 9
Joined: 2018-03-06 17:32

Re: NVidia Optimus can't run 32-bit apps (multiarch)

Postby xman1 » 2018-03-06 21:11

The more I dig into this, the nvidia-driver is not installing a i386 version is what it is looking like.

Code: Select all
sudo apt-get install nvidia-driver:i386


Installing the i386 libs manually has netted some results:

Code: Select all
optirun ./glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GTX 1060/PCIe/SSE2
366.994981 frames/sec - 409.566399 Mpixels/sec
375.858224 frames/sec - 419.457778 Mpixels/sec


My question now is, why is it that i386 libs aren't installed by default? I have another system (desktop - non-optimus) where these libs were installed properly.

Note I have managed to break my intel 3D in the process... I have not solved that yet.
xman1
 
Posts: 9
Joined: 2018-03-06 17:32

Re: NVidia Optimus can't run 32-bit apps (multiarch)

Postby stevepusser » 2018-03-06 21:46

You don't install nvidia-driver for 32-bit, just its 32-bit openGL library libgl1-nvidia-glx:i386 per the wiki: https://wiki.debian.org/Steam#A64-bit_s ... 28amd64.29 It must match the version of 64-bit Nvidia that you have installed.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.2, Pale Moon 27.9.3, wine-staging 3.10, QuiteRSS 0.18.11, Linux kernel 4.17, Krita 4.0.4
User avatar
stevepusser
 
Posts: 9632
Joined: 2009-10-06 05:53

Re: NVidia Optimus can't run 32-bit apps (multiarch)

Postby xman1 » 2018-03-06 22:17

Awesome. Thanks for the reply. Not sure why this is not on the NVIdia install page, but I think it should be added. I will give this a shot.
xman1
 
Posts: 9
Joined: 2018-03-06 17:32

Re: NVidia Optimus can't run 32-bit apps (multiarch)

Postby milomak » 2018-03-07 22:24

my actually beef is with the team

what do they need for it to run

it's been not working forever
iMac - MacOS and Windows 10 (Bootcamp)/ Debian Sid (External SSD)
Laptop (64-bit) - Debian Sid, Win10,
Kodi Box - Debian Sid
milomak
 
Posts: 1696
Joined: 2009-06-09 22:20

Re: NVidia Optimus can't run 32-bit apps (multiarch)

Postby xman1 » 2018-03-10 17:00

Adding Steam helped. Things are working normally now. They should really add these 32-bit libraries to the proprietary driver page.
xman1
 
Posts: 9
Joined: 2018-03-06 17:32


Return to Hardware

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable