debug: add Nvidia driver info (#6715)

* add nvidia driver info to systeminfo

* check file exists
This commit is contained in:
UjinT34 2024-06-30 14:16:41 +03:00 committed by GitHub
parent 8ff9410d2c
commit 4d6f96f74f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -912,7 +912,10 @@ std::string systemInfoRequest(eHyprCtlOutputFormat format, std::string request)
#else #else
const std::string GPUINFO = execAndGet("lspci -vnn | grep VGA"); const std::string GPUINFO = execAndGet("lspci -vnn | grep VGA");
#endif #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"; result += "os-release: " + execAndGet("cat /etc/os-release") + "\n\n";