From: Mathias Svensson Date: Thu, 4 Feb 2016 11:56:20 +0000 (+0100) Subject: Implemented the suggestions X-Git-Tag: 1.0~28^2 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=7d127f5879a929868d0a69ff6cd37a0876f9bac2 Implemented the suggestions --- diff --git a/contrib/pm-utils/40autorandr b/contrib/pm-utils/40autorandr index 4197224..0c10748 100755 --- a/contrib/pm-utils/40autorandr +++ b/contrib/pm-utils/40autorandr @@ -36,6 +36,10 @@ detect_display() done } +if grep -q systemd $(readlink -f $(awk '{print $1}' /proc/1/cmdline)) && [ "$2" = "udev" ]; then + exec /bin/systemctl start autorandr-resume.service +fi + case "$1" in thaw|resume) detect_display diff --git a/contrib/udev/40-monitor-hotplug.rules b/contrib/udev/40-monitor-hotplug.rules index 116bf86..7813bef 100644 --- a/contrib/udev/40-monitor-hotplug.rules +++ b/contrib/udev/40-monitor-hotplug.rules @@ -1 +1 @@ -ACTION=="change", SUBSYSTEM=="drm", RUN+="/bin/systemctl start autorandr-resume.service" +ACTION=="change", SUBSYSTEM=="drm", RUN+="/etc/pm/sleep.d/40autorandr thaw udev"