Conty icon indicating copy to clipboard operation
Conty copied to clipboard

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

Open ShulkerSakura opened this issue 3 years ago • 10 comments

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.

ShulkerSakura avatar Jun 30 '22 17:06 ShulkerSakura

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!

Kron4ek avatar Jun 30 '22 18:06 Kron4ek

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 avatar Jun 30 '22 18:06 ShulkerSakura

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.

ShulkerSakura avatar Jun 30 '22 18:06 ShulkerSakura

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

Kron4ek avatar Jul 01 '22 13:07 Kron4ek

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

ShulkerSakura avatar Jul 01 '22 13:07 ShulkerSakura

They are present in the installers from here.

Kron4ek avatar Jul 01 '22 14:07 Kron4ek

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 avatar Jul 10 '22 02:07 p4cm4n

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

p4cm4n avatar Jul 10 '22 02:07 p4cm4n

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.

Kron4ek avatar Jul 10 '22 08:07 Kron4ek

Thank you very much!

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

p4cm4n avatar Jul 10 '22 10:07 p4cm4n

@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:

  • check_nvidia_driver
  • get_nvidia_driver_image
  • mount_nvidia_driver_image https://github.com/VHSgunzo/runimage/blob/main/Run.sh

VHSgunzo avatar Dec 10 '22 18:12 VHSgunzo

@Kron4ek Do you have any problems adding this fix?

VHSgunzo avatar Jan 29 '23 14:01 VHSgunzo

@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.

Kron4ek avatar Jan 29 '23 17:01 Kron4ek

@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.

VHSgunzo avatar Jan 29 '23 18:01 VHSgunzo