summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2020-03-26 12:37:52 +0000
committerintrigeri <intrigeri@boum.org>2020-03-26 12:42:15 +0000
commit4d5a472db22d6f35d628fd375c8f5f1c437dff69 (patch)
tree56a68a388572f40fc866110709ec38b323f5e68d
parenta6a3be338d8d6c6c09fb9b77cf025ad1177d6fe9 (diff)
tails-unblock-network: skip most graphics-related devices when triggering udevbugfix/17199-17228-udevadm-trigger-vs-dual-gpu+force-all-tests
On #17199 (and possibly #17228) I've seen breakage that seems to be caused by udevadm trigger: the Greeter starts just fine, but on login, systemd-logind is confused about the state of FDs (for /dev/dri/card{0,1}) it passes to X.Org: when amnesia's X.Org starts, it gets passed paused FDs which makes it abort. I suspect that's because at least one of /dev/dri/card{0,1} seem to briefly disappear and come back again when we run udevadm trigger. So let's try to avoid replaying kernel events for graphics-related devices.
-rwxr-xr-xconfig/chroot_local-includes/usr/local/lib/tails-unblock-network14
1 files changed, 11 insertions, 3 deletions
diff --git a/config/chroot_local-includes/usr/local/lib/tails-unblock-network b/config/chroot_local-includes/usr/local/lib/tails-unblock-network
index 3e33d08..b341cd1 100755
--- a/config/chroot_local-includes/usr/local/lib/tails-unblock-network
+++ b/config/chroot_local-includes/usr/local/lib/tails-unblock-network
@@ -42,9 +42,17 @@ echo "systemd-udevd has reloaded its databases." >&2
# Now we'll load any present network device previously blocked by
# the blacklist. In particular, the MAC spoofing udev rule should trigger
# for each network device added.
-echo "Restarting systemd-udev-trigger.service..." >&2
-systemctl restart systemd-udev-trigger.service
-echo "systemd-udev-trigger.service restarted." >&2
+echo "Replaying udev events..." >&2
+udevadm trigger --type=subsystems --action=add \
+ --subsystem-nomatch=backlight \
+ --subsystem-nomatch='drm*' \
+ --subsystem-nomatch=graphics
+udevadm trigger --type=devices --action=add \
+ --attr-nomatch=class=0x030000 \
+ --subsystem-nomatch=backlight \
+ --subsystem-nomatch='drm*' \
+ --subsystem-nomatch=graphics
+echo "replayed udev events." >&2
# Block until all triggers have been run. NetworkManager is started immediately
# after, and without the blocking behaviour there's a race between NM