ShayBox / Mon2Cam

Workaround for multi-monitor Discord screensharing
MIT License
337 stars 33 forks source link

Failed to create V4L2 device #68

Closed flexxxxer closed 3 years ago

flexxxxer commented 3 years ago

Error when normally running: PANIC Failed to create V4L2 device with id 50 Log here:

[flexxxer@laptop ~]$ sudo mon2cam -v=log DEBUG Starting Mon2Cam with the following options: Options { framerate: 60, device: 50, resolution: "", ffmpeg: [], border: false, sound: false, wayland: false, loggerOptions: { verbose: true, file: "log" }, execOptions: { verbose: true, output: 3 } } DEBUG Checking if V4L2 device exists DEBUG V4L2 device not found with id 50, creating it

Exec Context: a8a10940-6dd0-4fa6-902c-d131df93ddd8 Exec Options: { verbose: true, output: 3 } Exec Command: sudo modprobe -r v4l2loopback Exec Command Splits: [sudo,modprobe,-r,v4l2loopback] Exec Result: { code: 1, success: false }, output: "modprobe: FATAL: Module v4l2loopback not found." Exec Context: a8a10940-6dd0-4fa6-902c-d131df93ddd8

Exec Context: d74b5386-42c7-4ff8-96ba-7f9f84a49936 Exec Options: { verbose: true, output: 3 } Exec Command: sudo modprobe v4l2loopback video_nr=50 card_label="Mon2Cam" Exec Command Splits: [sudo,modprobe,v4l2loopback,video_nr=50,card_label="Mon2Cam"] Exec Result: { code: 1, success: false }, output: "modprobe: FATAL: Module v4l2loopback not found in directory /lib/modules/5.11.1-1-MANJARO" Exec Context: d74b5386-42c7-4ff8-96ba-7f9f84a49936

DEBUG Exiting DEBUG V4L2 device created with id 50 PANIC Failed to create V4L2 device with id 50

Linux headers was installed, kernel version 5.11.1. Distro is Manjaro

botiapa commented 3 years ago

v4l2loopback module is not installed on your system. You probably need this package https://archlinux.org/packages/community/any/v4l2loopback-dkms/

flexxxxer commented 3 years ago

image but actually installed

botiapa commented 3 years ago

Have you tried restarting linux after installing it?

flexxxxer commented 3 years ago

Have you tried restarting linux after installing it?

yes. and tried reinstalling software with rebooting

ShayBox commented 3 years ago

Did you install your kernel headers

flexxxxer commented 3 years ago

Did you install your kernel headers

yes. image

flexxxxer commented 3 years ago

I was helped by removing v4l2loopback from the official manjaro repository and installing v4l2loopback with AUR. I think that on this the problem can be considered solved image

sargentogato commented 3 years ago

i am using Ubuntu 20.04 I got the same error PANIC Failed to create V4L2 device with id 50

I checked my system and it seems the header is installed linux-headers-5.8.0-50-generic ya está en su versión más reciente (5.8.0-50.56~20.04.1).

sargentogato commented 3 years ago

Solved. I case someone get the same error

I installed this sudo apt-get install -y v4l2loopback-dkms from here (instructions)

After that, I got another error asking me for the fffmepeg. I Installed it from here sudo apt-get install ffmpeg

https://rdrr.io/cran/ndtv/man/install.ffmpeg.html#:~:text=FFmpeg%20is%20a%20standard%20package,the%20Software%20Center%20on%20Ubuntu.