Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Totally don't understand how to configure conty with nvidia driver 510.39 #49

Closed
ShulkerSakura opened this issue Jun 30, 2022 · 14 comments

Comments

@ShulkerSakura
Copy link

I'm so sorry but I can't understand the operation in the known issues
I tried to modify the conty.sh but I don't know how to extract utils.tar.gz out of it .
I tried to compile a new conty rootfs and transplant the /usr/lib/nvidia to it.
But when I create the /etc/ld.so.conf.d/nvidia.conf and write "/usr/lib/nvidia" in it, and run ldconfig.
Nothing changed, the nvidia-driver is still not working.
Run glxgears:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 28
Current serial number in output stream: 29
Run nvidia-smi:
Failed to initialize NVML: Driver/library version mismatch

Sorry I'm noob in Linux and can't understand how to do the operation in the known issues.

@Kron4ek
Copy link
Owner

Kron4ek commented Jun 30, 2022

Hello, here is how to install any driver version into Conty:

  1. Download the installer of the driver version you are currently using from nvidia.com (in this example i will use NVIDIA-Linux-x86_64-510.39.01.run).

  2. Clone the Conty github repo with git:

     $ git clone https://github.com/Kron4ek/Conty
    
  3. Obtain Arch Linux bootsrap with the create-arch-bootstrap.sh script (this will create root.x86_64 directory):

     $ sudo ./create-arch-bootstrap.sh
    
  4. Copy the driver installer into root.x86_64/opt:

     $ sudo cp ~/Downloads/NVIDIA-Linux-x86_64-510.39.01.run root.x86_64/opt
    
  5. Execute the enter-chroot.sh script to chroot into root.x86_64:

     $ sudo ./enter-chroot.sh
    
  6. Now when you are inside the chroot, remove nvidia-utils and lib32-nvidia-utils:

     # pacman -Rdd nvidia-utils lib32-nvidia-utils
    
  7. Then run the driver installer (while still being in the chroot) and let it install the driver libraries:

     # chmod +x /opt/NVIDIA-Linux-x86_64-510.39.01.run
     # /opt/NVIDIA-Linux-x86_64-510.39.01.run --no-kernel-module
    
  8. Exit the chroot:

     # exit
    
  9. Run the create-conty.sh script, which will create your custom conty.sh

  10. Done!

@ShulkerSakura
Copy link
Author

New status:
I extracted all the files in the same version of NVIDIA driver .run and copy it both to /usr/lib and /usr/lib/nvidia (Just to be foolproof) and tested the glxinfo glxgears vulkaninfo and vkcube and they all working in properly.

glxinfo -B :
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 6144 MB
Total available memory: 6144
Currently available dedicated video memory: 4407 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 510.39.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 510.39.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 510.39.01
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

glxgears :
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
822 frames in 5.0 seconds = 164.238 FPS
826 frames in 5.0 seconds = 165.006 FPS
.....

vulkaninfo :
It's too long, but it's basically all true.

vkcube :
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
Selected GPU 0: NVIDIA GeForce RTX 3060 Laptop GPU, type: DiscreteGpu

***But ***
when I try to run any wine programs which need graphics card to calculate, it is said:

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 290
Current serial number in output stream: 291

I really don't know how to solve these problems, please help me.

@ShulkerSakura
Copy link
Author

Hello, here is how to install any driver version into Conty:

  1. Download the installer of the driver version you are currently using from nvidia.com (in this example i will use NVIDIA-Linux-x86_64-510.39.01.run).
  2. Clone the Conty github repo with git:
     $ git clone https://github.com/Kron4ek/Conty
    
  3. Obtain Arch Linux bootsrap with the create-arch-bootstrap.sh script (this will create root.x86_64 directory):
     $ sudo ./create-arch-bootstrap.sh
    
  4. Copy the driver installer into root.x86_64/opt:
     $ sudo cp ~/Downloads/NVIDIA-Linux-x86_64-510.39.01.run root.x86_64/opt
    
  5. Execute the enter-chroot.sh script to chroot into root.x86_64:
     $ sudo ./enter-chroot.sh
    
  6. Now when you are inside the chroot, remove nvidia-utils and lib32-nvidia-utils:
     # pacman -Rdd nvidia-utils lib32-nvidia-utils
    
  7. Then run the driver installer (while still being in the chroot) and let it install the driver libraries:
     # chmod +x /opt/NVIDIA-Linux-x86_64-510.39.01.run
     # /opt/NVIDIA-Linux-x86_64-510.39.01.run --no-kernel-module
    
  8. Exit the chroot:
     # exit
    
  9. Run the create-conty.sh script, which will create your custom conty.sh
  10. Done!

Sorry for ingored this cause I'm editing the New Status I'll try it thank you.

@Kron4ek
Copy link
Owner

Kron4ek commented Jul 1, 2022

I extracted all the files in the same version of NVIDIA driver .run and copy it both to /usr/lib and /usr/lib/nvidia
when I try to run any wine programs which need graphics card to calculate, it is said:
X Error of failed request: BadValue (integer parameter out of range for operation)

I think you also need to copy 32-bit libraries to a proper location. I mean when you extract the nvidia (.run) installer you get the directory named "32", you need to copy files from it to conty's /usr/lib32 directory. For example:

cp NVIDIA-Linux-x86_64-510.39.01/* squashfsroot/usr/lib
cp NVIDIA-Linux-x86_64-510.39.01/32/* squashfsroot/usr/lib32

@ShulkerSakura
Copy link
Author

Oops, The driver I extracted doesn't contain a 32 bit driver files ....

@Kron4ek
Copy link
Owner

Kron4ek commented Jul 1, 2022

They are present in the installers from here.

@p4cm4n
Copy link

p4cm4n commented Jul 10, 2022

I tried the solution, but got the same with the glxgears

❯ NVIDIA_FIX=1 ./conty.sh glxgears
Running Conty

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 36
Current serial number in output stream: 37

@p4cm4n
Copy link

p4cm4n commented Jul 10, 2022

The previous version works perfectly, even with the needo of the NVIDIA_FIX parameter

@Kron4ek
Copy link
Owner

Kron4ek commented Jul 10, 2022

The previous version likely has the same driver version as your host system.

NVIDIA_FIX=1 ./conty.sh glxgears

NVIDIA_FIX has been removed several months ago. And even when it was available, it probably didn't work properly.

@p4cm4n
Copy link

p4cm4n commented Jul 10, 2022

Thank you very much!

It's closed for mee, IDK about OP.... :-/

@VHSgunzo
Copy link

VHSgunzo commented Dec 10, 2022

@Kron4ek
Hi, I am creating a similar project and have solved the problem with Nvidia driver.

To do this, I created a package with fake nvidia-utils to lighten the weight of the container and to mount external nvidia libraries.
https://github.com/VHSgunzo/runimage-fake-nvidia-utils

And created images with nvidia drivers, which are used as additional modules for the container.
https://github.com/VHSgunzo/runimage-nvidia-drivers

see how the functions are works:

@VHSgunzo
Copy link

@Kron4ek
Do you have any problems adding this fix?

@Kron4ek
Copy link
Owner

Kron4ek commented Jan 29, 2023

@VHSgunzo The problem is i don't have an Nvidia GPU and i don't want to add functions that i can't test myself. I mean even if it's something known to be working, i still need an ability to test it myself. So no Nvidia-related fixes, at least until i get some Nvidia GPU.

@VHSgunzo
Copy link

@Kron4ek
Well, I have conducted various tests of my container on different linux distributions on nvidia, amd and intel video cards and everything works as it should, with this fix. In any case, the source code is open, add this fix when you are ready.

@Kron4ek Kron4ek closed this as completed Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants