Skip to content

fix systemd unit conditions to work on WSL2#1782

Open
elezar wants to merge 1 commit intoNVIDIA:mainfrom
elezar:fix-systemd-unit-on-wsl
Open

fix systemd unit conditions to work on WSL2#1782
elezar wants to merge 1 commit intoNVIDIA:mainfrom
elezar:fix-systemd-unit-on-wsl

Conversation

@elezar
Copy link
Copy Markdown
Member

@elezar elezar commented Apr 16, 2026

On WSL2, nvidia-smi lives at /usr/lib/wsl/lib/nvidia-smi rather than /usr/bin or /usr/sbin, and the NVIDIA kernel modules (nvidia.ko / nvidia-current.ko) are not present since GPU access goes through the DirectX Graphics infrastructure (/dev/dxg).

Add /usr/lib/wsl/lib/nvidia-smi as a third OR ConditionPathExists and extend ExecCondition to succeed when /dev/dxg exists so the service runs on WSL2 without breaking the check on standard driver installs.

On WSL2, nvidia-smi lives at /usr/lib/wsl/lib/nvidia-smi rather than
/usr/bin or /usr/sbin, and the NVIDIA kernel modules (nvidia.ko /
nvidia-current.ko) are not present since GPU access goes through the
DirectX Graphics infrastructure (/dev/dxg).

Add /usr/lib/wsl/lib/nvidia-smi as a third OR ConditionPathExists and
extend ExecCondition to succeed when /dev/dxg exists so the service
runs on WSL2 without breaking the check on standard driver installs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar requested a review from cdesiniotis April 16, 2026 16:14
@elezar elezar added bug Issue/PR to expose/discuss/fix a bug WSL WSL/WSL2 related issue labels Apr 16, 2026
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 24521174237

Coverage remained the same at 43.32%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 14857
Covered Lines: 6436
Line Coverage: 43.32%
Coverage Strength: 0.48 hits per line

💛 - Coveralls

@cdesiniotis cdesiniotis self-assigned this Apr 16, 2026
Copy link
Copy Markdown
Contributor

@cdesiniotis cdesiniotis left a comment

Choose a reason for hiding this comment

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

Thanks @elezar. LGTM.

@cdesiniotis cdesiniotis added this to the v1.19.1 milestone Apr 16, 2026
@cdesiniotis
Copy link
Copy Markdown
Contributor

/cherry-pick release-1.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue/PR to expose/discuss/fix a bug cherry-pick/release-1.19 WSL WSL/WSL2 related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants