Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

Need help with peripherals or devices?
Post Reply
Message
Author
xman1
Posts: 14
Joined: 2018-03-06 17:32

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

#1 Post by xman1 »

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: 14
Joined: 2018-03-06 17:32

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

#2 Post by xman1 »

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: 14
Joined: 2018-03-06 17:32

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

#3 Post by xman1 »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#4 Post by stevepusser »

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.
MX Linux packager and developer

xman1
Posts: 14
Joined: 2018-03-06 17:32

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

#5 Post by xman1 »

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.

milomak
Posts: 2160
Joined: 2009-06-09 22:20
Been thanked: 1 time

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

#6 Post by milomak »

my actually beef is with the team

what do they need for it to run

it's been not working forever
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

xman1
Posts: 14
Joined: 2018-03-06 17:32

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

#7 Post by xman1 »

Adding Steam helped. Things are working normally now. They should really add these 32-bit libraries to the proprietary driver page.

Svoboda
Posts: 2
Joined: 2019-03-19 19:27

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

#8 Post by Svoboda »

Hey guys, I'm facing the same problem, but I use the 340xx legacy versions, everything runs flawlessly but whenever I use primus or optirun with wine I get the following error :

Code: Select all

/usr/bin/primusrun: line 41: warning: command substitution: ignored null byte in input
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  34 ()
  Value in failed request:  0x0
  Serial number of failed request:  53
  Current serial number in output stream:  54
Any ideas ?

I installed my drivers following the optimus tutorials on the Deb wiki

Did the following : to install bumblebee and all :
sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install bumblebee-nvidia primus libgl1-nvidia-legacy-340xx-glx primus-libs:i386 libgl1-nvidia-legacy-340xx-glx:i386
And it installed this :

Code: Select all

glx-alternative-nvidia glx-diversions libegl1-nvidia-legacy-340xx libegl1-nvidia-legacy-340xx:i386 libgl1-nvidia-legacy-340xx-glx
  libgl1-nvidia-legacy-340xx-glx:i386 libgles1-nvidia-legacy-340xx libgles1-nvidia-legacy-340xx:i386 libgles2-nvidia-legacy-340xx
  libgles2-nvidia-legacy-340xx:i386 libnvidia-legacy-340xx-cfg1 libnvidia-legacy-340xx-cfg1:i386 libnvidia-legacy-340xx-eglcore
  libnvidia-legacy-340xx-glcore libnvidia-legacy-340xx-ml1 nvidia-installer-cleanup nvidia-kernel-common nvidia-legacy-340xx-alternative
  nvidia-legacy-340xx-driver-bin nvidia-legacy-340xx-driver-libs nvidia-legacy-340xx-driver-libs:i386 nvidia-legacy-340xx-driver-libs-i386:i386
  nvidia-legacy-340xx-kernel-dkms nvidia-legacy-340xx-kernel-support nvidia-legacy-340xx-vdpau-driver nvidia-modprobe nvidia-persistenced
  nvidia-settings-legacy-340xx nvidia-support xserver-xorg-video-nvidia-legacy-340xx
Any idea of any missing package that gives that error ?

Primus and Optirun works marvelously on everything but x32 programs, even with Wine. so I guess I have one i386 package missing.

Hope I can find some help, I'm kinda desperate now...
Last edited by Svoboda on 2019-03-20 06:21, edited 1 time in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#9 Post by stevepusser »

I sort of remember that with the older drivers, I had to use primus as a bridge with 32-bit Wine programs:

Code: Select all

optirun -b primus wine <windows program.exe>
or another workaround:

Code: Select all

optirun bash
optirun wine <windows program.exe>
But with the latest 390.87 drivers in Stretch, primus no longer works, but just using optirun without the bridge does. For what it's worth, I just got the Sid 410.104 drivers backported to support the 5.0 Liquorix kernel, and then got Bumblebee back to work with those drivers for 64 and 32-bit programs, including Wine apps. :D

Code: Select all

uname -a
Linux mx 5.0.0-2.1-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 5.0-1~mx17+1 (2019-03-18) x86_64 GNU/Linux

optirun inxi -G
Graphics:  Device-1: Intel driver: i915 v: kernel 
           Device-2: NVIDIA driver: nvidia v: 410.104 
           Display: x11 server: X.Org 1.19.2 driver: intel resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 410.104 
MX Linux packager and developer

Svoboda
Posts: 2
Joined: 2019-03-19 19:27

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

#10 Post by Svoboda »

Gee, well I got a GeForceGT 335M and its legacy hardware now, also, the workaround didn't work.

Oh yeah, and I tried the backports legacy drivers now, nothing changed. :cry:

Man I'm this little step behind making my system perfect.

Post Reply