IMPORTANT: Project migrated to Freedesktop's GitLab: https://gitlab.freedesktop.org/JoseExposito/vkmsctl/
Command line tool and Rust crate to configure the VKMS Linux kernel driver.
It requires configfs support in VKMS (not merged yet).
$ vkmsctl --help
Command line tool to configure the VKMS Linux kernel driver
Usage: vkmsctl [OPTIONS] [COMMAND]
Commands:
create Create a new VKMS device
drm-info-to-config Read a "drm_info -j" output and generate a vkms configuration from it
list List all VKMS devices
remove Remove a VKMS device
help Print this message or the help of the given subcommand(s)
Options:
--configfs-path <CONFIGFS_PATH> Directory were configfs is mounted [default: /sys/kernel/config]
-h, --help Print help
-V, --version Print version
This command creates a new VKMS device from a JSON file:
$ sudo vkmsctl create tests/dev1.jsonThe structure of the JSON file is the following:
{
"name": "<Unique name for the device>",
"enabled": true, // Whether the device is enabled or not
"planes": [
{
"name": "<Unique name for the plane>",
"type": "primary|overlay|cursor",
"possible_crtcs": [
"<Name of the CRTC>"
]
},
{
// Other planes...
}
],
"crtcs": [
{
"name": "<Unique name for the CRTC>",
"is_writeback_enabled": false // Whether a VKMS CRTC writeback connector is enabled or not
},
{
// Other CRTCs...
}
],
"encoders": [
{
"name": "<Unique name for the encoder>",
"possible_crtcs": [
"<Name of the CRTC>"
]
},
{
// Other encoders...
}
],
"connectors": [
{
"name": "<Unique name for the connector>",
"status": "connected|disconnected|unknown",
"possible_encoders": [
"<Name of the encoder>"
]
},
{
// Other connectors...
}
]
}For a more complete example, see tests/dev1.json.
This command list all existing drm devices and generate a VKMS configuration for them.
$ drm_info -j | vkmsctl from-drm-info
[
{
// Information about the device from drm_info -j output
},
// Other devices...
]This command lists all VKMS devices as they are currently in the filesystem in JSON format:
$ vkmsctl list
[
{
// Information about the device as it is in the filesystem
},
// Other devices...
]This command disables and removes a VKMS device from the filesystem:
$ sudo vkmsctl remove <device name>