# Availability issue for GPU Metrics sampling hardware unit on WSL

**URL:** <https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378>\
**Category:** Profiling Linux Targets\
**Tags:** nsight, wsl\
**Created:** [June 2, 2023, 5:04pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378 "2023-06-02T17:04:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dproksch](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dproksch](https://forums.developer.nvidia.com/u/dproksch)\
**Post date:** [June 2, 2023, 5:04pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/1 "2023-06-02T17:04:09Z")

</div>

Hi,

I’m trying to profile a CUDA-SYCL-based application in WSL2 (Ubuntu 20.04.6) on Win10 (with Insider Program) using Nsight Systems 2022.4.2.1 and I’m having some issues with GPU Metrics (on an RTX 3060). The profiling for the CPU works fine and doesn’t throw any errors, but then the reports contain this Daemon Error:

```auto
GPU Metrics [0]: GPU metrics sampling hardware unit is already in use by another instance of Nsight Systems or other tool. The conflict can occur within the OS as well as containers, VMs and hypervisor.
- API function: NVPW_Device_PeriodicSampler_GetCounterAvailability(¶ms)
- Error code: 20
- Source function: static std::vector QuadDDaemon::EventSource::GpuMetricsBackend::Impl::CounterConfig::GetCounterAvailabilityImage(uint32_t)
- Source location: /build/agent/work/323cb361ab84164c/QuadD/Target/quadd_d/quadd_d/jni/EventSource/GpuMetricsBackend.cpp:587

```

It’s important to say that I am using CUDA 11.8 and a CUDA driver version of 12.1, which is noted as a warning in the report:

```auto
Installed CUDA driver version (12.1) is not supported by this build of Nsight Systems. CUDA trace will be collected using libraries for driver version 11.8

```

Due to the nature of the frameworks I’m using, I’d prefer to not update the CUDA version at this current moment, if possible. There are no other instances of Nsight Systems or Compute running while I’m generating the reports.

Do you know where this issue could possibly come from and how I could fix it? Thank you in advance.

Nvidia-smi output:

```auto
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.51.01 Driver Version: 532.03 CUDA Version: 12.1 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3060 On | 00000000:05:00.0 On | N/A |
| 40% 31C P8 10W / 170W| 1478MiB / 12288MiB | 1% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 37 G /Xwayland N/A |
+---------------------------------------------------------------------------------------+

```

---

<div class="post-metadata">

**Author:** ![hwilper](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/hwilper/32/14043_2.png) [@hwilper](https://forums.developer.nvidia.com/u/hwilper)\
**Post date:** [June 20, 2023, 2:21pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/2 "2023-06-20T14:21:28Z")

</div>

@pkovalenko & Jason - is this a WSL2 issue?

---

<div class="post-metadata">

**Author:** ![864832769](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@864832769](https://forums.developer.nvidia.com/u/864832769)\
**Post date:** [July 25, 2023, 6:33am UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/3 "2023-07-25T06:33:02Z")

</div>

I encountered the same problem, did you solve it now?

---

<div class="post-metadata">

**Author:** ![dproksch](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dproksch](https://forums.developer.nvidia.com/u/dproksch)\
**Post date:** [July 25, 2023, 10:33am UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/4 "2023-07-25T10:33:04Z")

</div>

No, sadly I was not able to solve it so far. I didn’t really look into it much later, as I was able to profile directly on our GPU cluster, which was my goal in the first place. Profiling locally on WSL would have been nice for crosschecks and additional data, but it doesn’t matter much.

So, no, sry I can’t help you. I hope you find a solution.

---

<div class="post-metadata">

**Author:** ![864832769](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@864832769](https://forums.developer.nvidia.com/u/864832769)\
**Post date:** [July 25, 2023, 2:37pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/5 "2023-07-25T14:37:21Z")

</div>

Thank you bro, wish you a pleasant day.

---

<div class="post-metadata">

**Author:** ![hwilper](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/hwilper/32/14043_2.png) [@hwilper](https://forums.developer.nvidia.com/u/hwilper)\
**Post date:** [July 25, 2023, 3:27pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/6 "2023-07-25T15:27:52Z")

</div>

I’ve recently responded to another user who hit a problem specifically with the version shipped in 11.8, so I am going to recommend loading the newest Nsys version (which worked for him).

---

<div class="post-metadata">

**Author:** ![864832769](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@864832769](https://forums.developer.nvidia.com/u/864832769)\
**Post date:** [July 28, 2023, 12:23pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/7 "2023-07-28T12:23:53Z")

</div>

> [@hwilper](#):
>
> 11.8

I have already download the [Nsight Systems 2023.2.1 (Windows Host)](https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2023_2/nsightsystems-2023.2.1.122-3259852.msi/)，but it still can’t work.

---

<div class="post-metadata">

**Author:** ![hwilper](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/hwilper/32/14043_2.png) [@hwilper](https://forums.developer.nvidia.com/u/hwilper)\
**Post date:** [July 28, 2023, 2:11pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/8 "2023-07-28T14:11:55Z")

</div>

I will ping @jasoncohen directly.

---

<div class="post-metadata">

**Author:** ![ruipeterpan](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ruipeterpan](https://forums.developer.nvidia.com/u/ruipeterpan)\
**Post date:** [June 11, 2024, 5:17pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/9 "2024-06-11T17:17:24Z")

</div>

Rebooting resolved this issue for me

---

<div class="post-metadata">

**Author:** ![andor233](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@andor233](https://forums.developer.nvidia.com/u/andor233)\
**Post date:** [June 26, 2024, 2:41pm UTC](https://forums.developer.nvidia.com/t/availability-issue-for-gpu-metrics-sampling-hardware-unit-on-wsl/255378/10 "2024-06-26T14:41:12Z")

</div>

I also met the same question in WSL2(Ubuntu 22.04). The profiling for the CPU works fine and doesn’t throw any errors, but then the reports contain this Daemon Error:

```auto
GPU Metrics [0]: GPU Metrics sampling hardware unit is already in use by another instance of Nsight Systems or other tool. The conflict can occur within the OS as well as containers, VMs and hypervisor.
- API function: Nvpw.GPU_PeriodicSampler_GetCounterAvailability(&params)
- Error code: 20
- Source function: virtual std::vector<unsigned char> QuadDDaemon::EventSource::{anonymous}::GpuPeriodicSampler::GetCounterAvailabilityImage() const
- Source location: /dvs/p4/build/sw/devtools/Agora/Rel/QuadD_Main/QuadD/Target/quadd_d/quadd_d/jni/EventSource/GpuMetrics.cpp:135

```

The warning of CUDA trace in the report:

```auto
CUDA driver version on the target (12.4) is not supported by this build of Nsight Systems.
CUDA trace will be collected using libraries for older driver version but some features might be missing or work incorrectly.
Check for updates to see if there is a newer version available.

```

Do you have solved this problem?
