- Which kernel does the manager target?
- Why use the default boot kernel?
- Does the target kernel have to be running?
- What if matching
kernel-develis missing? - What does
needs-rebuildcheck? - What do exit codes 0 and 1 mean?
- Why can systemd show
status=1/FAILURE? - What does "Skipped due to exec-condition" mean?
- What happens if the
.koexists but is unsigned? - What happens if it is signed by another key?
- Does
rebuildalways compile? - Where are the keys?
- What does
statuscheck? - How do I check Secure Boot and MOK enrollment?
- Why can
mokutil --test-keysay enrolled but return 1? - How do I inspect the target module?
- What happens after
dnf upgradeinstalls a new kernel? - Is systemd executed at every boot?
- Does the project use a DNF hook?
- Does
enable-systemdoverwrite an existing unit? - How do I test the service without rebooting?
- How do I disable it?
- Why might
grubby --default-kernelneed root? - Do BIOS/UEFI updates require a rebuild?
- What if
/dev/video10is missing? - How do I remove everything managed locally?
- What is the difference between
uninstall,purge, and direct DNF removal?
The Fedora default boot kernel, not simply the newest installed
kernel-devel.
sudo grubby --default-kernelThe returned /boot/vmlinuz-... basename determines the exact kernel version
used by both needs-rebuild and rebuild.
Because an installed kernel is not necessarily the kernel Fedora is configured
to boot. Using grubby --default-kernel keeps the module target aligned with
Fedora's boot configuration.
No. If the default boot kernel differs from uname -r, the manager builds and
signs the module for the default boot kernel but does not try to load that module
into the currently running kernel.
The manager stops. Install the exact matching package:
TARGET="$(sudo grubby --default-kernel)"
TARGET="${TARGET##*/}"
TARGET="${TARGET#vmlinuz-}"
sudo dnf install "kernel-devel-$TARGET"It checks:
/lib/modules/<default-boot-kernel>/updates/v4l2loopback.ko
and verifies its signer with modinfo -F signer.
It also checks MOK enrollment so trust problems can be reported separately.
Missing enrollment does not force a rebuild when the .ko already has the
expected signer.
A valid signer contains:
V4L2Loopback Module Signing
0 -> module is missing or signature is invalid
rebuild is required
1 -> module exists and expected signature is present
rebuild is not required
This inverted-looking behavior is deliberate because needs-rebuild is used by
systemd ExecCondition=.
For an ExecCondition=, exit status 1 means the condition is false. Here that
means the module is already valid and ExecStart= should be skipped. It does
not mean compilation failed.
Normally:
module exists
+ expected signer is present
-> needs-rebuild returns 1
-> ExecStart is skipped
That is the desired no-op path.
needs-rebuild returns 0. rebuild compiles a fresh module, signs it with the
project MOK and replaces the invalid module.
The same: it is treated as requiring rebuild because the signer does not match
V4L2Loopback Module Signing.
No. A manual rebuild independently validates the module. If the target .ko
already exists and has the expected signer, it returns without compiling.
/var/lib/shim-signed/mok/v4l.key
/var/lib/shim-signed/mok/v4l.der
The private key should remain mode 0600.
Run:
v4l2loopback statusIt reports the Fedora default boot kernel, Secure Boot state, local signing-key files, MOK enrollment, target-module existence, module signer, and whether the module is loaded when the target kernel is the running kernel.
A healthy setup ends with:
β
v4l2loopback signing state is ready.
v4l2loopback status
mokutil --sb-state
mokutil --list-enrolled |
grep -A5 -B5 'V4L2Loopback Module Signing'The manager's status command is the preferred combined check.
On some Fedora/mokutil combinations, this command can print:
/path/to/v4l.der is already enrolled
while still exiting with status 1, for example when access to the kernel
trusted keyring fails.
The manager does not rely only on that exit status. It runs the test in the C
locale and checks the explicit is already enrolled result so an enrolled
certificate is not reported as missing.
TARGET="$(sudo grubby --default-kernel)"
TARGET="${TARGET##*/}"
TARGET="${TARGET#vmlinuz-}"
modinfo -k "$TARGET" v4l2loopback |
grep -E '^(filename|version|signer|sig_key|sig_hashalgo):'Fedora normally makes the new kernel the default boot entry. At boot, the
systemd oneshot service asks grubby for the default kernel and checks that
kernel's module. Missing or invalid module -> rebuild. Valid module -> skip.
If v4l2loopback-rebuild.service is enabled, yes. It is a oneshot unit: it runs
the condition once during that boot. There is no timer and no periodic polling.
No. Kernel installation and module compilation are intentionally separated.
No. Existing dynamically generated units are preserved. To regenerate an older unit after upgrading the manager:
sudo v4l2loopback disable-systemd
sudo v4l2loopback enable-systemdsudo systemctl start v4l2loopback-rebuild.service
systemctl status v4l2loopback-rebuild.service
journalctl -b -u v4l2loopback-rebuild.servicesudo v4l2loopback disable-systemdThis removes automatic boot-time management; it does not itself uninstall the kernel module.
On some Fedora installations access to GRUB environment data is restricted.
The manager handles this by invoking grubby directly when already root and
through sudo otherwise. RPM/systemd execution is root-owned.
Usually no. First run:
v4l2loopback statusIf the module exists and is correctly signed but the MOK enrollment was lost, the module itself does not need rebuilding. Re-enroll the existing certificate:
sudo v4l2loopback genkeygenkey preserves a complete existing key pair and imports the existing DER
certificate when enrollment is missing. Then reboot manually:
sudo rebootComplete enrollment in the blue MOK Manager screen and run v4l2loopback status again. Do not regenerate the key merely because firmware/BIOS changes
affected MOK enrollment.
Check:
lsmod | grep v4l2loopback
dmesg | grep -i v4l2loopback
v4l2-ctl --list-devicesTry loading:
sudo modprobe v4l2loopback \
devices=1 video_nr=10 card_label=VirtualCam exclusive_caps=1For complete removal, use:
sudo v4l2loopback purgepurge first runs the manager's local cleanup and then asks DNF to remove the
v4l2loopback-manager RPM.
DNF still asks for its normal final transaction confirmation.
If MOK certificate deletion is selected during cleanup, the request is only staged. The certificate remains enrolled until you reboot manually and confirm the pending deletion in the blue MOK Manager screen.
No automatic reboot is performed.
If you want to remove the locally managed resources but keep the RPM installed, run instead:
sudo v4l2loopback uninstalluninstall also disables and removes the dynamically generated systemd
integration, so a separate disable-systemd command is no longer required for
the normal uninstall path.
v4l2loopback uninstall
-> clean managed local resources
-> disable/remove systemd integration
-> optionally stage MOK deletion
-> keep v4l2loopback-manager installed
v4l2loopback purge
-> run uninstall cleanup
-> remove v4l2loopback-manager through DNF
-> report pending MOK confirmation when applicable
dnf remove v4l2loopback-manager
-> remove RPM-owned manager files only
-> do not run interactive local-resource cleanup
If mokutil --delete successfully stages certificate deletion, removing the RPM
before reboot is safe for that request: MOK Manager processes the pending
firmware/shim enrollment-state change independently of /usr/bin/v4l2loopback.
The purge is not fully complete until the pending MOK deletion has been confirmed at the next manual reboot.