From 4d6f96f74f9fa6e7b69790fa569ffe60267f8017 Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Sun, 30 Jun 2024 14:16:41 +0300 Subject: [PATCH] debug: add Nvidia driver info (#6715) * add nvidia driver info to systeminfo * check file exists --- src/debug/HyprCtl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index b0a0c477..571aa6d1 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -912,7 +912,10 @@ std::string systemInfoRequest(eHyprCtlOutputFormat format, std::string request) #else const std::string GPUINFO = execAndGet("lspci -vnn | grep VGA"); #endif - result += "GPU information: \n" + GPUINFO + "\n\n"; + result += "GPU information: \n" + GPUINFO; + if (GPUINFO.contains("NVIDIA") && std::filesystem::exists("/proc/driver/nvidia/version")) + result += execAndGet("cat /proc/driver/nvidia/version | grep NVRM"); + result += "\n\n"; result += "os-release: " + execAndGet("cat /etc/os-release") + "\n\n";