Skip to content

Scope name mismatch #140

Description

@james-1024

First of all, thank you for this amazing tool! I'm running on CachyOS (Arch based) and installed via the AUR (again, thanks for making this so easy).

I was having issues with my webcam, and after some faultfinding with Gemini I realised that the hotplug script is referencing a scope that does not exist on my machine. In my installation, systemd has called the scope intunme,.scope, whereas the script looks for machine-intuneme.scope. Gemini suggests that "machine-" is prepended when the container is registered in certain ways (interactively), or potentially with older versions of systemd-nspawn.

systemctl set-property "machine-${MACHINE}.scope" DevicePolicy=auto "DeviceAllow=$DEVNODE rwm" 2>/dev/null || true

❯ systemctl status machine-intuneme.scope

Unit machine-intuneme.scope could not be found.

~
❯ systemctl status machine.slice
● machine.slice - Virtual Machine and Container Slice
     Loaded: loaded ([/usr/lib/systemd/system/machine.slice](file:///usr/lib/systemd/system/machine.slice); static)
     Active: active since Wed 2026-04-08 17:08:45 BST; 51min ago
 Invocation: 12df17c60eae413ebcc13ba0e08858d1
       Docs: man:systemd.special(7)
 Act. Units: 1
      Tasks: 73
     Memory: 2.1G (peak: 3.7G)
        CPU: 9min 44.575s
     CGroup: /machine.slice
             └─intuneme.scope
               └─payload
                 ├─init.scope

As a workaround (as the hotplug script is re-created every time the container runs) I have created a systemd rule to fix it:
/etc/systemd/system/intuneme.scope.d/webcam.conf

[Scope]
DeviceAllow=char-video4linux rwm
DeviceAllow=char-media rwm

Perhaps a check for "machine-${MACHINE}.scope" and "${MACHINE}.scope" before the systemctl set-property call?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions