diff --git a/gpu/gpu.go b/gpu/gpu.go index 0b19e0aba..46359e340 100644 --- a/gpu/gpu.go +++ b/gpu/gpu.go @@ -460,8 +460,7 @@ func LoadVulkanMgmt(vulkanLibPaths []string, capLibPaths []string) (int, *C.vk_h C.vk_init(vkLib, capLib, &resp) if resp.err != nil { - slog.Debug("Unable to load vulkan", "library", vkLibPath, "error", C.GoString(resp.err)) - slog.Debug("Unable to load libcap", "library", capLibPath, "error", C.GoString(resp.err)) + slog.Debug("Unable to load vulkan", "library", vkLibPath, capLibPath, "error", C.GoString(resp.err)) C.free(unsafe.Pointer(resp.err)) } else { return int(resp.num_devices), &resp.ch, vkLibPath, capLibPath diff --git a/gpu/gpu_info_vulkan.c b/gpu/gpu_info_vulkan.c index 8b0370d2c..cb2e8f67e 100644 --- a/gpu/gpu_info_vulkan.c +++ b/gpu/gpu_info_vulkan.c @@ -122,7 +122,8 @@ void vk_init(char* vk_lib_path, char* cap_lib_path, vk_init_resp_t *resp) { } if (check_perfmon(&resp->ch) != 0) { - resp->err = "Performance monitoring is not allowed. Please enable CAP_PERFMON or run as root to use Vulkan."; + resp->err = strdup("performance monitoring is not allowed. Please enable CAP_PERFMON or run as root to use Vulkan."); + LOG(resp->ch.verbose, resp->err); return; }