Please add support for non-systemd systems: the udev hooks should call some indirection script, that can then call the systemctl || another task.
On my system I added the next udev rule into /etc/udev/rules.d/ ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/bin/autorandr --batch --change --default default" Using this rule autorandr does work as expected without launcher Please add systemd IUSE to the ebuild and if not set, install the line my rule as into /lib/udev/rules.d/40-monitor-hotplug.rules and skip installing /lib/systemd/system/autorandr.service
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10640cfc65f7f7b0041f02a9f49ffedd52f9d4ca commit 10640cfc65f7f7b0041f02a9f49ffedd52f9d4ca Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2022-10-19 09:15:26 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2022-10-19 09:15:50 +0000 x11-misc/autorandr: add systemd use flag Closes: https://bugs.gentoo.org/803545 Signed-off-by: Florian Schmaus <flow@gentoo.org> x11-misc/autorandr/autorandr-1.12.1-r1.ebuild | 65 +++++++++++++++++++++++++++ x11-misc/autorandr/autorandr-9999.ebuild | 4 +- 2 files changed, 67 insertions(+), 2 deletions(-)
Still not fixed. The x11-misc/autorandr-1.12.1-r1 does not install the /lib/systemd/system/autorandr.service animore, but the /lib/udev/rules.d/40-monitor-hotplug.rules still call RUN+="/bin/systemctl start --no-block autorandr.service" Please patch the rules file with RUN+="/usr/bin/autorandr --batch --change --default default"
Indeed, looks like upstream's Makefile part where it states > echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="$(if $(findstring systemd, $(TARGETS)),/bin/systemctl start --no-block autorandr.service,${PREFIX}/bin/autorandr --batch --change --default default)"' > ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules does not work as expected.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=850afc904a3c133d9bf360723973f916658416d2 commit 850afc904a3c133d9bf360723973f916658416d2 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2022-10-20 09:01:48 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2022-10-20 10:52:37 +0000 x11-misc/autorandr: fix non-systemd udev rule, add missing pkg_postrm Also use PEP517 build mode. Closes: https://bugs.gentoo.org/803545 Signed-off-by: Florian Schmaus <flow@gentoo.org> ...1.12.1-r1.ebuild => autorandr-1.12.1-r2.ebuild} | 12 ++++++++++ x11-misc/autorandr/autorandr-9999.ebuild | 7 ++++++ ...x-install_udev-target-by-s-TARGETS-MAKECM.patch | 28 ++++++++++++++++++++++ 3 files changed, 47 insertions(+)
The Issue is back again in x11-misc/autorandr-1.14 :-( $ cat /lib/udev/rules.d/40-monitor-hotplug.rules ACTION=="change", SUBSYSTEM=="drm", RUN+="/bin/systemctl start --no-block autorandr.service"