Skip to content

Commit a30d34a

Browse files
Fixed glxinfo output being displayed when fetching GPU
1 parent 80af51e commit a30d34a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
## v1.1.0
22
+ Changed gpu stat to use glxinfo instead of lspci
3-
+ Added integrated and dedicated GPU detection
3+
+ Added integrated and dedicated GPU detection
4+
5+
## v1.1.1
6+
+ Fixed glxinfo output being displayed when fetching GPU

src/catnaplib/global/version.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const VERSION* = static: "1.1.0"
1+
const VERSION* = static: "1.1.1"

src/catnaplib/platform/probe.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ proc getGpu*(): string =
347347
if defined(linux) or defined(bsd):
348348
let tmpFile = "glxinfo.txt".toTmpPath
349349

350-
if execCmd("glxinfo -B &> " & tmpFile) != 0:
350+
if execCmd("glxinfo -B > " & tmpFile & " 2>&1") != 0:
351351
if readFile(tmpFile).strip() == "Error: unable to open display":
352352
result = "Unknown"
353353
else: logError("Failed to fetch GPU!")

0 commit comments

Comments
 (0)