Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]modprobe:could not insert 'v4l2loopback':Bad address
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Tue Apr 07, 2020 11:51 am    Post subject: [solved]modprobe:could not insert 'v4l2loopback':Bad address Reply with quote

Hi!

After recently upgrading my kernel from 4.19.97-gentoo to 5.4.28-gentoo, inserting the v4l2loopback kernel module fails on my machine:

Code:
% sudo modprobe v4l2loopback
modprobe: ERROR: could not insert 'v4l2loopback': Bad address


Output of lsmod: https://pastebin.com/vKRTmsE4
Up to this point I was running media-video/v4l2loopback-0.12.1.1_pre successfully, with a similar kernel configuration (I used "make olddefconfig" to generate the new kernel config).

According to dmesg v4l2loopback fails to video_register_device() ( https://pastebin.com/vRA5RPaE )

Code:
[ 6685.783689] v4l2loopback: failed video_register_device()


I am running Gentoo on a MacBook Air with a Broadcom FaceTime HD Camera:

Code:
02:00.0 Multimedia controller [0480]: Broadcom Inc. and subsidiaries 720p FaceTime HD Camera [14e4:1570]
   Subsystem: Broadcom Inc. and subsidiaries 720p FaceTime HD Camera [14e4:1570]
   Flags: bus master, fast devsel, latency 0, IRQ 73
   Memory at c1500000 (64-bit, non-prefetchable) [size=64K]
   Memory at a0000000 (64-bit, prefetchable) [size=256M]
   Memory at c1400000 (64-bit, non-prefetchable) [size=1M]
   Capabilities: [48] Power Management version 3
   Capabilities: [58] MSI: Enable+ Count=1/1 Maskable- 64bit+
   Capabilities: [68] Vendor Specific Information: Len=44 <?>
   Capabilities: [ac] Express Endpoint, MSI 00
   Capabilities: [100] Advanced Error Reporting
   Capabilities: [13c] Device Serial Number 00-00-00-ff-ff-00-00-00
   Capabilities: [150] Power Budgeting <?>
   Capabilities: [160] Virtual Channel
   Capabilities: [1b0] Latency Tolerance Reporting
   Capabilities: [220] #15
   Kernel driver in use: facetimehd


The camera is still recognized, but I am not sure whether that even matters for inserting the kernel module.

Did anybody have similar issues after this kernel upgrade and/or any advice on how to solve this?

oneone.


Last edited by oneone on Sun Apr 19, 2020 2:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1664

PostPosted: Wed Apr 08, 2020 6:42 pm    Post subject: Reply with quote

So wait is the camera working or not?
I think loopback is just for testing but I am not sure.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Wed Apr 08, 2020 8:51 pm    Post subject: Reply with quote

The camera is working with certain applications (such as cheese or zoom), just as it did before.
It is not working with skypeforlinux or obstudio for example and that is the reason, why I need the loopback device.

Via Gstreamer I pipe everything I receive from the webcam (/dev/video0) to the loopback device (/dev/video1):

Code:
sudo modprobe v4l2loopback video_nr=1 card_label="mockCam"                     
gst-launch-1.0 -v v4l2src device=/dev/video0 ! v4l2sink device=/dev/video1


This loopback device is then recognized by skypeforlinux and obstudio. It is also useful, when I want to pipe something else (such as a part of my screen to a virtual device).

Now the camera is still accessible on /dev/video0, but I cannot create a loopback device with gst-launch-1.0, because the v4l2loopback module cannot be loaded.

Probably I should have explained this before and I hope this clarifies the situation :)
Back to top
View user's profile Send private message
Eggplants
n00b
n00b


Joined: 22 Oct 2011
Posts: 20

PostPosted: Wed Apr 08, 2020 11:43 pm    Post subject: Reply with quote

I'm seeing a very similar problem. I had to go back to kernel 4.19.97 to get things working again.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Thu Apr 09, 2020 7:26 am    Post subject: Reply with quote

Ah, interesting. Thanks for the feedback @Eggplants.

Just out of curiosity: What are you using the loopback device for? Is your webcam also not recognized by some applications?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Apr 09, 2020 10:07 am    Post subject: Reply with quote

just to be sure, and you have re-emerge the package after upgrading the kernel right?
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Thu Apr 09, 2020 10:11 am    Post subject: Reply with quote

Yes, I did :D

And the module obviously exists (as can be seen from the dmesg output), but it just crashes while being loaded - as I understand it.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Apr 09, 2020 10:58 am    Post subject: Reply with quote

oneone wrote:
Yes, I did :D

And the module obviously exists (as can be seen from the dmesg output), but it just crashes while being loaded - as I understand it.

Of course the module exists, it was create when you have re-emerge it
But if you have changed your kernel (something quiet common after a kernel update) and didn't re-emerge the package, the existing module still use the previous kernel symbols, ending in a mess
I should have use the word "rebuild" reather than "upgrade" the kernel
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Thu Apr 09, 2020 11:08 am    Post subject: Reply with quote

Oh, I see. Well, I built the 5.4.28 kernel only once (when I upgraded it) and afterwards I re-emerge v4l2loopback :)

Thanks for asking though - often it's really just little mistakes like this which cause all the trouble.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Apr 09, 2020 11:11 am    Post subject: Reply with quote

oneone wrote:
Thanks for asking though - often it's really just little mistakes like this which cause all the trouble.

omg i did this so much :D
that's why i was asking
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Apr 09, 2020 11:15 am    Post subject: Reply with quote

https://github.com/umlaeute/v4l2loopback/issues/255
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Thu Apr 09, 2020 11:40 am    Post subject: Reply with quote

Thanks Jaglover for referring to this issue.

I'll see what I can find out over there.
Back to top
View user's profile Send private message
Eggplants
n00b
n00b


Joined: 22 Oct 2011
Posts: 20

PostPosted: Sun Apr 12, 2020 12:51 am    Post subject: Reply with quote

oneone wrote:
Just out of curiosity: What are you using the loopback device for? Is your webcam also not recognized by some applications?


I'm actually using droidcam to use an android phone as a webcam. It has its own variant of v4l2loopback, but I'm seeing the same issue with the standard version. I'm hoping that once the standard version is fixed, whatever the issues is can be moved over to the droidcam version. Failing that, there are other ways of using the android camera that use the standard v4l2loopback.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Tue Apr 14, 2020 9:10 am    Post subject: Reply with quote

Good news: Using media-video/v4l2loopback-9999 fixes the issue.

I just wonder why the repo is cloned using the git protocol rather than https:

Code:
* Messages for package media-video/v4l2loopback-9999:

* git-r3: git protocol is completely unsecure and may render the ebuild
* easily susceptible to MITM attacks (even if used only as fallback). Please
* use https instead.
* [URI: git://github.com/umlaeute/v4l2loopback.git]


EDIT:

In a local repo I changed
EGIT_REPO_URI="git://github.com/umlaeute/v4l2loopback.git"
to
EGIT_REPO_URI="https://github.com/umlaeute/v4l2loopback.git"

and it works perfectly fine.

Should I inform the package maintainers about this? And if, how?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21714

PostPosted: Wed Apr 15, 2020 2:15 am    Post subject: Reply with quote

Yes, definitely report that. Use of the git:// protocol over the open Internet is irresponsible at best. It might be acceptable if other measures limited what could be checked out, but an ebuild designed to be tip-of-tree cannot use those limits.
Back to top
View user's profile Send private message
Eggplants
n00b
n00b


Joined: 22 Oct 2011
Posts: 20

PostPosted: Fri May 29, 2020 3:19 am    Post subject: Reply with quote

There is an issue in the gentoo bugzilla to bump to version 0.12.5, which seems to work in the later kernels.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Fri May 29, 2020 7:27 am    Post subject: Reply with quote

Thanks for pointing that out @Eggplants.

@Hu, I emailed the package maintainers to change the git:// protocol to https:// but nothing has happened yet. Should I file a bug report for this? I'm just asking, because it's not really a bug in that sense.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21714

PostPosted: Sat May 30, 2020 12:00 am    Post subject: Reply with quote

Considering the nature of the vulnerability that the eclass is reporting, I would consider it a bug in the -9999 ebuild that it does this. More generally, reports on Bugzilla are a general venue for requesting ebuild improvements, requesting version bumps, and so on, even though those things also are not bugs.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Sat May 30, 2020 7:03 am    Post subject: Reply with quote

Ok, thanks for the reply. I will file a bug report then.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Tue Jun 02, 2020 2:38 pm    Post subject: Reply with quote

Reported and already fixed: https://bugs.gentoo.org/726602
:) :) :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum