logging: fix Gpu info (#8764)

This commit is contained in:
Kamikadze 2024-12-19 04:08:57 +05:00 committed by GitHub
parent df06cb4d71
commit 23e7d8f6a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -161,7 +161,7 @@ void NCrashReporter::createAndSaveCrash(int sig) {
#if defined(__DragonFly__) || defined(__FreeBSD__) #if defined(__DragonFly__) || defined(__FreeBSD__)
finalCrashReport.writeCmdOutput("pciconf -lv | grep -F -A4 vga"); finalCrashReport.writeCmdOutput("pciconf -lv | grep -F -A4 vga");
#else #else
finalCrashReport.writeCmdOutput("lspci -vnn | grep -E (VGA|Display|3D)"); finalCrashReport.writeCmdOutput("lspci -vnn | grep -E '(VGA|Display|3D)'");
#endif #endif
finalCrashReport += "\n\nos-release:\n"; finalCrashReport += "\n\nos-release:\n";

View file

@ -976,7 +976,7 @@ std::string systemInfoRequest(eHyprCtlOutputFormat format, std::string request)
} }
} catch (...) { GPUINFO = "error"; } } catch (...) { GPUINFO = "error"; }
#else #else
const std::string GPUINFO = execAndGet("lspci -vnn | grep -E (VGA|Display|3D)"); const std::string GPUINFO = execAndGet("lspci -vnn | grep -E '(VGA|Display|3D)'");
#endif #endif
result += "GPU information: \n" + GPUINFO; result += "GPU information: \n" + GPUINFO;
if (GPUINFO.contains("NVIDIA") && std::filesystem::exists("/proc/driver/nvidia/version")) { if (GPUINFO.contains("NVIDIA") && std::filesystem::exists("/proc/driver/nvidia/version")) {

View file

@ -608,7 +608,7 @@ void logSystemInfo() {
} }
} catch (...) { GPUINFO = "error"; } } catch (...) { GPUINFO = "error"; }
#else #else
const std::string GPUINFO = execAndGet("lspci -vnn | grep -E (VGA|Display|3D)"); const std::string GPUINFO = execAndGet("lspci -vnn | grep -E '(VGA|Display|3D)'");
#endif #endif
Debug::log(LOG, "GPU information:\n{}\n", GPUINFO); Debug::log(LOG, "GPU information:\n{}\n", GPUINFO);