ShayBox / Mon2Cam

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

Mon2Cam error: "PANIC Failed to create V4L2 device with id 50" #59

Closed GamerGuy95953 closed 3 years ago

GamerGuy95953 commented 3 years ago

When I try to type mon2cam in the terminal it prompts for a password which I type and after that it throws the error "Failed to create V4L2 device with id 50." I've installed all the required dependencies on the repository and have restarted the computer after installing everything. I am using Manjaro Cinnamon with GNOME Terminal 3.38.1.

I am new to Linux so I probably did something wrong that no average user can miss. or it just doesn't support Manjaro or cinnamon.

EDIT: heres the log:

DEBUG Starting Mon2Cam with the following options: Options {
  framerate: 60,
  device: 50,
  resolution: "",
  ffmpeg: [],
  border: false,
  sound: false,
  wayland: false,
  loggerOptions: { verbose: true },
  execOptions: { verbose: true, output: 3 }
}
DEBUG Checking if V4L2 device exists
DEBUG V4L2 device not found with id 50, creating it

Exec Context: b622a91c-efd3-40b6-bcce-bca7bf09f91c
    Exec Options:  { verbose: true, output: 3 }
    Exec Command: sudo modprobe -r v4l2loopback
    Exec Command Splits:  [sudo,modprobe,-r,v4l2loopback]
[sudo] password for cole: 
    Exec Result:  { code: 1, success: false },
 output: "modprobe: FATAL: Module v4l2loopback not found."
Exec Context: b622a91c-efd3-40b6-bcce-bca7bf09f91c

Exec Context: f6d2aa00-1769-442d-9901-df6652705f40
    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.10.2-2-MANJARO"
Exec Context: f6d2aa00-1769-442d-9901-df6652705f40

DEBUG Exiting
DEBUG V4L2 device created with id 50
PANIC Failed to create V4L2 device with id 50
ShayBox commented 3 years ago

Did you install linux-headers for the v4l2loopback dkms module to use

EDIT: sudo pacman -S linux-headers

GamerGuy95953 commented 3 years ago

Did you install linux(version)-headers for the v4l2loopback dkms module to use

Screenshot from 2021-01-14 04-57-05

Is it this? Sorry, I am very new to Linux.

EDIT: Saw your command tried it and it seems to be installing the linux-headers

GamerGuy95953 commented 3 years ago

Did you install linux-headers for the v4l2loopback dkms module to use

EDIT: sudo pacman -S linux-headers

Got this error: "==> Unable to install module v4l2loopback/0.12.5 for kernel 4.14.212-1-MANJARO: Missing kernel modules tree."

:: There are 9 providers available for linux-headers:
:: Repository core
   1) linux414-headers  2) linux419-headers  3) linux44-headers
   4) linux49-headers  5) linux510-headers  6) linux54-headers
   7) linux59-headers
:: Repository community
   8) linux54-rt-headers  9) linux59-rt-headers

Enter a number (default=1): 1
resolving dependencies...
looking for conflicting packages...

Packages (1) linux414-headers-4.14.212-1

Total Download Size:    8.08 MiB
Total Installed Size:  41.01 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 linux414-headers...     8.1 MiB  88.7 KiB/s 01:33 [######################] 100%
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) installing linux414-headers                  [######################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Install DKMS modules
==> Unable to install module v4l2loopback/0.12.5 for kernel 4.14.212-1-MANJARO: Missing kernel modules tree.
ShayBox commented 3 years ago

You have to find out what kernel version you're using and install the correct one, I doubt it's 4.14 though

GamerGuy95953 commented 3 years ago

You have to find out what kernel version you're using and install the correct one, I doubt it's 4.14 though

It is 5.10.2-2-MANJARO

ShayBox commented 3 years ago

then you want linux510-headers (number 5 in that list)

GamerGuy95953 commented 3 years ago

then you want linux510-headers (number 5 in that list)

Thank you very much! Worked no problem after that! Also thank you for the quick response and help! 1st try after installing the correct one.

ShayBox commented 3 years ago

No problem 👍