Skip to content

Unable to fetch GPU information in WSL windows #403

@Chetan177

Description

@Chetan177

I have an application which heavily really on hardware, The piece of code perfectly run fine on windows and macos, but when I try to run the application on WSL Windows the GPU information is empty.

Example:

package main

import (
	"fmt"

	"github.com/jaypipes/ghw"
)

func main() {
	gpu, err := ghw.GPU()
	if err != nil {
		fmt.Printf("Error getting GPU info: %v", err)
	}

	fmt.Printf("%v\n", gpu)

	for _, card := range gpu.GraphicsCards {
		fmt.Printf(" %v\n", card)
	}
}

Output when I run it inside wsl:

Image

Output in normal windows:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions