Skip to content

Unable to fetch GPU information in WSL windows #403

Open
@Chetan177

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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