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.
This commit is contained in:
parent
73fdfca030
commit
87691a5747
1 changed files with 2 additions and 17 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue