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

tegra lib folder wrong nvidia-tegra.conf ld.so path #9

Open
mrcmunir opened this issue Feb 22, 2024 · 6 comments
Open

tegra lib folder wrong nvidia-tegra.conf ld.so path #9

mrcmunir opened this issue Feb 22, 2024 · 6 comments

Comments

@mrcmunir
Copy link

mrcmunir commented Feb 22, 2024

As the installation title said, the image generation are wrong.

It's not /usr/lib/tegra
Tegra folder it's in /usr/lib/aarch64-linux-gnu/tegra and /usr/lib/aarch64-linux-gnu/tegra-egl

Otherwise any call to X11 or wayland GUI doesn't work will fail.

@defunctzombie
Copy link
Owner

I don't follow the issue. Which image generation is wrong? Could you be more specific on what you are referring to?

@mrcmunir
Copy link
Author

mrcmunir commented Jun 17, 2024

I don't follow the issue. Which image generation is wrong? Could you be more specific on what you are referring to?

I mean that by default I don't see the symbolik link config files to tegra blobs folders
How to see in Official Nvidia images.in etc/ld.so.conf.d/
The tegra libraries are copy in
/usr/lib/aarch64-linux-gnu/tegra
/usr/lib/aarch64-linux-gnu/tegra-egl
But doesn't exist aarch64-linux-gnu_EGL.conf and aarch64-linux-gnu_GL.conf pointer to this in ld.so.conf files .

@defunctzombie
Copy link
Owner

Sorry but I don't understand what you are describing. There's nothing about those symlinks in this repo - maybe those are something that the tegra install itself does?

@mrcmunir
Copy link
Author

Sorry but I don't understand what you are describing. There's nothing about those symlinks in this repo - maybe those are something that the tegra install itself does?

Yes It is related to the tegra packages that are installed
Because if you look at the file inside in /etc/ld.so.conf.d
nvidia-tegra.conf
Points to /usr/lib/tegra and not /usr/lib/aarch64-linux-gnu/tegra

So you can see what I mean here is an example.
https://github.com/balena-io-examples/jetson-examples/blob/master/jetson-nano/Dockerfile#L25

Since it is a folder that is not /usr/lib by default, it is necessary for ld.so.conf to find it by adding it.

@defunctzombie
Copy link
Owner

Can you find a reference to the nvidia installation docs about this file needing to be added? That above dockerfile does not have any comment on why this would be needed - in typical debian package installs such things are handled by the packages themselves.

What fails because you don't have this added reference in ld.so.conf?

I am happy to review a PR adding this entry but we'd need to write a comment or reference some docks on why we have to take this extra manual step.

@mrcmunir
Copy link
Author

mrcmunir commented Jun 18, 2024

Can you find a reference to the nvidia installation docs about this file needing to be added? That above dockerfile does not have any comment on why this would be needed - in typical debian package installs such things are handled by the packages themselves.

You can guide yourself from the official images, you will see in that folder how they point to that folder
The reasons are why I will explain below.

What fails because you don't have this added reference in ld.so.conf?
I am happy to review a PR adding this entry but we'd need to write a comment or reference some docks on why we have to take this extra manual step.

The problem is the default path in the standard Linux structure is /usr/lib or /usr/local/lib but in this case is not for tegra folder.

If it does not have a .conf file as a pointer to a non-standardized folder such as the tegra/tegra-egl folder init, it will not find that library, causing an error when loading and you will not be able to access the GPU correctly.
You can see when you do a dmesg that it doesn't find the library in the right place (i.e GLX init , GL core init , Vukan init and more ).

It looks like Nvidia customized the process manually and it was overlooked in their .deb packages.

It is a bit chaotic to understand in the official documentation since apparently Nvidia uses various scripts to generate the image
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/manifest_jetson_nano.html
Since the structure has different scripts for each thing.
apply_binaries.sh
nv-apply-debs.sh

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

2 participants