XApp.GpuInfo

Fields

Name

Type

Access

Description

display_name

str

r/w

User-visible name of the GPU.

env_strv

[str]

r/w

A string array containing alternating environment variables names and values to use to enable the gpu.

id

int

r/w

An identifier that can be used to refer to this GPU.

is_default

bool

r/w

Whether this GPU is used by default.

Methods

get_shell_env_prefix ()

Details

class XApp.GpuInfo

Information about a single GPU used for offloading. The length of env_strv will always be an even number.

get_shell_env_prefix()
Returns:

A new string, free with GLib.free().

Return type:

str

Creates a new string in a form intended to prefix a shell command, containing the appropriate name/values for this gpu. For example:

__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1