User:Dbognar/evdi

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a work in progress; treat its contents with caution - dbognar (talk | contribs).

Evdi (Extensible Virtual Device Interface) is a kernel module developed by the DisplayLink team and the goal of it is to provide a virtual monitor device which processes can draw on. These devices are typically named like DVI-I-1-1 and can be listed by programs like xrandr.

Resources
Important
This article is using the kernel version 5.15.19-gentoo with evdi version 1.10.0. Because the drm/drm_irq.h header file was [removed from kernel 5.14+], one can not install 1.9.1 version of evdi into newer kernels.

Installation

There is currently no evdi ebuild available in the official gentoo repository, but one can easily setup an alternative repositories to install a package from. These unofficial ebuild containers called overlays and one can add a new source with the eselect repository command:

root #eselect repository add brelod git https://github.com/brelod/gentoo-public
root #emerge --sync
root #emerge -avt =evdi-1.10.0

This will create a directory at /usr/src/evdi-1.10.0 which contains the source code of the kernel module wich can be installed either manually or with the dkms tool. In this article we're going to use the second way.

root #dkms install evdi/1.10.0

Configuration

To a kernel module - just like to any other programs - one can pass arguments, to modify the behavior. In case of modules these parameters are typically stored in a configuration file at /etc/modprobe.d/ or /lib/modprobe.d. The files in this director are scanned when a kernel module is loaded and the parameters (options) in it will be passed to the executable.

One can find information about the available parameters of a module by

user $modinfo evdi | grep parm
parm:           initial_loglevel:Initial log level (int)
parm:           initial_device_count:Initial DRM device count (default: 0) (ushort)
parm:           disable_texture_import:Disable fast path GPU texture import (default: 0, set 1 to disable) (ushort)


Set the initial device count to 4 as default:

root #echo 'options evdi initial_device_count=4' > /etc/modprobe.d/evdi.conf

Usage

Load the module by

root #modprobe evdi

Check the newly available virtual display devices:

user $xrandr | grep DVI
DVI-I-4-4 disconnected (normal left inverted right x axis y axis)
DVI-I-3-3 disconnected (normal left inverted right x axis y axis)
DVI-I-2-2 disconnected (normal left inverted right x axis y axis)
DVI-I-1-1 disconnected (normal left inverted right x axis y axis)