From 87691a5747539f65332ec1bb940c11fa6201efa2 Mon Sep 17 00:00:00 2001 From: Val Packett Date: Fri, 28 Nov 2025 01:54:58 -0300 Subject: [PATCH] Do not wait for udev to settle Relying on udev to assign permissions to the virtgpu was very "proper" but really excessive. We have a simple static configuration, built into the kernel, so there are no dynamic shenanigans, we can always reliably just chmod/chown the permissions. Let's go back to faster booting. --- nixosModules/default.nix | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/nixosModules/default.nix b/nixosModules/default.nix index 03e3cea..a114b3a 100644 --- a/nixosModules/default.nix +++ b/nixosModules/default.nix @@ -170,21 +170,6 @@ in { serviceConfig.ExecStart = "/opt/bin/muvm-pwbridge"; }; - systemd.services.wait-for-udev = { - enable = true; - description = "Wait for device rules being applied"; - wantedBy = ["microvm.target"]; - requires = ["systemd-udevd.service"]; - after = ["systemd-udevd.service"]; - serviceConfig = { - Type = "oneshot"; - ExecStart = [ - "udevadm trigger --action=add" - "udevadm settle" - ]; - }; - }; - systemd.sockets.wayland-proxy-virtwl = { enable = true; description = "Wayland cross-domain proxy socket"; @@ -200,9 +185,9 @@ in { systemd.services.wayland-proxy-virtwl = { enable = true; description = "Wayland cross-domain proxy"; - after = ["wait-for-udev.service"]; - requires = ["wayland-proxy-virtwl.socket" "wait-for-udev.service"]; + requires = ["wayland-proxy-virtwl.socket"]; serviceConfig = { + ExecStartPre = "+/run/current-system/sw/bin/chmod 0666 /dev/dri/card0 /dev/dri/renderD128"; ExecStart = "${virtwl.packages.${pkgs.system}.proxy}/bin/wayland-proxy-virtwl --virtio-gpu"; Environment = ["XDG_RUNTIME_DIR=${runtimeDir}"]; User = "appvm";