Skip to content

Commit 67e4d80

Browse files
HardwareHelper: Add support for mining class NVIDIA GPUs
NVIDIA released a set of crypto mining GPUs in 2017, these are fused down and totally unable to do anything aside from compute aka crypto and surprisingly also AI workloads. (even if Pascal is awful for low precision and very dated) However as these GPUs lack any sort of outputs as the display engine is disabled, NVIDIA labelled these GPUs as "3D Controllers" in the PCI database, rendering them not detected by StabilityMatrix. Add support for them in the HardwareInfo helper.
1 parent efcf9e7 commit 67e4d80

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

StabilityMatrix.Core/Helper/HardwareInfo/HardwareHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private static IEnumerable<GpuInfo> IterGpuInfoWindows()
7070
[SupportedOSPlatform("linux")]
7171
private static IEnumerable<GpuInfo> IterGpuInfoLinux()
7272
{
73-
var output = RunBashCommand("lspci | grep VGA");
73+
var output = RunBashCommand("lspci | grep -E 'VGA|3D'");
7474
var gpuLines = output.Split("\n");
7575

7676
var gpuIndex = 0;
@@ -87,10 +87,10 @@ private static IEnumerable<GpuInfo> IterGpuInfoLinux()
8787
string? name = null;
8888

8989
// Parse output with regex
90-
var match = Regex.Match(gpuOutput, @"VGA compatible controller: ([^\n]*)");
90+
var match = Regex.Match(gpuOutput, @"(VGA compatible controller|3D controller): ([^\n]*)");
9191
if (match.Success)
9292
{
93-
name = match.Groups[1].Value.Trim();
93+
name = match.Groups[2].Value.Trim();
9494
}
9595

9696
match = Regex.Match(gpuOutput, @"prefetchable\) \[size=(\\d+)M\]");

0 commit comments

Comments
 (0)