Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

gportay/udev-rules

Repository files navigation

udev-rules

This repository provides few udev(7) rules and some extra shell scripts. Those scripts are triggered by netlink uevents via udev(7).

Scripts are device-manager agnostics. They can be used by the busybox(1) mdev applet or within an home-made helper script (/sbin/hotplug).

NAME

hotplug-drm(7) - splits drm uevent into card's connectors uevents

hotplug-monitor(7) - setups monitor upon card's connector uevent

DESCRIPTION

hotplug-drm and hotplug-monitor are both shell scripts triggered by udev(7).

Because there is an uevent on card change but not on its connector, a script has to trigger it manually.

The goal of hotplug-drm is to split the drm uevent on card change into a sub-uevent on the card's connector. The script saves all connector's states under the /tmp/hotplug-drm directory to trigger a connector uevent only if its status has changed.

hotplug-monitor is triggered by the connector sub-uevent mentioned above. It setups the monitors layout using xrandr(1) according to a very simple ini style configuration file. This file is located either under /usr/etc/hotplug-monitor.conf or /etc/hotplug-monitor.conf.

FILES

/usr/etc/hotplug-monitor.conf Configuration file for hotplug-monitor(7).

/tmp/hotplug-drm Temporary directory used by hotplug-drm(7) to save connectors states.

REQUIREMENT

hotplug-monitor needs bash. It uses arrays to handle the conffile content line-by-line, and replacement substitution.

BUGS

Report bugs at https://github.com/gazoo74/udev-rules/issues

AUTHOR

Written by Gaël PORTAY gael.portay@savoirfairelinux.com

SEE ALSO

udev(7), netlink(7), xrandr(1)

COPYRIGHT

Copyright (c) 2017 Gaël PORTAY

This program is free software: you can redistribute it and/or modify it under the terms of the MIT License.

About

Some udev rules of my own composition

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published