Why can't I load kernel module `vfio_mdev`?

How do I load the vfio-mdev kernel module?
I always get this error:

$ sudo modprobe vfio-mdev
modprobe: FATAL: Module vfio-mdev not found in directory /usr/lib/modules/6.1.105-1-MANJARO

I never had any issues with it on Fedora or Ubuntu. Does the Manjaro kernel not support it or am I missing some package?

perhaps this:

Was the vfio_mdev module removed from the 5.15 kernel? | Proxmox Support Forum

(I see two modules: vfio.ko and mdev.ko)

perhaps it is part of the nvidia driver and not present when this driver isn’t installed?

1 Like

You might start by checking whether or not this module is actually available.

lsmod
modinfo vfio-mdev

Some possibly useful links for reference:

Cheers.

2 Likes

A quick web search indicates that it might now be known as just mdev:

I just ran the command modinfo mdev & got the following output:

filename:       /lib/modules/6.10.6-10-MANJARO/kernel/drivers/vfio/mdev/mdev.ko.zst
description:    Mediated device Core Driver
author:         NVIDIA Corporation
license:        GPL v2
version:        0.1
srcversion:     E521FE242701157284843B2
depends:        
retpoline:      Y
intree:         Y
name:           mdev
vermagic:       6.10.6-10-MANJARO SMP preempt mod_unload 
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        19:BF:B2:3C:DB:F7:F0:06:F4:92:0F:F3:5C:85:41:E9:AC:B9:F2:B4
sig_hashalgo:   sha512
signature:      30:65:02:30:21:3A:00:A0:32:7F:6D:D4:BB:AC:EF:07:65:77:FF:FC:
                DA:DF:D5:5A:47:33:BD:31:8C:B0:CA:9A:54:EA:34:9F:46:34:05:53:
                06:A5:C6:12:77:D3:AA:E9:06:0D:D1:FA:02:31:00:CF:03:5B:B6:78:
                58:02:62:2C:BC:8B:CE:88:73:DE:FE:34:DE:22:85:D4:CD:7D:08:94:
                01:26:0C:E5:A3:A7:A7:4C:BF:16:F9:03:0E:06:FF:99:19:E8:60:E7:
                A5:A7:20

So you might want to retry your command as:

sudo modprobe mdev

1 Like

It doesn’t appear to be available:

$ modinfo vfio-mdev
modinfo: ERROR: Module vfio-mdev not found.
$ lsmod
Module                  Size  Used by
nft_masq               16384  3
nft_ct                 24576  1
nft_reject_ipv4        16384  2
nft_reject             16384  1 nft_reject_ipv4
nft_chain_nat          16384  2
nf_nat                 57344  2 nft_masq,nft_chain_nat
nf_tables             307200  78 nft_reject_ipv4,nft_ct,nft_masq,nft_chain_nat,nft_reject
bridge                368640  0
stp                    16384  1 bridge
llc                    16384  2 bridge,stp
tun                    65536  0
kvmgt                 434176  0
mdev                   20480  1 kvmgt
vfio_iommu_type1       45056  0
vfio                   49152  2 kvmgt,vfio_iommu_type1
rfcomm                 94208  4
snd_usb_audio         405504  2
snd_usbmidi_lib        45056  1 snd_usb_audio
snd_rawmidi            49152  1 snd_usbmidi_lib
snd_seq_device         16384  1 snd_rawmidi
mc                     77824  1 snd_usb_audio
hid_cherry             16384  0
r8153_ecm              16384  0
cdc_ether              24576  1 r8153_ecm
usbnet                 57344  2 r8153_ecm,cdc_ether
r8152                 147456  1 r8153_ecm
mii                    16384  2 usbnet,r8152
ccm                    20480  6
qrtr                   57344  2
uhid                   20480  1
cmac                   16384  3
algif_hash             16384  1
algif_skcipher         16384  1
af_alg                 36864  6 algif_hash,algif_skcipher
bnep                   28672  2
snd_hda_codec_hdmi     86016  1
hid_sensor_custom_intel_hinge    16384  0
hid_sensor_accel_3d    20480  1
hid_sensor_magn_3d     20480  1
hid_sensor_gyro_3d     20480  0
hid_sensor_rotation    20480  0
hid_sensor_incl_3d     20480  0
hid_sensor_trigger     20480  13 hid_sensor_gyro_3d,hid_sensor_custom_intel_hinge,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
industrialio_triggered_buffer    16384  1 hid_sensor_trigger
kfifo_buf              16384  1 industrialio_triggered_buffer
hid_sensor_iio_common    20480  7 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_custom_intel_hinge,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
industrialio          110592  11 industrialio_triggered_buffer,hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_custom_intel_hinge,hid_sensor_incl_3d,kfifo_buf,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
hid_sensor_custom      28672  0
joydev                 28672  0
mousedev               24576  0
hid_sensor_hub         32768  9 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_custom_intel_hinge,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation,hid_sensor_custom
vfat                   24576  1
intel_ishtp_hid        28672  0
fat                    98304  1 vfat
snd_ctl_led            24576  0
snd_hda_codec_realtek   180224  1
intel_tcc_cooling      16384  0
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
x86_pkg_temp_thermal    20480  0
intel_powerclamp       20480  0
coretemp               20480  0
iTCO_wdt               16384  0
kvm_intel             393216  0
snd_hda_intel          61440  1
wacom                 143360  0
intel_pmc_bxt          16384  1 iTCO_wdt
snd_intel_dspcfg       40960  1 snd_hda_intel
hid_multitouch         32768  0
usbhid                 73728  1 wacom
iTCO_vendor_support    16384  1 iTCO_wdt
ath10k_pci             57344  0
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
kvm                  1163264  2 kvmgt,kvm_intel
dell_laptop            32768  0
snd_hda_codec         188416  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
irqbypass              16384  1 kvm
btusb                  69632  0
snd_hda_core          118784  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
ath10k_core           679936  1 ath10k_pci
dell_wmi               32768  1 dell_laptop
btrtl                  28672  1 btusb
snd_hwdep              20480  2 snd_usb_audio,snd_hda_codec
btbcm                  24576  1 btusb
processor_thermal_device_pci_legacy    16384  0
ath                    40960  1 ath10k_core
snd_pcm               172032  5 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
rapl                   16384  0
btintel                45056  1 btusb
snd_timer              49152  1 snd_pcm
intel_cstate           20480  0
btmtk                  16384  1 btusb
dell_smbios            32768  2 dell_wmi,dell_laptop
mei_wdt                16384  0
mei_hdcp               24576  0
mei_pxp                20480  0
intel_rapl_msr         20480  0
dell_smm_hwmon         28672  0
intel_uncore          221184  0
mac80211             1323008  1 ath10k_core
pcspkr                 16384  0
bluetooth             942080  32 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
dell_wmi_sysman        57344  0
snd                   135168  19 snd_ctl_led,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
processor_thermal_device    20480  1 processor_thermal_device_pci_legacy
dcdbas                 20480  1 dell_smbios
i2c_i801               45056  0
processor_thermal_rfim    16384  1 processor_thermal_device
firmware_attributes_class    16384  1 dell_wmi_sysman
libarc4                16384  1 mac80211
ledtrig_audio          16384  4 snd_ctl_led,snd_hda_codec_generic,dell_wmi,dell_laptop
dell_wmi_descriptor    20480  2 dell_wmi,dell_smbios
wmi_bmof               16384  0
intel_wmi_thunderbolt    20480  0
ecdh_generic           16384  2 bluetooth
cdc_acm                49152  0
processor_thermal_mbox    16384  2 processor_thermal_rfim,processor_thermal_device
ucsi_acpi              16384  0
thunderbolt           413696  0
soundcore              16384  2 snd_ctl_led,snd
i2c_smbus              20480  1 i2c_i801
crc16                  16384  1 bluetooth
cfg80211             1146880  3 ath,mac80211,ath10k_core
typec_ucsi             53248  1 ucsi_acpi
intel_lpss_pci         28672  0
processor_thermal_rapl    20480  1 processor_thermal_device
mei_me                 53248  3
intel_ish_ipc          32768  0
intel_lpss             16384  1 intel_lpss_pci
rfkill                 36864  9 bluetooth,dell_laptop,cfg80211
intel_rapl_common      32768  2 intel_rapl_msr,processor_thermal_rapl
typec                  90112  1 typec_ucsi
mei                   172032  7 mei_wdt,mei_hdcp,mei_pxp,mei_me
intel_soc_dts_iosf     20480  1 processor_thermal_device_pci_legacy
intel_ishtp            69632  2 intel_ishtp_hid,intel_ish_ipc
roles                  16384  1 typec_ucsi
idma64                 20480  0
intel_pch_thermal      20480  0
i2c_hid_acpi           16384  0
int3403_thermal        20480  0
i2c_hid                40960  1 i2c_hid_acpi
intel_vbtn             24576  0
soc_button_array       24576  0
int340x_thermal_zone    20480  2 int3403_thermal,processor_thermal_device
intel_hid              28672  0
int3400_thermal        20480  0
sparse_keymap          16384  3 intel_hid,dell_wmi,intel_vbtn
acpi_thermal_rel       16384  1 int3400_thermal
acpi_pad               24576  0
squashfs               86016  9
mac_hid                16384  0
ip6t_REJECT            16384  1
nf_reject_ipv6         20480  1 ip6t_REJECT
xt_hl                  16384  22
ip6t_rt                20480  3
ipt_REJECT             16384  1
nf_reject_ipv4         16384  2 nft_reject_ipv4,ipt_REJECT
xt_LOG                 20480  10
nf_log_syslog          24576  10
xt_multiport           20480  4
xt_limit               16384  13
xt_addrtype            16384  4
xt_tcpudp              20480  26
xt_conntrack           16384  16
nf_conntrack          184320  4 xt_conntrack,nf_nat,nft_ct,nft_masq
nf_defrag_ipv6         24576  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
ip6table_filter        16384  1
ip6_tables             36864  53 ip6table_filter
iptable_filter         16384  1
sg                     49152  0
crypto_user            24576  0
fuse                  176128  5
loop                   36864  18
nfnetlink              20480  2 nf_tables
bpf_preload            24576  0
ip_tables              36864  9 iptable_filter
x_tables               57344  14 ip6table_filter,xt_conntrack,iptable_filter,xt_LOG,xt_multiport,xt_tcpudp,xt_addrtype,ip6t_rt,ip6_tables,ipt_REJECT,ip_tables,xt_limit,xt_hl,ip6t_REJECT
btrfs                1974272  1
blake2b_generic        20480  0
libcrc32c              16384  4 nf_conntrack,nf_nat,btrfs,nf_tables
crc32c_generic         16384  0
xor                    24576  1 btrfs
raid6_pq              122880  1 btrfs
dm_crypt               61440  2
cbc                    16384  0
encrypted_keys         28672  1 dm_crypt
trusted                53248  2 encrypted_keys,dm_crypt
asn1_encoder           16384  1 trusted
tee                    36864  1 trusted
dm_mod                192512  6 dm_crypt
crct10dif_pclmul       16384  1
amdgpu              10559488  4
crc32_pclmul           16384  0
polyval_clmulni        16384  0
serio_raw              20480  0
polyval_generic        16384  1 polyval_clmulni
i915                 3235840  68 kvmgt
rtsx_pci_sdmmc         32768  0
atkbd                  36864  0
gf128mul               16384  1 polyval_generic
libps2                 20480  1 atkbd
mmc_core              233472  1 rtsx_pci_sdmmc
vivaldi_fmap           16384  1 atkbd
ghash_clmulni_intel    16384  0
sha512_ssse3           53248  0
sha256_ssse3           36864  1
sha1_ssse3             32768  2
aesni_intel           393216  12
drm_ttm_helper         16384  1 amdgpu
nvme                   61440  3
intel_gtt              28672  1 i915
crypto_simd            16384  1 aesni_intel
ttm                    98304  3 amdgpu,drm_ttm_helper,i915
cryptd                 24576  5 crypto_simd,ghash_clmulni_intel
gpu_sched              49152  1 amdgpu
nvme_core             212992  4 nvme
drm_buddy              20480  2 amdgpu,i915
xhci_pci               24576  0
nvme_common            24576  1 nvme_core
drm_display_helper    184320  2 amdgpu,i915
rtsx_pci              114688  1 rtsx_pci_sdmmc
xhci_pci_renesas       24576  1 xhci_pci
cec                    81920  2 drm_display_helper,i915
video                  69632  4 dell_wmi,amdgpu,dell_laptop,i915
i8042                  49152  1 dell_laptop
serio                  28672  4 serio_raw,atkbd,i8042
wmi                    45056  7 dell_wmi_sysman,video,intel_wmi_thunderbolt,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor
crc32c_intel           24576  2
$ modinfo vfio-mdev
modinfo: ERROR: Module vfio-mdev not found.

mdev exists indeed and I can load it. If it indeed does the same thing as vfio-mdev then my issue has been resolved. I’ll have to do some testing to verify.

1 Like

Why can’t I load kernel module vfio_mdev?

Indeed.

That would tend to answer your question, and resolve the thread.

If you wish to change the scope of the thread to seek information about mdev, you might consider changing the thread title appropriately to attract more input.

Cheers.