Tips&Tricks - notro/gud GitHub Wiki

New VID:PID in old kernel

A UDEV rule can be used to add a VID:PID to a GUD kernel driver that doesn't support it.

Show ID's supported by the driver:

$ modinfo gud | grep alias
alias:          usb:v1D50p614Dd*dc*dsc*dp*icFFisc*ip*in*

Here is how to add support for 16d0:10a9 in a Linux v5.13 kernel:

/etc/udev/rules.d/40-usb-gud.rules

ACTION=="add", SUBSYSTEM=="usb", \
        ATTR{idVendor}=="16d0", ATTR{idProduct}=="10a9", \
        RUN+="/sbin/modprobe -b gud"

ACTION=="add", SUBSYSTEM=="drivers", ENV{DEVPATH}=="/bus/usb/drivers/gud", \
        ATTR{new_id}="16d0 10a9 ff"

Note: ff is VENDOR class interface

$ cat /sys/bus/usb/drivers/gud/new_id
16d0 10a9 ff

Use from the command line

Video player

mpv is able to output to a DRM device directly.

mpv --vo=drm --drm-connector=0.HDMI-A-1 movie.mp4

Note: v0.34.0 is needed for USB connector type devices.

Python lowlevel

kmsxx has Python bindings and can be used to do lowlevel DRM operations. See gud/tests/ for examples.

Desktop Environment

Prevent DE from grabbing the display

It's not possible to ignore or block a udev event (ref).

GNOME

Support for letting GNOME ignore displays was added in GNOME 40:

DRIVER=="gud", SUBSYSTEM=="USB", TAG+="mutter-device-ignore"