Skip to content

[ubuntu] Support non-standard kernel version naming#602

Merged
rahulait merged 1 commit intoNVIDIA:mainfrom
jfernandez:support-custom-kernel-naming
Apr 28, 2026
Merged

[ubuntu] Support non-standard kernel version naming#602
rahulait merged 1 commit intoNVIDIA:mainfrom
jfernandez:support-custom-kernel-naming

Conversation

@jfernandez
Copy link
Copy Markdown
Contributor

@jfernandez jfernandez commented Feb 7, 2026

Query apt-cache for linux-headers package info once and attempt to parse the version using the existing major.minor.patch-revision regex. When the regex does not match (e.g. custom/distro kernels with non-standard naming), keep KERNEL_VERSION unchanged instead of failing. This preserves the existing resolution logic for standard Ubuntu kernels while allowing custom kernels to work without modification.

Applied to all Ubuntu/Debian variants and vgpu-manager Ubuntu variants.

Closes: #601

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Feb 7, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@jfernandez jfernandez force-pushed the support-custom-kernel-naming branch from a70822e to 88ef378 Compare February 7, 2026 17:56
Comment thread ubuntu22.04/nvidia-driver Outdated
@jfernandez
Copy link
Copy Markdown
Contributor Author

@shivakunv ready for another review.

@shivakunv
Copy link
Copy Markdown
Contributor

@jfernandez Please share the test logs for both types of kernels, if available.

@rajathagasthya LGTM. PTAL

@jfernandez
Copy link
Copy Markdown
Contributor Author

@shivakunv I will verify the latest version with our infra this week. I should get you test logs before the end of the week.

@shivakunv shivakunv self-assigned this Apr 1, 2026
@shivakunv
Copy link
Copy Markdown
Contributor

@jfernandez : Have you had a chance to test it?

Query apt-cache for linux-headers package info once and attempt to parse
the version using the existing major.minor.patch-revision regex. When the
regex does not match (e.g. custom/distro kernels with non-standard naming),
keep KERNEL_VERSION unchanged instead of failing. This preserves the
existing resolution logic for standard Ubuntu kernels while allowing
custom kernels to work without modification.

Applied to all Ubuntu/Debian variants and vgpu-manager Ubuntu variants.

Closes: NVIDIA#601
Signed-off-by: Jose Fernandez <josef@netflix.com>
@jfernandez jfernandez force-pushed the support-custom-kernel-naming branch from 0f9b25c to bbf2bf3 Compare April 2, 2026 20:11
@jfernandez
Copy link
Copy Markdown
Contributor Author

jfernandez commented Apr 2, 2026

@shivakunv Testing surfaced a gap in the initial patch: the regex ([0-9]+).* was accidentally matching our kernel's package version (6.x.y-00004-g00fabdb6286a-1), extracting 6.x.y-00004 and producing a mangled KERNEL_VERSION whose headers package doesn't exist, so the fallback never triggered. I pushed a fix changing .* to \..* to require a dot after the revision, which is always present in standard Ubuntu versions but not in our custom format.

Logic is working as expected after this change, here are the logs for both our custom kernel and standard Ubuntu:

Custom kernel (Ubuntu 22.04, 6.x.ynetflix-00004-g00fabdb6286a):

Resolving Linux kernel version...
Proceeding with Linux kernel version 6.x.ynetflix-00004-g00fabdb6286a

Standard Ubuntu kernel (Ubuntu 22.04 VM, 5.15.0-173-generic):

Resolving Linux kernel version...
Proceeding with Linux kernel version 5.15.0-173-generic

@shivakunv
Copy link
Copy Markdown
Contributor

/ok-to-test bbf2bf3

@shivakunv
Copy link
Copy Markdown
Contributor

LGTM .
PTAL @rahulait @rajathagasthya

@shivakunv
Copy link
Copy Markdown
Contributor

shivakunv commented Apr 13, 2026

@shivakunv Testing surfaced a gap in the initial patch: the regex ([0-9]+).* was accidentally matching our kernel's package version (6.x.y-00004-g00fabdb6286a-1), extracting 6.x.y-00004 and producing a mangled KERNEL_VERSION whose headers package doesn't exist, so the fallback never triggered. I pushed a fix changing .* to \..* to require a dot after the revision, which is always present in standard Ubuntu versions but not in our custom format.

Logic is working as expected after this change, here are the logs for both our custom kernel and standard Ubuntu:

Custom kernel (Ubuntu 22.04, 6.x.ynetflix-00004-g00fabdb6286a):

Resolving Linux kernel version...
Proceeding with Linux kernel version 6.x.ynetflix-00004-g00fabdb6286a

Standard Ubuntu kernel (Ubuntu 22.04 VM, 5.15.0-173-generic):

Resolving Linux kernel version...
Proceeding with Linux kernel version 5.15.0-173-generic

Thanks @jfernandez .

Could you please provide the log files for both kerbel version ?

Copy link
Copy Markdown
Contributor

@rahulait rahulait left a comment

Choose a reason for hiding this comment

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

Overall, LGTM. We only support ubuntu22.04 and higher, so changes to versions lower than that will not be used.

@rahulait
Copy link
Copy Markdown
Contributor

Merging this in. These changes will be available once we release driver versions 535.309.01, 580.159.03 and 595.71.05 and onwards.

@rahulait rahulait merged commit b63fda1 into NVIDIA:main Apr 28, 2026
63 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.

[Bug]: Ubuntu driver scripts assume standard kernel version naming, breaking custom kernels

5 participants