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

static: create device nodes if nvidia driver is loaded #259

Merged

Conversation

alfonsosanchezbeato
Copy link
Member

Do the same actions as the 71-nvidia.rules files shipped by nvidia-kernel-common-* in case the nvidia driver has been loaded in the system.

Copy link
Member

@Meulengracht Meulengracht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -0,0 +1,11 @@
#!/bin/sh -eux
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why cannot we just ship ub-create-device?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with it is that it depends on the nvidia driver version, so you get different version for 535, 550, etc. The real solution would be to let the kernel add udev rules to the system, but we are not there yet.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I actually thought this was coming from nvidia. I've changed this now.

Copy link
Collaborator

@zyga zyga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the order of calls to modprobe and Nvidia device create program relevant?

Import the 71-nvidia.rules file shipped by nvidia-kernel-common-* and
the ancillary ub-device-create executable that creates some device
nodes when the nvidia kernel module is loaded.
@alfonsosanchezbeato
Copy link
Member Author

Is the order of calls to modprobe and Nvidia device create program relevant?

Not sure, but I'm not changing the order of the udev rules here.

Copy link
Collaborator

@valentindavid valentindavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes.

@alfonsosanchezbeato
Copy link
Member Author

Fwiw, this has been tested on a device with nvidia GPU and nvidia modules.

@alfonsosanchezbeato alfonsosanchezbeato merged commit a16d386 into canonical:main Oct 17, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

4 participants