Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 867670 - media-video/wireplumber-0.4.11-r3: wireplumber need libcamera
Summary: media-video/wireplumber-0.4.11-r3: wireplumber need libcamera
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sam James
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-31 06:21 UTC by Stefan Schmid
Modified: 2025-03-08 17:38 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schmid 2022-08-31 06:21:39 UTC
WirePlumber requires the libcamera (https://git.libcamera.org/libcamera/libcamera.git/) library, which is missing from the official Gentoo overlay. Please add this library and a dependency to media-video/wireplumber.

Aug 31 08:04:25 pc170am wireplumber[1807]: SPA handle 'api.libcamera.enum.manager' could not be loaded; is it installed?
Aug 31 08:04:25 pc170am wireplumber[1807]: PipeWire's libcamera SPA missing or broken. libcamera not supported.

Reproducible: Always
Comment 1 Michael Perlov 2022-09-28 20:59:48 UTC
To disable plugin just comment it in
/etc/wireplumber/main.lua.d/90-enable-all.lua:
--libcamera_monitor.enable()

This should be controlled by USE-flag IMO
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-17 19:20:43 UTC
libcamera has finally started tagging releases, so I'm happy to work on this now.
Comment 3 Joakim Tjernlund 2023-06-25 21:38:07 UTC
(In reply to Sam James from comment #2)
> libcamera has finally started tagging releases, so I'm happy to work on this
> now.

Noticed libcamera releases too, 0.0.5 came just 8 weeks ago :)
Comment 4 amano.kenji 2023-08-12 14:13:58 UTC
Is V4L2 enough for webcams for now?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-12 17:05:09 UTC
(In reply to Joakim Tjernlund from comment #3)
> (In reply to Sam James from comment #2)
> > libcamera has finally started tagging releases, so I'm happy to work on this
> > now.
> 
> Noticed libcamera releases too, 0.0.5 came just 8 weeks ago :)

I asked them to make proper tarballs a few weeks ago and they're considering it.
Comment 6 Joakim Tjernlund 2023-08-22 09:37:32 UTC
Now there is v0.1.0 too.
Did not see any tarballs in the git repo/page though.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-22 13:51:58 UTC
(In reply to Joakim Tjernlund from comment #6)
> Now there is v0.1.0 too.
> Did not see any tarballs in the git repo/page though.

The discussion took place because of 0.1.0 5 weeks ago.
Comment 8 amano.kenji 2023-08-24 00:28:51 UTC
https://git.zx2c4.com/cgit/ shows cgit can host archives.

https://git.libcamera.org/libcamera/libcamera.git/ doesn't show any release archive.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-24 10:43:49 UTC
Yes, thanks. I know and I've told upstream that already.
Comment 10 Joakim Tjernlund 2023-09-07 20:04:20 UTC
libcamera has an github repo that do have tarballs:
  https://github.com/kbingham/libcamera/tags
Perhaps they prefer having the tar files there to lower network load on their
repo?
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-07 20:06:16 UTC
They made clear that repo is unofficial. Please see the full dialogue at https://social.treehouse.systems/@libcamera@floss.social/110734917465197953.
Comment 12 amano.kenji 2023-09-08 01:07:57 UTC
Most open-source developers are jackasses who don't care about UI and UX.

This is a serious UX issue. How difficult is it to upload release tarballs somewhere?
Comment 13 Felix Janda 2023-09-09 14:53:25 UTC
It seems that cgit could generate tarballs via its "snapshots" configuration setting, and it could then look like https://git.zx2c4.com/cgit/refs/tags. Maybe upstream would be amenable to doing that?
Comment 14 Joakim Tjernlund 2023-11-02 01:34:03 UTC
(In reply to Sam James from comment #11)
> They made clear that repo is unofficial. Please see the full dialogue at
> https://social.treehouse.systems/@libcamera@floss.social/110734917465197953.

Maybe a shallow git clone from a tag could replace a tar file?
Gentoo could have a libcamera-9999 regardless I suppose.
Comment 15 James Le Cuirot gentoo-dev 2023-11-14 23:37:38 UTC
This is now the modern way to use the Raspberry Pi camera. I've started on an ebuild. I take it there isn't one already? Apart from the half-baked one from Google, that is.
Comment 16 Joakim Tjernlund 2023-11-16 15:56:51 UTC
(In reply to James Le Cuirot from comment #15)
> This is now the modern way to use the Raspberry Pi camera. I've started on
> an ebuild. I take it there isn't one already? Apart from the half-baked one
> from Google, that is.

I think you have better ones here:
http://gpo.zugaina.org/media-libs/libcamera
Comment 17 Dmitriy Baranov 2023-12-07 10:26:29 UTC
https://gitlab.com/reagentoo/gentoo-overlay/-/tree/master/media-video/snapshot?ref_type=heads
https://gitlab.gnome.org/GNOME/snapshot
FYI: this soft requires pipewire+libcamera
Are there any plans to include the library in the tree?
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-09 14:20:30 UTC
I just had an update today from them and we've found a way to make things work. Packaging it now.
[+] Comment 19 Joakim Tjernlund 2024-01-09 19:23:59 UTC Comment hidden (spam)
[+] Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-10 18:52:44 UTC Comment hidden (obsolete)
Comment 21 Avraham Hollander 2024-08-07 14:34:49 UTC
I found this Reddit post (https://www.reddit.com/r/linux/comments/1em8biv/psa_pipewire_has_been_halving_your_battery_life/) about disabling libcamera to fix high idle power consumption.

Lo and behold, Gentoo does not even package libcamera nor its associated PipeWire plugin, so I am unaffected. 

libcamera 0.3 is out now. It's included in Debian 12, so it's been out for a while. The main git repo (https://git.libcamera.org/libcamera/libcamera.git) also now has tags.

What are the major blockers right now to get this working? Is it just a matter of developer time and priorities? (Which is fine, maybe it's an opportunity for me to learn how to work this stuff :))
Comment 22 James Le Cuirot gentoo-dev 2024-08-07 17:53:04 UTC
According to Sam, it's been difficult to package, but I don't know the details. It's admittedly dropped down my own priority list a bit.
Comment 23 amano.kenji 2024-08-08 05:55:04 UTC
GNU guix downloads libcamera from "v0.1.0" git tag of https://git.libcamera.org/libcamera/libcamera.git

It even has base32 value of v0.1.0 tag.
Comment 24 Niklāvs Koļesņikovs 2024-09-09 17:25:08 UTC
I'm not Sam but from what I saw the build system has certain developer centric oddities that are not very compatible with distro goals. At the same time, I'm not sure it's worth not packaging libcamera over ebuild QA requirements, since in certain cases it might be the only way to use certain [exclusively?] on-board cameras.

Ideally some interested contributor from distro side would work with the upstream to improve their build system. I think they'd be quite happy about that. If nothing has changed, they can be reached via some mailing list, where the patches for the build system can be sent in, too.
Comment 25 pogosyan 2025-02-26 05:51:31 UTC
Libcamera is becoming the only open-source way to use cameras on many modern laptops that use IPU6 cameras, such as Lenovo Thinkpad X1 Carbon gen 12, several Dells, etx.  Aternatives are proprietary drivers. So basically it is must to have for those who plan to use such a laptop for work.  Fedora distributes libcamera, and overall spearheading the effort to make IPU6 cameras to work.
Comment 26 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-26 06:07:55 UTC
I did have a draft but I don't have any hardware supporting it, which makes motivation low (and inability to test for something like this makes me feel uneasy).

Patches are very welcome though.
Comment 27 Niklāvs Koļesņikovs 2025-03-08 15:08:59 UTC
1. I'd say just release it and let someone with the actual hardware report any issues. Worst case it will be just as broken as before i.e. no laptop camera. ;)

2. I likewise have no such hardware to say for certain but it should be possible to run any webcam that has the generic UVC (USB Video Class) as its kernel driver (so most but not all webcams) via libcamera and perhaps you or a willing contributor can test it that way. The only gotcha might be that you need to double check that the UVC device is truly running via the camera backend rather than the PipeWire's own v4l2 backend. Presumably the backend used for the particular device should be reflected in the `pw-dump` output.
Comment 28 pogosyan 2025-03-08 17:38:03 UTC
(In reply to Niklāvs Koļesņikovs from comment #27)
> 1. I'd say just release it and let someone with the actual hardware report
> any issues. Worst case it will be just as broken as before i.e. no laptop
> camera. ;)
> 
> 2. I likewise have no such hardware to say for certain but it should be
> possible to run any webcam that has the generic UVC (USB Video Class) as its
> kernel driver (so most but not all webcams) via libcamera and perhaps you or
> a willing contributor can test it that way. The only gotcha might be that
> you need to double check that the UVC device is truly running via the camera
> backend rather than the PipeWire's own v4l2 backend. Presumably the backend
> used for the particular device should be reflected in the `pw-dump` output.

I would echo this opinion.   The point is that there is no criterium to satisfy to say that libcamera "works well".   There is a multitude of hardware, and it may work for some combination and not the other.  In case of IPU6 cameras there is much flux throughout the pipeline starting with kernel support, and it would be good to have at least an easy install of one ingredient.  So I would say, if it compiles, and kind of runs for UVC cameras, it would be useful to have it in portage for people trying to make other setups work.