---
name: "SDL_HINT_KMSDRM_DEVICE_INDEX"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_HINT_KMSDRM_DEVICE_INDEX"
---

# SDL\_HINT\_KMSDRM\_DEVICE\_INDEX(3)

A variable that controls what KMSDRM device to use.

## NAME

SDL\_HINT\_KMSDRM\_DEVICE\_INDEX - A variable that controls what KMSDRM device to use.

## HEADER FILE

Defined in SDL3/SDL\_hints.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**#define SDL\_HINT\_KMSDRM\_DEVICE\_INDEX** *SDL\_KMSDRM\_DEVICE\_INDEX"*

## DESCRIPTION

SDL might open something like "/dev/dri/cardNN" to access KMSDRM functionality, where "NN" is a device index number. SDL makes a guess at the best index to use (usually zero), but the app or user can set this hint to a number between 0 and 99 to force selection.

This hint should be set before SDL is initialized.

## AVAILABILITY

This hint is available since SDL 3.2.0.
