Page 1 of 1

Droidcam app doesn't work: could not insert module

Posted: Mon Apr 15, 2019 2:27 pm
by Mich-C
I installed Droidcam, this software that allows you to use your android smartphone as a webcam on linux (https://www.dev47apps.com/droidcam/linuxx)
I followed each step of the installation guide reported on that webpage, I just skipped the linux-headers installation since my package manager reports "linux-headers-4.19.0-1-common" as already installed.

The previous commands are ok but When I run the last command "./install" I get this:

Code: Select all

Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: ingresso nella directory "/tmp/droidcam-64bit/v4l2loopback"
make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: ingresso nella directory "/usr/src/linux-headers-4.19.0-1-amd64"
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: uscita dalla directory "/usr/src/linux-headers-4.19.0-1-amd64"
make: uscita dalla directory "/tmp/droidcam-64bit/v4l2loopback"
Moving driver and executable to system folders
Registering webcam device
insmod: ERROR: could not insert module /lib/modules/4.19.0-1-amd64/kernel/drivers/media/video/v4l2loopback-dc.ko: Unknown symbol in module
When I run "droidcam" from terminal instead I get a warning windows that says: "Device not found (/dev/video[0-9]).Did you install it?"
while the terminal just shows "Device: HP HD Webcam: HP HD Webcam"


My configuration

Code: Select all

[code]
System:    Host: mx Kernel: 4.19.0-1-amd64 x86_64 bits: 64 compiler: gcc v: 6.3.0 
           Desktop: Xfce 4.12.3 Distro: MX-18.1.1.1.1.1_x64 Continuum Feb 9  2019 
           base: Debian GNU/Linux 9 (stretch) 
Machine:   Type: Laptop System: Hewlett-Packard product: HP ProBook 455 G2 v: A3009DD10303 
           serial: <filter> 
           Mobo: Hewlett-Packard model: 2235 v: KBC Version 66.20 serial: <filter> 
           UEFI: Hewlett-Packard v: M75 Ver. 01.30 date: 03/10/2015 
Battery:   ID-1: BAT0 charge: 29.3 Wh condition: 29.3/29.3 Wh (100%) 
           model: Hewlett-Packard Primary status: Full 
CPU:       Topology: Quad Core model: AMD A10-7300 Radeon R6 10 Compute Cores 4C+6G bits: 64 
           type: MCP arch: Steamroller rev: 1 L2 cache: 2048 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 15171 
           Speed: 1103 MHz min/max: 1100/1900 MHz Core speeds (MHz): 1: 1103 2: 1108 3: 1142 
           4: 1098 
Graphics:  Device-1: AMD Kaveri [Radeon R6 Graphics] vendor: Hewlett-Packard driver: radeon 
           v: kernel bus ID: 00:01.0 
           Device-2: AMD Topaz PRO [Radeon R5 M255] vendor: Hewlett-Packard driver: amdgpu 
           v: kernel bus ID: 01:00.0 
           Display: x11 server: X.Org 1.19.2 driver: amdgpu,ati,radeon 
           unloaded: fbdev,modesetting,vesa resolution: 1366x768~60Hz 
           OpenGL: renderer: AMD KAVERI (DRM 2.50.0 4.19.0-1-amd64 LLVM 7.0.0) 
           v: 4.5 Mesa 18.2.6 direct render: Yes 
Audio:     Device-1: AMD Kaveri HDMI/DP Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus ID: 00:01.1 
           Device-2: AMD FCH Azalia vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus ID: 00:14.2 
           Sound Server: ALSA v: k4.19.0-1-amd64 
Network:   Device-1: Realtek RTL8723BE PCIe Wireless Network Adapter vendor: Hewlett-Packard 
           driver: rtl8723be v: kernel port: 3000 bus ID: 02:00.0 
           IF: wlan0 state: up mac: <filter> 
           IF-ID-1: vboxnet0 state: down mac: <filter> 
Drives:    Local Storage: total: 225.41 GiB used: 24.07 GiB (10.7%) 
           ID-1: /dev/sda vendor: Kingston model: SA400S37240G size: 223.57 GiB 
           ID-2: /dev/sdb type: USB vendor: Lexar model: M2 uSD Reader size: 1.84 GiB 
Partition: ID-1: / size: 48.97 GiB used: 5.45 GiB (11.1%) fs: ext4 dev: /dev/sda7 
           ID-2: /home size: 48.96 GiB used: 17.19 GiB (35.1%) fs: ext4 dev: /dev/sda6 
Sensors:   System Temperatures: cpu: 42.6 C mobo: N/A 
           Fan Speeds (RPM): N/A 
           GPU: device: amdgpu temp: 40 C device: radeon temp: 42 C 
Repos:     Active apt repos in: /etc/apt/sources.list.d/antix.list 
           1: deb http://iso.mxrepo.com/antix/stretch stretch main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://ftp.it.debian.org/debian/ stretch-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://ftp.it.debian.org/debian/ stretch main contrib non-free
           2: deb http://security.debian.org/ stretch/updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://it.mxrepo.com/mx/repo/ stretch main non-free
           Active apt repos in: /etc/apt/sources.list.d/opera-stable.list 
           1: deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
           No active apt repos in: /etc/apt/sources.list.d/various.list 
Info:      Processes: 224 Uptime: 1h 30m Memory: 6.82 GiB used: 4.03 GiB (59.1%) Init: SysVinit 
           runlevel: 5 Compilers: gcc: 6.3.0 Shell: bash v: 4.4.12 inxi: 3.0.29 

Re: Droidcam app doesn't work: could not insert module

Posted: Mon Apr 15, 2019 5:30 pm
by manyroads
I did a little looking and found the following, perhaps it will help:

https://technibuzz.com/how-to-install-d ... -manually/

Re: Droidcam app doesn't work: could not insert module

Posted: Mon Apr 22, 2019 1:20 pm
by Mich-C
manyroads wrote: Mon Apr 15, 2019 5:30 pm I did a little looking and found the following, perhaps it will help:

https://technibuzz.com/how-to-install-d ... -manually/
Many thanks but instrations are identical...
I think the problem is caused by this:
"insmod: ERROR: could not insert module /lib/modules/4.19.0-1-amd64/kernel/drivers/media/video/v4l2loopback-dc.ko: Unknown symbol in module"
and I don't know how to solve this

Re: Droidcam app doesn't work: could not insert module

Posted: Mon Apr 22, 2019 5:15 pm
by Stevo
This came up when I googled the error: https://askubuntu.com/questions/1133007 ... untu-18-04

(ignore the <br> in his commands, those mean <Enter>)

Re: Droidcam app doesn't work: could not insert module

Posted: Tue Apr 23, 2019 6:29 am
by Mich-C
manyroads wrote: Mon Apr 15, 2019 5:30 pm chnibuzz.com/how-to-install-droidcam-on-linux-manually/
Stevo wrote: Mon Apr 22, 2019 5:15 pm This came up when I googled the error:
(ignore the <br> in his commands, those mean <Enter>)
Thank you guys.
Finally DroidCam works in Wi-Fi mode, I also configured it with Guvcview and it's ok that's what I've done:

1) follow steps 1-8 of the guide (uninstallation + new installation)
2) from the same terminal window give

Code: Select all

sudo depmod
sudo modprobe v4l2loopback_dc
droidcam &
3) droidcam is started and working
4) follow step 9 of the guide to create a desktop entry

-------------------------------------------------------------------

The only problem that still remains is that it can't work in adb mode with my usb cable.
ADB is correctly installed on my computer. I gave this command posted on the official DroidCam website (https://www.dev47apps.com/droidcam/linuxx/)

Code: Select all

./adb forward tcp:4747 tcp:4747
(4747 is the droidcam port set up on my smartphone)
But when I start Droidcam I still get the warning window "adb not detected"

Re: Droidcam app doesn't work: could not insert module

Posted: Fri May 10, 2019 9:28 pm
by ctt
https://stackoverflow.com/questions/260 ... b-over-tcp

or maybe read through arch wiki for adb

Re: Droidcam app doesn't work: could not insert module

Posted: Tue Jul 09, 2019 12:14 pm
by Mich-C
Guys I solved the problem!
Droidcam wasn't able to detect adb since I was running adb from the "platform tools" directory of my Android Studio installation dir.
It should be the same but this app didn't work this way...
I solved this installing the "adb" and "android-tools-adb" packages from the package manager.
Then I run droidcam from terminal to get the connection and then I set droidcam as video source on guvcview.

I'm marking as solved

Can't load this Kernel module! v4l2loopback_dc

Posted: Sat Nov 21, 2020 2:56 pm
by Mich-C
Ok, I replaced MX18.1 with MX 18.3 and now I have a problem with the v4l2loopback kernel module.

--->Droidcam reports in GUI:

Code: Select all

Droidcam/v4l2lloopback device not found (/dev/video [0-9])
--->Droidcam reports in terminal :

Code: Select all

Audio loopback device not found.
Is snd_aloop loaded?
Audio: 

Gtk-Message: 20:47:44.721: GtkDialog mapped without a transient parent. This is discouraged.
(droidcam:4866): Gdk-CRITICAL **: 20:47:44.894: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
I tried to compile the v4l2loopback module included in Droidcam folder

Code: Select all

make && make install
then I loaded the module into the kernel

Code: Select all

sudo depmod
sudo modprobe v4l2loopback_dc
but it didn't work,so I opted for a better strategy, using the module provided by MX Repos.
I deleted the droidcam module with

Code: Select all

sudo make clean
and I gave

Code: Select all

sudo apt-get install v4l2loopback-dkms
but unfortunately I got

Code: Select all

...
Error! Bad return status for module build on kernel: 4.19.0-5-amd64 (x86_64)
Consult /var/lib/dkms/v4l2loopback/0.10.0/build/make.log for more information.
(Here's that log file If you need it) (some words are in Italian)

Code: Select all

DKMS make.log for v4l2loopback-0.10.0 for kernel 4.19.0-5-amd64 (x86_64)
sab 21 nov 2020, 21.04.08, CET
Building v4l2-loopback driver...
make -C /lib/modules/4.19.0-5-amd64/build M=/var/lib/dkms/v4l2loopback/0.10.0/build modules
make[1]: ingresso nella directory "/usr/src/linux-headers-4.19.0-5-amd64"
  CC [M]  /var/lib/dkms/v4l2loopback/0.10.0/build/v4l2loopback.o
/var/lib/dkms/v4l2loopback/0.10.0/build/v4l2loopback.c: In function ‘v4l2_loopback_init’:
/var/lib/dkms/v4l2loopback/0.10.0/build/v4l2loopback.c:2206:2: error: implicit declaration of function ‘setup_timer’ [-Werror=implicit-function-declaration]
  setup_timer(&dev->sustain_timer, sustain_timer_clb, nr);
  ^~~~~~~~~~~
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.19.0-5-common/scripts/Makefile.build:314: set di istruzioni per l'obiettivo "/var/lib/dkms/v4l2loopback/0.10.0/build/v4l2loopback.o" non riuscito
make[4]: *** [/var/lib/dkms/v4l2loopback/0.10.0/build/v4l2loopback.o] Errore 1
/usr/src/linux-headers-4.19.0-5-common/Makefile:1539: set di istruzioni per l'obiettivo "_module_/var/lib/dkms/v4l2loopback/0.10.0/build" non riuscito
make[3]: *** [_module_/var/lib/dkms/v4l2loopback/0.10.0/build] Errore 2
Makefile:146: set di istruzioni per l'obiettivo "sub-make" non riuscito
make[2]: *** [sub-make] Errore 2
Makefile:8: set di istruzioni per l'obiettivo "all" non riuscito
make[1]: *** [all] Errore 2
make[1]: uscita dalla directory "/usr/src/linux-headers-4.19.0-5-amd64"
Makefile:42: set di istruzioni per l'obiettivo "v4l2loopback.ko" non riuscito
make: *** [v4l2loopback.ko] Errore 2
and now if I try to load the module with depmod and modprobe I get

Code: Select all

modprobe: ERROR: could not insert 'v4l2loopback_dc': Exec format error
How can I solve this problem?